Driver for managing events and the state of POWER peripheral.
More...
Driver for managing events and the state of POWER peripheral.
Power mode possible configurations.
Enumerator |
---|
NRF_DRV_POWER_MODE_CONSTLAT |
NRF_DRV_POWER_MODE_CONSTLAT.
Constant latency mode
|
NRF_DRV_POWER_MODE_LOWPWR |
NRF_DRV_POWER_MODE_LOWPWR.
Low power mode
|
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_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 whatever common POWER_CLOCK common interrupt should be disabled or not if Clock driver tries to disable the interrupt.
- Return values
-
true | Driver is initialized |
false | Driver is uninitialized |
- See Also
- nrf_drv_power_uninit
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. |
void nrf_drv_power_pof_uninit |
( |
void |
| ) |
|
Turn off the power failure comparator.
Disables and clears the settings of the power failure comparator.
void nrf_drv_power_uninit |
( |
void |
| ) |
|
Unintialize power module driver.
Disables all the interrupt handling in the module.
- See Also
- nrf_drv_power_init