POWER peripheral driver. More...
Data Structures |
|
| struct | nrfx_power_config_t |
|
General power configuration.
More...
|
|
| struct | nrfx_power_pofwarn_config_t |
|
The configuration for power failure comparator.
More...
|
|
| struct | nrfx_power_sleepevt_config_t |
|
The configuration of sleep event processing.
More...
|
|
| struct | nrfx_power_usbevt_config_t |
|
The configuration of the USB-related power events.
More...
|
|
Enumerations |
|
| enum |
nrfx_power_mode_t
{
NRFX_POWER_MODE_CONSTLAT , NRFX_POWER_MODE_LOWPWR } |
|
Power mode possible configurations.
More...
|
|
| enum |
nrfx_power_sleep_evt_t
{
NRFX_POWER_SLEEP_EVT_ENTER , NRFX_POWER_SLEEP_EVT_EXIT } |
|
Events from power system.
More...
|
|
| enum |
nrfx_power_usb_evt_t
{
NRFX_POWER_USB_EVT_DETECTED , NRFX_POWER_USB_EVT_REMOVED , NRFX_POWER_USB_EVT_READY } |
|
Events from USB power system.
More...
|
|
| enum |
nrfx_power_usb_state_t
{
NRFX_POWER_USB_STATE_DISCONNECTED , NRFX_POWER_USB_STATE_CONNECTED , NRFX_POWER_USB_STATE_READY } |
|
USB power state.
More...
|
|
Functions |
|
| nrfx_power_pofwarn_event_handler_t | nrfx_power_pof_handler_get (void) |
|
Function for getting the handler of the power failure comparator.
More...
|
|
| nrfx_power_usb_event_handler_t | nrfx_power_usb_handler_get (void) |
|
Function for getting the handler of the USB power.
More...
|
|
| nrfx_err_t | nrfx_power_init ( nrfx_power_config_t const *p_config) |
|
Function for initializing the power module driver.
More...
|
|
| void | nrfx_power_uninit (void) |
|
Function for unintializing the power module driver.
More...
|
|
| void | nrfx_power_pof_init ( nrfx_power_pofwarn_config_t const *p_config) |
|
Function for initializing the power failure comparator.
More...
|
|
| void | nrfx_power_pof_enable ( nrfx_power_pofwarn_config_t const *p_config) |
|
Function for enabling the power failure comparator. Sets and enables the interrupt of the power failure comparator. This function cannot be in use when SoftDevice is enabled. If the event handler set in the init function is set to NULL, the interrupt will be disabled.
More...
|
|
| void | nrfx_power_pof_disable (void) |
|
Function for disabling the power failure comparator.
More...
|
|
| void | nrfx_power_pof_uninit (void) |
|
Function for clearing the power failure comparator settings.
More...
|
|
| void | nrfx_power_sleepevt_init ( nrfx_power_sleepevt_config_t const *p_config) |
|
Function for initializing the processing of the sleep events.
More...
|
|
| void | nrfx_power_sleepevt_enable ( nrfx_power_sleepevt_config_t const *p_config) |
|
Function for enabling the processing of the sleep events.
More...
|
|
| void | nrfx_power_sleepevt_disable (void) |
|
Function for disabling the processing of the sleep events.
|
|
| void | nrfx_power_sleepevt_uninit (void) |
|
Function for uninitializing the processing of the sleep events.
More...
|
|
| void | nrfx_power_usbevt_init ( nrfx_power_usbevt_config_t const *p_config) |
|
Function for initializing the processing of USB power event.
More...
|
|
| void | nrfx_power_usbevt_enable (void) |
|
Function for enabling the processing of USB power event.
|
|
| void | nrfx_power_usbevt_disable (void) |
|
Function for disabling the processing of USB power event.
|
|
| void | nrfx_power_usbevt_uninit (void) |
|
Function for uninitalizing the processing of USB power event.
More...
|
|
|
__STATIC_INLINE
nrfx_power_usb_state_t |
nrfx_power_usbstatus_get (void) |
|
Function for getting the status of USB power.
More...
|
|
Callback types |
|
| typedef void(* | nrfx_power_pofwarn_event_handler_t )(void) |
|
Event handler for power failure warning.
|
|
| typedef void(* | nrfx_power_sleep_event_handler_t )( nrfx_power_sleep_evt_t event) |
|
Event handler for the sleep events.
More...
|
|
| typedef void(* | nrfx_power_usb_event_handler_t )( nrfx_power_usb_evt_t event) |
|
Event handler for the USB-related power events.
More...
|
|
Detailed Description
POWER peripheral driver.
Typedef Documentation
| typedef void(* nrfx_power_sleep_event_handler_t)( nrfx_power_sleep_evt_t event) |
Event handler for the sleep events.
- Parameters
-
event Event type
| typedef void(* nrfx_power_usb_event_handler_t)( nrfx_power_usb_evt_t event) |
Event handler for the USB-related power events.
- Parameters
-
event Event type
Enumeration Type Documentation
| enum nrfx_power_mode_t |
| enum nrfx_power_usb_evt_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
Function Documentation
| nrfx_err_t nrfx_power_init | ( | nrfx_power_config_t const * | p_config | ) |
Function for initializing the power module driver.
Enabled power module driver processes all the interrupts from the power system.
- Parameters
-
[in] p_config Pointer to the structure with the initial configuration.
- Return values
-
NRFX_SUCCESS Successfully initialized. NRFX_ERROR_ALREADY_INITIALIZED Module was already initialized.
| void nrfx_power_pof_disable | ( | void | ) |
Function for disabling the power failure comparator.
Disables the power failure comparator interrupt.
| void nrfx_power_pof_enable | ( | nrfx_power_pofwarn_config_t const * | p_config | ) |
Function for enabling the power failure comparator. Sets and enables the interrupt of the power failure comparator. This function cannot be in use when SoftDevice is enabled. If the event handler set in the init function is set to NULL, the interrupt will be disabled.
- Parameters
-
[in] p_config Configuration with values and event handler.
| nrfx_power_pofwarn_event_handler_t nrfx_power_pof_handler_get | ( | void | ) |
Function for getting the handler of the power failure comparator.
- Returns
- Handler of the power failure comparator.
| void nrfx_power_pof_init | ( | nrfx_power_pofwarn_config_t const * | p_config | ) |
Function for initializing the power failure comparator.
Configures the power failure comparator. This function does not set it up and enable it. These steps can be done with functions nrfx_power_pof_enable and nrfx_power_pof_disable or with the SoftDevice API (when in use).
- Parameters
-
[in] p_config Configuration with values and event handler. If event handler is set to NULL, the interrupt will be disabled.
| void nrfx_power_pof_uninit | ( | void | ) |
Function for clearing the power failure comparator settings.
Clears the settings of the power failure comparator.
| void nrfx_power_sleepevt_enable | ( | nrfx_power_sleepevt_config_t const * | p_config | ) |
Function for enabling the processing of the sleep events.
- Parameters
-
[in] p_config Configuration with values and event handler.
| void nrfx_power_sleepevt_init | ( | nrfx_power_sleepevt_config_t const * | p_config | ) |
Function for initializing the processing of the sleep events.
Configures and sets up the sleep event processing.
- Parameters
-
[in] p_config Configuration with values and event handler.
- See Also
- nrfx_power_sleepevt_uninit
| void nrfx_power_sleepevt_uninit | ( | void | ) |
Function for uninitializing the processing of the sleep events.
- See Also
- nrfx_power_sleepevt_init
| void nrfx_power_uninit | ( | void | ) |
Function for unintializing the power module driver.
Disables all the interrupt handling in the module.
- See Also
- nrfx_power_init
| nrfx_power_usb_event_handler_t nrfx_power_usb_handler_get | ( | void | ) |
Function for getting the handler of the USB power.
- Returns
- Handler of the USB power.
| void nrfx_power_usbevt_init | ( | nrfx_power_usbevt_config_t const * | p_config | ) |
Function for initializing the processing of USB power event.
Configures and sets up the USB power event processing.
- Parameters
-
[in] p_config Configuration with values and event handler.
- See Also
- nrfx_power_usbevt_uninit
| void nrfx_power_usbevt_uninit | ( | void | ) |
Function for uninitalizing the processing of USB power event.
- See Also
- nrfx_power_usbevt_init
| __STATIC_INLINE nrfx_power_usb_state_t nrfx_power_usbstatus_get | ( | void | ) |
Function for getting the status of USB power.
- Returns
- Current USB power status.