nrfx 2.10
Data Structures | Typedefs | Enumerations | Functions
USBREG driver

USB regulators (USBREG) peripheral driver. More...

Data Structures

struct  nrfx_usbreg_config_t
 The configuration of the USB-related power events. More...
 

Typedefs

typedef void(* nrfx_usbreg_event_handler_t) (nrfx_usbreg_evt_t event)
 Event handler for the USB-related power events. More...
 

Enumerations

enum  nrfx_usbreg_evt_t {
  NRFX_USBREG_EVT_DETECTED ,
  NRFX_USBREG_EVT_REMOVED ,
  NRFX_USBREG_EVT_READY
}
 Events from USB power system. More...
 
enum  nrfx_usbreg_state_t {
  NRFX_USBREG_STATE_DISCONNECTED ,
  NRFX_USBREG_STATE_CONNECTED ,
  NRFX_USBREG_STATE_READY
}
 USB power state. More...
 

Functions

nrfx_usbreg_event_handler_t nrfx_usbreg_handler_get (void)
 Function for getting the USBREG handler. More...
 
void nrfx_usbreg_init (nrfx_usbreg_config_t const *p_config)
 Function for initializing the processing of USBREG events. More...
 
void nrfx_usbreg_enable (void)
 Function for enabling the processing of USBREG events.
 
void nrfx_usbreg_disable (void)
 Function for disabling the processing of USBREG events.
 
void nrfx_usbreg_uninit (void)
 Function for uninitalizing the processing of USBREG events. More...
 
NRFX_STATIC_INLINE nrfx_usbreg_state_t nrfx_usbreg_usbstatus_get (void)
 Function for getting the status of USBREG. More...
 

Detailed Description

USB regulators (USBREG) peripheral driver.

Typedef Documentation

◆ nrfx_usbreg_event_handler_t

typedef void(* nrfx_usbreg_event_handler_t) (nrfx_usbreg_evt_t event)

Event handler for the USB-related power events.

Parameters
eventEvent type

Enumeration Type Documentation

◆ nrfx_usbreg_evt_t

Events from USB power system.

Enumerator
NRFX_USBREG_EVT_DETECTED 

USB power detected on the connector (plugged in).

NRFX_USBREG_EVT_REMOVED 

USB power removed from the connector.

NRFX_USBREG_EVT_READY 

USB power regulator ready.

◆ nrfx_usbreg_state_t

USB power state.

The single enumerator that holds all data about current state of USB related POWER.

Organized this way that higher power state has higher numeric value

Enumerator
NRFX_USBREG_STATE_DISCONNECTED 

No power on USB lines detected.

NRFX_USBREG_STATE_CONNECTED 

The USB power is detected, but USB power regulator is not ready.

NRFX_USBREG_STATE_READY 

From the power viewpoint, USB is ready for working.

Function Documentation

◆ nrfx_usbreg_handler_get()

nrfx_usbreg_event_handler_t nrfx_usbreg_handler_get ( void  )

Function for getting the USBREG handler.

Returns
Handler of the USB power.

◆ nrfx_usbreg_init()

void nrfx_usbreg_init ( nrfx_usbreg_config_t const *  p_config)

Function for initializing the processing of USBREG events.

Configures and sets up the USB power event processing.

Parameters
[in]p_configConfiguration structure. Must not be NULL.
See also
nrfx_usbreg_uninit

◆ nrfx_usbreg_uninit()

void nrfx_usbreg_uninit ( void  )

Function for uninitalizing the processing of USBREG events.

See also
nrfx_usbreg_init

◆ nrfx_usbreg_usbstatus_get()

NRFX_STATIC_INLINE nrfx_usbreg_state_t nrfx_usbreg_usbstatus_get ( void  )

Function for getting the status of USBREG.

Returns
Current USB power status.

Documentation feedback | Developer Zone | Subscribe | Updated