![]() |
nrfx 4.5.0
|
Hardware access layer for managing the Low Frequency Crystal Oscillator (LFXO). More...
Data Structures | |
| struct | nrf_lfxo_status_t |
| LFXO status. More... | |
| struct | nrf_lfxo_amplitude_ctrl_t |
| Amplitude control. More... | |
Macros | |
| #define | NRF_LFXO_HAS_STATUSANA 1 |
| Symbol indicating whether the STATUSANA register is present. | |
| #define | NRF_LFXO_HAS_EVENT_STARTED 1 |
| Symbol indicating whether the STARTED event is present. | |
Enumerations | |
| enum | nrf_lfxo_event_t { NRF_LFXO_EVENT_MODECHANGED = offsetof(NRF_LFXO_Type, EVENTS_MODECHANGED) , NRF_LFXO_EVENT_ERRORSTARTING = offsetof(NRF_LFXO_Type, EVENTS_ERRORSTARTING) , NRF_LFXO_EVENT_ERRORRUNNING = offsetof(NRF_LFXO_Type, EVENTS_ERRORRUNNING) , NRF_LFXO_EVENT_STARTED = offsetof(NRF_LFXO_Type, EVENTS_STARTED) } |
| LFXO events. More... | |
| enum | nrf_lfxo_int_mask_t { NRF_LFXO_INT_MODECHANGED_MASK = LFXO_INTENSET_MODECHANGED_Msk , NRF_LFXO_INT_ERRORSTARTING_MASK = LFXO_INTENSET_ERRORSTARTING_Msk , NRF_LFXO_INT_ERRORRUNNING_MASK = LFXO_INTENSET_ERRORRUNNING_Msk , NRF_LFXO_INT_STARTED_MASK = LFXO_INTENSET_STARTED_Msk } |
| LFXO interrupts. More... | |
| enum | nrf_lfxo_oscillator_mode_t { NRF_LFXO_OSCILLATOR_MODE_PIERCE = LFXO_STATUS_MODE_Pierce , NRF_LFXO_OSCILLATOR_MODE_PIXO = LFXO_STATUS_MODE_Pixo , NRF_LFXO_OSCILLATOR_MODE_EXTSINE = LFXO_STATUS_MODE_ExternalSine , NRF_LFXO_OSCILLATOR_MODE_EXTSQ = LFXO_STATUS_MODE_ExternalSquare } |
| LFXO modes. More... | |
| enum | nrf_lfxo_power_control_t { NRF_LFXO_POWER_CONTROL_AUTO = LFXO_PWRUPCTRL_CTRL_Auto , NRF_LFXO_POWER_CONTROL_POWER_UP = LFXO_PWRUPCTRL_CTRL_PowerUp , NRF_LFXO_POWER_CONTROL_POWER_DOWN = LFXO_PWRUPCTRL_CTRL_PowerDown } |
| Power up control. More... | |
Functions | |
| NRF_STATIC_INLINE uint32_t | nrf_lfxo_event_address_get (NRF_LFXO_Type const *p_reg, nrf_lfxo_event_t event) |
| Function for retrieving the address of the specified event. | |
| NRF_STATIC_INLINE void | nrf_lfxo_event_clear (NRF_LFXO_Type *p_reg, nrf_lfxo_event_t event) |
| Function for clearing the specified event. | |
| NRF_STATIC_INLINE bool | nrf_lfxo_event_check (NRF_LFXO_Type const *p_reg, nrf_lfxo_event_t event) |
| Function for retrieving the state of the specified event. | |
| NRF_STATIC_INLINE void | nrf_lfxo_int_enable (NRF_LFXO_Type *p_reg, uint32_t mask) |
| Function for enabling the specified interrupt. | |
| NRF_STATIC_INLINE void | nrf_lfxo_int_disable (NRF_LFXO_Type *p_reg, uint32_t mask) |
| Function for disabling the specified interrupt. | |
| NRF_STATIC_INLINE uint32_t | nrf_lfxo_int_enable_check (NRF_LFXO_Type const *p_reg, uint32_t mask) |
| Function for checking if the specified interrupts are enabled. | |
| NRF_STATIC_INLINE uint32_t | nrf_lfxo_int_pending_get (NRF_LFXO_Type const *p_reg) |
| Function for retrieving the state of pending interrupts. | |
| NRF_STATIC_INLINE void | nrf_lfxo_status_get (NRF_LFXO_Type const *p_reg, nrf_lfxo_status_t *p_status) |
| Function for getting LFXO status. | |
| NRF_STATIC_INLINE bool | nrf_lfxo_statusana_ready_check (NRF_LFXO_Type const *p_reg) |
| Function for checking status of analog module READY signal. | |
| NRF_STATIC_INLINE bool | nrf_lfxo_statusana_settled_check (NRF_LFXO_Type const *p_reg) |
| Function for checking status of analog module SETTLED signal. | |
| NRF_STATIC_INLINE uint8_t | nrf_lfxo_cload_get (NRF_LFXO_Type const *p_reg) |
| Function for getting internal capacitive load value. | |
| NRF_STATIC_INLINE void | nrf_lfxo_cload_set (NRF_LFXO_Type *p_reg, uint8_t cap) |
| Function for setting internal capacitive load value. | |
| NRF_STATIC_INLINE void | nrf_lfxo_amplitude_control_get (NRF_LFXO_Type const *p_reg, nrf_lfxo_amplitude_ctrl_t *p_ctrl) |
| Function for getting amplitude control configuration. | |
| NRF_STATIC_INLINE void | nrf_lfxo_amplitude_control_set (NRF_LFXO_Type *p_reg, nrf_lfxo_amplitude_ctrl_t *p_ctrl) |
| Function for setting amplitude control configuration. | |
| NRF_STATIC_INLINE void | nrf_lfxo_power_control_set (NRF_LFXO_Type *p_reg, nrf_lfxo_power_control_t pwrctrl) |
| Function for power control set. | |
| NRF_STATIC_INLINE void | nrf_lfxo_mode_set (NRF_LFXO_Type *p_reg, nrf_lfxo_oscillator_mode_t oscmode, bool hpmode) |
| Function setting LFXO mode. | |
Hardware access layer for managing the Low Frequency Crystal Oscillator (LFXO).
| enum nrf_lfxo_event_t |
| enum nrf_lfxo_int_mask_t |
| NRF_STATIC_INLINE void nrf_lfxo_amplitude_control_get | ( | NRF_LFXO_Type const * | p_reg, |
| nrf_lfxo_amplitude_ctrl_t * | p_ctrl ) |
Function for getting amplitude control configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_ctrl | Pointer to the structure to be filled with amplitude control configuration. |
| NRF_STATIC_INLINE void nrf_lfxo_amplitude_control_set | ( | NRF_LFXO_Type * | p_reg, |
| nrf_lfxo_amplitude_ctrl_t * | p_ctrl ) |
Function for setting amplitude control configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_ctrl | Pointer to the structure with amplitude control configuration. |
| NRF_STATIC_INLINE uint8_t nrf_lfxo_cload_get | ( | NRF_LFXO_Type const * | p_reg | ) |
Function for getting internal capacitive load value.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_lfxo_cload_set | ( | NRF_LFXO_Type * | p_reg, |
| uint8_t | cap ) |
Function for setting internal capacitive load value.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cap | Capacitance value in pF, resolution: 1pF. |
| NRF_STATIC_INLINE uint32_t nrf_lfxo_event_address_get | ( | NRF_LFXO_Type const * | p_reg, |
| nrf_lfxo_event_t | event ) |
Function for retrieving the address of the specified event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | LFXO Event. |
| NRF_STATIC_INLINE bool nrf_lfxo_event_check | ( | NRF_LFXO_Type const * | p_reg, |
| nrf_lfxo_event_t | event ) |
Function for retrieving the state of the specified event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to be checked. |
| true | The event has been generated. |
| false | The event has not been generated. |
| NRF_STATIC_INLINE void nrf_lfxo_event_clear | ( | NRF_LFXO_Type * | p_reg, |
| nrf_lfxo_event_t | event ) |
Function for clearing the specified event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to clear. |
| NRF_STATIC_INLINE void nrf_lfxo_int_disable | ( | NRF_LFXO_Type * | p_reg, |
| uint32_t | mask ) |
Function for disabling the specified interrupt.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be disabled. Use nrf_lfxo_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE void nrf_lfxo_int_enable | ( | NRF_LFXO_Type * | p_reg, |
| uint32_t | mask ) |
Function for enabling the specified interrupt.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be enabled. Use nrf_lfxo_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_lfxo_int_enable_check | ( | NRF_LFXO_Type const * | p_reg, |
| uint32_t | mask ) |
Function for checking if the specified interrupts are enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be checked. Use nrf_lfxo_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_lfxo_int_pending_get | ( | NRF_LFXO_Type const * | p_reg | ) |
Function for retrieving the state of pending interrupts.
States of pending interrupt are saved as a bitmask. One set at particular position means that interrupt for event is pending.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_lfxo_mode_set | ( | NRF_LFXO_Type * | p_reg, |
| nrf_lfxo_oscillator_mode_t | oscmode, | ||
| bool | hpmode ) |
Function setting LFXO mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | oscmode | Oscillator mode. |
| [in] | hpmode | High performance mode enable. |
| NRF_STATIC_INLINE void nrf_lfxo_power_control_set | ( | NRF_LFXO_Type * | p_reg, |
| nrf_lfxo_power_control_t | pwrctrl ) |
Function for power control set.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | pwrctrl | Power up control. |
| NRF_STATIC_INLINE void nrf_lfxo_status_get | ( | NRF_LFXO_Type const * | p_reg, |
| nrf_lfxo_status_t * | p_status ) |
Function for getting LFXO status.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [out] | p_status | Pointer to the structure to be filled with LFXO status. |
| NRF_STATIC_INLINE bool nrf_lfxo_statusana_ready_check | ( | NRF_LFXO_Type const * | p_reg | ) |
Function for checking status of analog module READY signal.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The signal is logic 1. |
| false | The signal is logic 0. |
| NRF_STATIC_INLINE bool nrf_lfxo_statusana_settled_check | ( | NRF_LFXO_Type const * | p_reg | ) |
Function for checking status of analog module SETTLED signal.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The signal is logic 1. |
| false | The signal is logic 0. |