Hardware access layer for managing the USB regulator peripheral. More...
Enumerations | |
enum | nrf_usbreg_event_t { NRF_USBREG_EVENT_USBDETECTED = offsetof(NRF_USBREG_Type, EVENTS_USBDETECTED) , NRF_USBREG_EVENT_USBREMOVED = offsetof(NRF_USBREG_Type, EVENTS_USBREMOVED) , NRF_USBREG_EVENT_USBPWRRDY = offsetof(NRF_USBREG_Type, EVENTS_USBPWRRDY) } |
USBREG events. More... | |
enum | nrf_usbreg_int_mask_t { NRF_USBREG_INT_USBDETECTED = USBREG_INTEN_USBDETECTED_Msk , NRF_USBREG_INT_USBREMOVED = USBREG_INTEN_USBREMOVED_Msk , NRF_USBREG_INT_USBPWRRDY = USBREG_INTEN_USBPWRRDY_Msk } |
USBREG interrupts. More... | |
enum | nrf_usbreg_status_mask_t { NRF_USBREG_STATUS_VBUSDETECT_MASK = USBREG_USBREGSTATUS_VBUSDETECT_Msk , NRF_USBREG_STATUS_OUTPUTRDY_MASK = USBREG_USBREGSTATUS_OUTPUTRDY_Msk } |
USBREGSTATUS register bit masks. More... | |
Functions | |
NRF_STATIC_INLINE void | nrf_usbreg_event_clear (NRF_USBREG_Type *p_reg, nrf_usbreg_event_t event) |
Function for clearing the specified USBREG event. | |
NRF_STATIC_INLINE bool | nrf_usbreg_event_check (NRF_USBREG_Type const *p_reg, nrf_usbreg_event_t event) |
Function for retrieving the state of the USBREG event. | |
NRF_STATIC_INLINE void | nrf_usbreg_int_enable (NRF_USBREG_Type *p_reg, uint32_t mask) |
Function for enabling specified interrupts. | |
NRF_STATIC_INLINE void | nrf_usbreg_int_disable (NRF_USBREG_Type *p_reg, uint32_t mask) |
Function for disabling specified interrupts. | |
NRF_STATIC_INLINE uint32_t | nrf_usbreg_int_enable_check (NRF_USBREG_Type const *p_reg, uint32_t mask) |
Function for checking if the specified interrupts are enabled. | |
NRF_STATIC_INLINE uint32_t | nrf_usbreg_status_get (NRF_USBREG_Type const *p_reg) |
Function for getting the whole USBREGSTATUS register. | |
Hardware access layer for managing the USB regulator peripheral.
enum nrf_usbreg_event_t |
NRF_STATIC_INLINE bool nrf_usbreg_event_check | ( | NRF_USBREG_Type const * | p_reg, |
nrf_usbreg_event_t | event | ||
) |
Function for retrieving the state of the USBREG event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to be checked. |
true | The event has been generated. |
false | The event has not been generated. |
NRF_STATIC_INLINE void nrf_usbreg_event_clear | ( | NRF_USBREG_Type * | p_reg, |
nrf_usbreg_event_t | event | ||
) |
Function for clearing the specified USBREG event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to be cleared. |
NRF_STATIC_INLINE void nrf_usbreg_int_disable | ( | NRF_USBREG_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for disabling specified interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be disabled. Use nrf_usbreg_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_usbreg_int_enable | ( | NRF_USBREG_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for enabling specified interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be enabled. Use nrf_usbreg_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_usbreg_int_enable_check | ( | NRF_USBREG_Type const * | p_reg, |
uint32_t | mask | ||
) |
Function for checking if the specified interrupts are enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be checked. Use nrf_usbreg_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_usbreg_status_get | ( | NRF_USBREG_Type const * | p_reg | ) |
Function for getting the whole USBREGSTATUS register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |