|
| 1 | +/**************************************************************************** |
| 2 | + * arch/arm/src/nrf53/hardware/nrf53_usbreg.h |
| 3 | + * |
| 4 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 5 | + * contributor license agreements. See the NOTICE file distributed with |
| 6 | + * this work for additional information regarding copyright ownership. The |
| 7 | + * ASF licenses this file to you under the Apache License, Version 2.0 (the |
| 8 | + * "License"); you may not use this file except in compliance with the |
| 9 | + * License. You may obtain a copy of the License at |
| 10 | + * |
| 11 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | + * |
| 13 | + * Unless required by applicable law or agreed to in writing, software |
| 14 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 15 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 16 | + * License for the specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + * |
| 19 | + ****************************************************************************/ |
| 20 | + |
| 21 | +#ifndef __ARCH_ARM_SRC_NRF53_HARDWARE_NRF53_USBREG_H |
| 22 | +#define __ARCH_ARM_SRC_NRF53_HARDWARE_NRF53_USBREG_H |
| 23 | + |
| 24 | +/**************************************************************************** |
| 25 | + * Included Files |
| 26 | + ****************************************************************************/ |
| 27 | + |
| 28 | +#include <nuttx/config.h> |
| 29 | +#include "nrf53_memorymap.h" |
| 30 | + |
| 31 | +/**************************************************************************** |
| 32 | + * Pre-processor Definitions |
| 33 | + ****************************************************************************/ |
| 34 | + |
| 35 | +/* Register offsets *********************************************************/ |
| 36 | + |
| 37 | +#define NRF53_USBREG_EVENTS_USBDETECTED_OFFSET 0x000100 /* Voltage supply detected on VBUS */ |
| 38 | +#define NRF53_USBREG_EVENTS_USBREMOVED_OFFSET 0x000104 /* Voltage supply removed from VBUS*/ |
| 39 | +#define NRF53_USBREG_EVENTS_USBPWRRDY_OFFSET 0x000108 /* USB 3.3 V supply ready */ |
| 40 | +#define NRF53_USBREG_INTEN_OFFSET 0x000300 /* Enable or disable interrrupt */ |
| 41 | +#define NRF53_USBREG_INTENSET_OFFSET 0x000304 /* Enable interrrupt */ |
| 42 | +#define NRF53_USBREG_INTENCLR_OFFSET 0x000308 /* Disable interrrupt */ |
| 43 | +#define NRF53_USBREG_USBREGSTATUS_OFFSET 0x000400 /* USB supply status */ |
| 44 | + |
| 45 | +/* Register definitions *****************************************************/ |
| 46 | + |
| 47 | +#define NRF53_USBREG_EVENTS_USBDETECTED (NRF53_USBREG_BASE + NRF53_USBREG_EVENTS_USBDETECTED_OFFSET) |
| 48 | +#define NRF53_USBREG_EVENTS_USBREMOVED (NRF53_USBREG_BASE + NRF53_USBREG_EVENTS_USBREMOVED_OFFSET) |
| 49 | +#define NRF53_USBREG_EVENTS_USBPWRRDY (NRF53_USBREG_BASE + NRF53_USBREG_EVENTS_USBPWRRDY_OFFSET) |
| 50 | +#define NRF53_USBREG_INTEN (NRF53_USBREG_BASE + NRF53_USBREG_INTEN_OFFSET) |
| 51 | +#define NRF53_USBREG_INTENSET (NRF53_USBREG_BASE + NRF53_USBREG_INTENSET_OFFSET) |
| 52 | +#define NRF53_USBREG_INTENCLR (NRF53_USBREG_BASE + NRF53_USBREG_INTENCLR_OFFSET) |
| 53 | +#define NRF53_USBREG_USBREGSTATUS (NRF53_USBREG_BASE + NRF53_USBREG_USBREGSTATUS_OFFSET) |
| 54 | + |
| 55 | +/* Register bit definitions *************************************************/ |
| 56 | + |
| 57 | +/* USBREGSTATUS */ |
| 58 | + |
| 59 | +#define USBREG_USBREGSTATUS_VBUSDETECT (1 << 0) /* Vbus Present */ |
| 60 | +#define USBREG_USBREGSTATUS_OUTPUTRDY (1 << 1) /* Ready */ |
| 61 | + |
| 62 | +#endif /* __ARCH_ARM_SRC_NRF53_HARDWARE_NRF53_USBREG_H */ |
0 commit comments