POWER peripheral driver. More...
Modules | |
POWER peripheral driver configuration | |
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 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) |
Initialize power module driver. More... | |
void | nrfx_power_uninit (void) |
Unintialize power module driver. More... | |
void | nrfx_power_pof_init (nrfx_power_pofwarn_config_t const *p_config) |
Initialize power failure comparator. More... | |
void | nrfx_power_pof_enable (nrfx_power_pofwarn_config_t const *p_config) |
Enable power failure comparator Sets and enables interrupt of the power failure comparator. This functions cannot be using when Softdevice is enabled. If event handler set in init function is set to NULL, interrupt would be disabled. More... | |
void | nrfx_power_pof_disable (void) |
Disable the power failure comparator. More... | |
void | nrfx_power_pof_uninit (void) |
Clear the power failure comparator settings. More... | |
void | nrfx_power_sleepevt_init (nrfx_power_sleepevt_config_t const *p_config) |
Initialize sleep entering and exiting events processing. More... | |
void | nrfx_power_sleepevt_enable (nrfx_power_sleepevt_config_t const *p_config) |
Enable sleep entering and exiting events processing. More... | |
void | nrfx_power_sleepevt_disable (void) |
Disable sleep entering and exiting events processing. | |
void | nrfx_power_sleepevt_uninit (void) |
Uninitialize sleep entering and exiting events processing. More... | |
void | nrfx_power_usbevt_init (nrfx_power_usbevt_config_t const *p_config) |
Initialize USB power event processing. More... | |
void | nrfx_power_usbevt_enable (void) |
Enable USB power event processing. | |
void | nrfx_power_usbevt_disable (void) |
Disable USB power event processing. | |
void | nrfx_power_usbevt_uninit (void) |
Uninitalize USB power event processing. More... | |
__STATIC_INLINE nrfx_power_usb_state_t | nrfx_power_usbstatus_get (void) |
Get the status of USB power. More... | |
void | nrfx_power_irq_handler (void) |
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 entering/exiting sleep. More... | |
typedef void(* | nrfx_power_usb_event_handler_t )(nrfx_power_usb_evt_t event) |
Event handler for USB related power events. More... | |
POWER peripheral driver.
typedef void(* nrfx_power_sleep_event_handler_t)(nrfx_power_sleep_evt_t event) |
Event handler for entering/exiting sleep.
event | Event type |
typedef void(* nrfx_power_usb_event_handler_t)(nrfx_power_usb_evt_t event) |
Event handler for USB related power events.
event | Event type |
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
nrfx_err_t nrfx_power_init | ( | nrfx_power_config_t const * | p_config | ) |
Initialize power module driver.
Enabled power module driver would process all the interrupts from power system.
[in] | p_config | Pointer to the structure with initial configuration. |
NRFX_SUCCESS | Successfully initialized. |
NRFX_ERROR_ALREADY_INITIALIZED | Module was already initialized. |
void nrfx_power_pof_disable | ( | void | ) |
Disable the power failure comparator.
Disables the power failure comparator interrupt.
void nrfx_power_pof_enable | ( | nrfx_power_pofwarn_config_t const * | p_config | ) |
Enable power failure comparator Sets and enables interrupt of the power failure comparator. This functions cannot be using when Softdevice is enabled. If event handler set in init function is set to NULL, interrupt would be disabled.
[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.
void nrfx_power_pof_init | ( | nrfx_power_pofwarn_config_t const * | p_config | ) |
Initialize power failure comparator.
Configures the power failure comparator. This function does not setup and enable it. Those steps can be done with functions nrfx_power_pof_enable and nrfx_power_pof_disable or with Softdevice API (when Softdevice is using).
[in] | p_config | Configuration with values and event handler. If event handler is set to NULL, interrupt would be disabled. |
void nrfx_power_pof_uninit | ( | void | ) |
Clear 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 | ) |
Enable sleep entering and exiting events processing.
[in] | p_config | Configuration with values and event handler. |
void nrfx_power_sleepevt_init | ( | nrfx_power_sleepevt_config_t const * | p_config | ) |
Initialize sleep entering and exiting events processing.
Configures and setups the sleep event processing.
[in] | p_config | Configuration with values and event handler. |
void nrfx_power_sleepevt_uninit | ( | void | ) |
Uninitialize sleep entering and exiting events processing.
void nrfx_power_uninit | ( | void | ) |
Unintialize power module driver.
Disables all the interrupt handling in the module.
nrfx_power_usb_event_handler_t nrfx_power_usb_handler_get | ( | void | ) |
Function for getting the handler of the USB power.
void nrfx_power_usbevt_init | ( | nrfx_power_usbevt_config_t const * | p_config | ) |
Initialize USB power event processing.
Configures and setups the USB power event processing.
[in] | p_config | Configuration with values and event handler. |
void nrfx_power_usbevt_uninit | ( | void | ) |
Uninitalize USB power event processing.
__STATIC_INLINE nrfx_power_usb_state_t nrfx_power_usbstatus_get | ( | void | ) |
Get the status of USB power.