Layer providing compatibility with the former API. More...
Macros |
|
| #define | NRF_DRV_POWER_MODE_CONSTLAT NRFX_POWER_MODE_CONSTLAT |
|
Macro for forwarding the new implementation.
|
|
| #define | NRF_DRV_POWER_MODE_LOWPWR NRFX_POWER_MODE_LOWPWR |
|
Macro for forwarding the new implementation.
|
|
| #define | nrf_drv_power_mode_t nrfx_power_mode_t |
|
Macro for forwarding the new implementation.
|
|
| #define | NRF_DRV_POWER_SLEEP_EVT_ENTER NRFX_POWER_SLEEP_EVT_ENTER |
|
Macro for forwarding the new implementation.
|
|
| #define | NRF_DRV_POWER_SLEEP_EVT_EXIT NRFX_POWER_SLEEP_EVT_EXIT |
|
Macro for forwarding the new implementation.
|
|
| #define | nrf_drv_power_sleep_evt_t nrfx_power_sleep_evt_t |
|
Macro for forwarding the new implementation.
|
|
| #define | NRF_DRV_POWER_USB_EVT_DETECTED NRFX_POWER_USB_EVT_DETECTED |
|
Macro for forwarding the new implementation.
|
|
| #define | NRF_DRV_POWER_USB_EVT_REMOVED NRFX_POWER_USB_EVT_REMOVED |
|
Macro for forwarding the new implementation.
|
|
| #define | NRF_DRV_POWER_USB_EVT_READY NRFX_POWER_USB_EVT_READY |
|
Macro for forwarding the new implementation.
|
|
| #define | nrf_drv_power_usb_evt_t nrfx_power_usb_evt_t |
|
Macro for forwarding the new implementation.
|
|
| #define | NRF_DRV_POWER_USB_STATE_DISCONNECTED NRFX_POWER_USB_STATE_DISCONNECTED |
|
Macro for forwarding the new implementation.
|
|
| #define | NRF_DRV_POWER_USB_STATE_CONNECTED NRFX_POWER_USB_STATE_CONNECTED |
|
Macro for forwarding the new implementation.
|
|
| #define | NRF_DRV_POWER_USB_STATE_READY NRFX_POWER_USB_STATE_READY |
|
Macro for forwarding the new implementation.
|
|
| #define | nrf_drv_power_usb_state_t nrfx_power_usb_state_t |
|
Macro for forwarding the new implementation.
|
|
| #define | nrf_drv_power_pofwarn_event_handler_t nrfx_power_pofwarn_event_handler_t |
|
Macro for forwarding the new implementation.
|
|
| #define | nrf_drv_power_sleep_event_handler_t nrfx_power_sleep_event_handler_t |
|
Macro for forwarding the new implementation.
|
|
| #define | nrf_drv_power_usb_event_handler_t nrfx_power_usb_event_handler_t |
|
Macro for forwarding the new implementation.
|
|
| #define | nrf_drv_power_usbstatus_get nrfx_power_usbstatus_get |
|
Macro for forwarding the new implementation.
|
|
Typedefs |
|
| typedef nrfx_power_config_t | nrf_drv_power_config_t |
|
Type definition for forwarding the new implementation.
|
|
| typedef nrfx_power_pofwarn_config_t | nrf_drv_power_pofwarn_config_t |
|
Type definition for forwarding the new implementation.
|
|
|
typedef
nrfx_power_sleepevt_config_t |
nrf_drv_power_sleepevt_config_t |
|
Type definition for forwarding the new implementation.
|
|
| typedef nrfx_power_usbevt_config_t | nrf_drv_power_usbevt_config_t |
|
Type definition for forwarding the new implementation.
|
|
Functions |
|
| bool | nrf_drv_power_init_check (void) |
|
Function for checking if driver is already initialized.
More...
|
|
| ret_code_t | nrf_drv_power_init ( nrf_drv_power_config_t const *p_config) |
|
Initialize power module driver.
More...
|
|
| void | nrf_drv_power_uninit (void) |
|
Unintialize power module driver.
More...
|
|
| ret_code_t | nrf_drv_power_pof_init ( nrf_drv_power_pofwarn_config_t const *p_config) |
|
Initialize power failure comparator.
More...
|
|
| void | nrf_drv_power_pof_uninit (void) |
|
Turn off the power failure comparator.
More...
|
|
| ret_code_t | nrf_drv_power_sleepevt_init ( nrf_drv_power_sleepevt_config_t const *p_config) |
|
Initialize sleep entering and exiting events processing.
More...
|
|
| void | nrf_drv_power_sleepevt_uninit (void) |
|
Uninitialize sleep entering and exiting events processing.
More...
|
|
| ret_code_t | nrf_drv_power_usbevt_init ( nrf_drv_power_usbevt_config_t const *p_config) |
|
Initialize USB power event processing.
More...
|
|
| void | nrf_drv_power_usbevt_uninit (void) |
|
Uninitalize USB power event processing.
More...
|
|
Detailed Description
Layer providing compatibility with the former API.
Function Documentation
| ret_code_t nrf_drv_power_init | ( | nrf_drv_power_config_t const * | p_config | ) |
Initialize power module driver.
Enabled power module driver would process all the interrupts from power system.
- Parameters
-
[in] p_config Driver configuration. Can be NULL - the default configuration from sdk_config.h file would be used then.
- Return values
-
NRF_ERROR_INVALID_STATE Power driver has to be enabled before SoftDevice. NRF_ERROR_MODULE_ALREADY_INITIALIZED Module is initialized already. NRF_SUCCESS Successfully initialized.
| bool nrf_drv_power_init_check | ( | void | ) |
Function for checking if driver is already initialized.
This function is used to check whether common POWER_CLOCK interrupt should be disabled or not if Clock driver - legacy layer tries to disable the interrupt.
- Return values
-
true Driver is initialized false Driver is uninitialized
- See Also
- nrf_drv_power_uninit
| ret_code_t nrf_drv_power_pof_init | ( | nrf_drv_power_pofwarn_config_t const * | p_config | ) |
Initialize power failure comparator.
Configures and setups the power failure comparator and enables it.
- Parameters
-
[in] p_config Configuration with values and event handler. If event handler is set to NULL, interrupt would be disabled.
- Return values
-
NRF_ERROR_INVALID_STATE POF is initialized when SD is enabled and the configuration differs from the old one and is not possible to be set using SD interface. NRF_SUCCESS Successfully initialized and configured.
| void nrf_drv_power_pof_uninit | ( | void | ) |
Turn off the power failure comparator.
Disables and clears the settings of the power failure comparator.
| ret_code_t nrf_drv_power_sleepevt_init | ( | nrf_drv_power_sleepevt_config_t const * | p_config | ) |
Initialize sleep entering and exiting events processing.
Configures and setups the sleep event processing.
- Parameters
-
[in] p_config Configuration with values and event handler.
- See Also
- nrf_drv_power_sleepevt_uninit
- Note
- Sleep events are not available when SoftDevice is enabled.
- If sleep event is enabled when SoftDevice is initialized, sleep events would be automatically disabled - it is the limitation of the SoftDevice itself.
- Return values
-
NRF_ERROR_INVALID_STATE This event cannot be initialized when SD is enabled. NRF_SUCCESS Successfully initialized and configured.
| void nrf_drv_power_sleepevt_uninit | ( | void | ) |
Uninitialize sleep entering and exiting events processing.
- See Also
- nrf_drv_power_sleepevt_init
| void nrf_drv_power_uninit | ( | void | ) |
Unintialize power module driver.
Disables all the interrupt handling in the module.
- See Also
- nrf_drv_power_init
| ret_code_t nrf_drv_power_usbevt_init | ( | nrf_drv_power_usbevt_config_t const * | p_config | ) |
Initialize USB power event processing.
Configures and setups the USB power event processing.
- Parameters
-
[in] p_config Configuration with values and event handler.
- See Also
- nrf_drv_power_usbevt_uninit
- Return values
-
NRF_ERROR_INVALID_STATE This event cannot be initialized when SD is enabled and SD does not support USB power events. NRF_SUCCESS Successfully initialized and configured.
| void nrf_drv_power_usbevt_uninit | ( | void | ) |
Uninitalize USB power event processing.
- See Also
- nrf_drv_power_usbevt_init