Hardware access layer for managing the REGULATORS peripheral. More...
Macros | |
#define | NRF_REGULATORS_HAS_MAINREGSTATUS 1 |
Symbol indicating whether MAINREGSTATUS register is present. | |
#define | NRF_REGULATORS_HAS_POFCON 1 |
Symbol indicating whether power failure comparator is present. | |
#define | NRF_REGULATORS_HAS_POFCON_VDDH 1 |
Symbol indicating whether power failure comparator for VDDH is present. | |
#define | NRF_REGULATORS_HAS_DCDCEN_VDDH 1 |
Symbol indicating whether high voltage regulator is present. | |
#define | NRF_REGULATORS_HAS_DCDCEN_RADIO 1 |
Symbol indicating whether radio regulator is present. | |
Enumerations | |
enum | nrf_regulators_mainregstatus_t { NRF_REGULATORS_MAINREGSTATUS_NORMAL = REGULATORS_MAINREGSTATUS_VREGH_Inactive, NRF_REGULATORS_MAINREGSTATUS_HIGH = REGULATORS_MAINREGSTATUS_VREGH_Active } |
Main regulator status. More... | |
enum | nrf_regulators_pof_thr_t { NRF_REGULATORS_POFTHR_V19 = REGULATORS_POFCON_THRESHOLD_V19, NRF_REGULATORS_POFTHR_V20 = REGULATORS_POFCON_THRESHOLD_V20, NRF_REGULATORS_POFTHR_V21 = REGULATORS_POFCON_THRESHOLD_V21, NRF_REGULATORS_POFTHR_V22 = REGULATORS_POFCON_THRESHOLD_V22, NRF_REGULATORS_POFTHR_V23 = REGULATORS_POFCON_THRESHOLD_V23, NRF_REGULATORS_POFTHR_V24 = REGULATORS_POFCON_THRESHOLD_V24, NRF_REGULATORS_POFTHR_V25 = REGULATORS_POFCON_THRESHOLD_V25, NRF_REGULATORS_POFTHR_V26 = REGULATORS_POFCON_THRESHOLD_V26, NRF_REGULATORS_POFTHR_V27 = REGULATORS_POFCON_THRESHOLD_V27, NRF_REGULATORS_POFTHR_V28 = REGULATORS_POFCON_THRESHOLD_V28 } |
Power failure comparator thresholds. More... | |
enum | nrf_regulators_pof_thrvddh_t { NRF_REGULATORS_POFTHRVDDH_V27 = REGULATORS_POFCON_THRESHOLDVDDH_V27, NRF_REGULATORS_POFTHRVDDH_V28 = REGULATORS_POFCON_THRESHOLDVDDH_V28, NRF_REGULATORS_POFTHRVDDH_V29 = REGULATORS_POFCON_THRESHOLDVDDH_V29, NRF_REGULATORS_POFTHRVDDH_V30 = REGULATORS_POFCON_THRESHOLDVDDH_V30, NRF_REGULATORS_POFTHRVDDH_V31 = REGULATORS_POFCON_THRESHOLDVDDH_V31, NRF_REGULATORS_POFTHRVDDH_V32 = REGULATORS_POFCON_THRESHOLDVDDH_V32, NRF_REGULATORS_POFTHRVDDH_V33 = REGULATORS_POFCON_THRESHOLDVDDH_V33, NRF_REGULATORS_POFTHRVDDH_V34 = REGULATORS_POFCON_THRESHOLDVDDH_V34, NRF_REGULATORS_POFTHRVDDH_V35 = REGULATORS_POFCON_THRESHOLDVDDH_V35, NRF_REGULATORS_POFTHRVDDH_V36 = REGULATORS_POFCON_THRESHOLDVDDH_V36, NRF_REGULATORS_POFTHRVDDH_V37 = REGULATORS_POFCON_THRESHOLDVDDH_V37, NRF_REGULATORS_POFTHRVDDH_V38 = REGULATORS_POFCON_THRESHOLDVDDH_V38, NRF_REGULATORS_POFTHRVDDH_V39 = REGULATORS_POFCON_THRESHOLDVDDH_V39, NRF_REGULATORS_POFTHRVDDH_V40 = REGULATORS_POFCON_THRESHOLDVDDH_V40, NRF_REGULATORS_POFTHRVDDH_V41 = REGULATORS_POFCON_THRESHOLDVDDH_V41, NRF_REGULATORS_POFTHRVDDH_V42 = REGULATORS_POFCON_THRESHOLDVDDH_V42 } |
Power failure comparator thresholds for VDDH. More... | |
Functions | |
NRF_STATIC_INLINE void | nrf_regulators_dcdcen_set (NRF_REGULATORS_Type *p_reg, bool enable) |
Function for enabling or disabling DCDC converter. More... | |
NRF_STATIC_INLINE void | nrf_regulators_system_off (NRF_REGULATORS_Type *p_reg) |
Function for putting CPU in system OFF mode. More... | |
NRF_STATIC_INLINE nrf_regulators_mainregstatus_t | nrf_regulators_mainregstatus_get (NRF_REGULATORS_Type const *p_reg) |
Function for getting the main supply status. More... | |
NRF_STATIC_INLINE void | nrf_regulators_pofcon_set (NRF_REGULATORS_Type *p_reg, bool enable, nrf_regulators_pof_thr_t thr) |
Function for setting the power failure comparator configuration. More... | |
NRF_STATIC_INLINE nrf_regulators_pof_thr_t | nrf_regulators_pofcon_get (NRF_REGULATORS_Type const *p_reg, bool *p_enabled) |
Function for getting the power failure comparator configuration. More... | |
NRF_STATIC_INLINE void | nrf_regulators_pofcon_vddh_set (NRF_REGULATORS_Type *p_reg, nrf_regulators_pof_thrvddh_t thr) |
Function for setting the VDDH power failure comparator threshold. More... | |
NRF_STATIC_INLINE nrf_regulators_pof_thrvddh_t | nrf_regulators_pofcon_vddh_get (NRF_REGULATORS_Type const *p_reg) |
Function for getting the VDDH regulators failure comparator threshold. More... | |
NRF_STATIC_INLINE void | nrf_regulators_dcdcen_vddh_set (NRF_REGULATORS_Type *p_reg, bool enable) |
Function for enabling or disabling the high voltage regulator. More... | |
NRF_STATIC_INLINE void | nrf_regulators_dcdcen_radio_set (NRF_REGULATORS_Type *p_reg, bool enable) |
Function for enabling or disabling the radio regulator. More... | |
Hardware access layer for managing the REGULATORS peripheral.
Power failure comparator thresholds.
Power failure comparator thresholds for VDDH.
NRF_STATIC_INLINE void nrf_regulators_dcdcen_radio_set | ( | NRF_REGULATORS_Type * | p_reg, |
bool | enable | ||
) |
Function for enabling or disabling the radio regulator.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | enable | True if the radio regulator is to be enabled, false otherwise. |
NRF_STATIC_INLINE void nrf_regulators_dcdcen_set | ( | NRF_REGULATORS_Type * | p_reg, |
bool | enable | ||
) |
Function for enabling or disabling DCDC converter.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | enable | True if DCDC converter is to be enabled, false otherwise. |
NRF_STATIC_INLINE void nrf_regulators_dcdcen_vddh_set | ( | NRF_REGULATORS_Type * | p_reg, |
bool | enable | ||
) |
Function for enabling or disabling the high voltage regulator.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | enable | True if the high voltage regulator is to be enabled, false otherwise. |
NRF_STATIC_INLINE nrf_regulators_mainregstatus_t nrf_regulators_mainregstatus_get | ( | NRF_REGULATORS_Type const * | p_reg | ) |
Function for getting the main supply status.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE nrf_regulators_pof_thr_t nrf_regulators_pofcon_get | ( | NRF_REGULATORS_Type const * | p_reg, |
bool * | p_enabled | ||
) |
Function for getting the power failure comparator configuration.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[out] | p_enabled | Function sets this boolean variable to true if power failure comparator is enabled. The pointer can be NULL if we do not need this information. |
NRF_STATIC_INLINE void nrf_regulators_pofcon_set | ( | NRF_REGULATORS_Type * | p_reg, |
bool | enable, | ||
nrf_regulators_pof_thr_t | thr | ||
) |
Function for setting the power failure comparator configuration.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | enable | True if power failure comparator is to be enabled, false otherwise. |
[in] | thr | Voltage threshold value. |
NRF_STATIC_INLINE nrf_regulators_pof_thrvddh_t nrf_regulators_pofcon_vddh_get | ( | NRF_REGULATORS_Type const * | p_reg | ) |
Function for getting the VDDH regulators failure comparator threshold.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_regulators_pofcon_vddh_set | ( | NRF_REGULATORS_Type * | p_reg, |
nrf_regulators_pof_thrvddh_t | thr | ||
) |
Function for setting the VDDH power failure comparator threshold.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | thr | Threshold to be set. |
NRF_STATIC_INLINE void nrf_regulators_system_off | ( | NRF_REGULATORS_Type * | p_reg | ) |
Function for putting CPU in system OFF mode.
This function puts the CPU into system off mode. The only way to wake up the CPU is by reset.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |