123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- #ifndef NRF_REGULATORS_H__
- #define NRF_REGULATORS_H__
- #include <nrfx.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- __STATIC_INLINE void nrf_regulators_dcdcen_set(NRF_REGULATORS_Type * p_reg, bool enable);
- __STATIC_INLINE void nrf_regulators_system_off(NRF_REGULATORS_Type * p_reg);
- #ifndef SUPPRESS_INLINE_IMPLEMENTATION
- __STATIC_INLINE void nrf_regulators_dcdcen_set(NRF_REGULATORS_Type * p_reg, bool enable)
- {
- p_reg->DCDCEN = (enable ? REGULATORS_DCDCEN_DCDCEN_Msk : 0);
- }
- __STATIC_INLINE void nrf_regulators_system_off(NRF_REGULATORS_Type * p_reg)
- {
- p_reg->SYSTEMOFF = REGULATORS_SYSTEMOFF_SYSTEMOFF_Msk;
- __DSB();
-
- while (true)
- {
- __WFE();
- }
- }
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif
|