USBREG HAL¶
-
group
nrf_usbreg_hal
Hardware access layer for managing the USB regulator peripheral.
Enums
-
enum
nrf_usbreg_event_t
¶ USBREG events.
Values:
-
enumerator
NRF_USBREG_EVENT_USBDETECTED
¶ Voltage supply detected on VBUS.
-
enumerator
NRF_USBREG_EVENT_USBREMOVED
¶ Voltage supply removed from VBUS.
-
enumerator
NRF_USBREG_EVENT_USBPWRRDY
¶ USB 3.3V supply ready.
-
enumerator
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.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event to be cleared.
-
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.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event to be checked.
- Returns true
The event has been generated.
- Returns false
The event has not been generated.
-
NRF_STATIC_INLINE void
nrf_usbreg_int_enable
(NRF_USBREG_Type *p_reg, uint32_t mask)¶ Function for enabling specified interrupts.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be enabled.
-
NRF_STATIC_INLINE void
nrf_usbreg_int_disable
(NRF_USBREG_Type *p_reg, uint32_t mask)¶ Function for disabling specified interrupts.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be disabled.
-
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.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be checked.
- Returns
Mask of enabled interrupts.
-
NRF_STATIC_INLINE uint32_t
nrf_usbreg_status_get
(NRF_USBREG_Type const *p_reg)¶ Function for getting the whole USBREGSTATUS register.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The USBREGSTATUS register value. Use nrf_usbreg_status_mask_t values for bit masking.
-
enum