CLOCK peripheral driver. More...
Modules | |
CLOCK peripheral driver configuration | |
Typedefs | |
typedef void(* | nrfx_clock_event_handler_t )(nrfx_clock_evt_type_t event) |
Clock event handler. More... | |
Enumerations | |
enum | nrfx_clock_evt_type_t { NRFX_CLOCK_EVT_HFCLK_STARTED, NRFX_CLOCK_EVT_LFCLK_STARTED, NRFX_CLOCK_EVT_CTTO, NRFX_CLOCK_EVT_CAL_DONE } |
Clock events. More... | |
Functions | |
nrfx_err_t | nrfx_clock_init (nrfx_clock_event_handler_t event_handler) |
Function for initializing internal structures in the nrfx_clock module. More... | |
void | nrfx_clock_enable (void) |
Function for enabling interrupts in the clock module. | |
void | nrfx_clock_disable (void) |
Function for disabling interrupts in the clock module. | |
void | nrfx_clock_uninit (void) |
Function for uninitializing the clock module. | |
void | nrfx_clock_lfclk_start (void) |
Function for starting the LFCLK. | |
void | nrfx_clock_lfclk_stop (void) |
Function for stoping the LFCLK. | |
__STATIC_INLINE bool | nrfx_clock_lfclk_is_running (void) |
Function for checking the LFCLK state. More... | |
void | nrfx_clock_hfclk_start (void) |
Function for starting the high-accuracy source HFCLK. | |
void | nrfx_clock_hfclk_stop (void) |
Function for stoping external high-accuracy source HFCLK. | |
__STATIC_INLINE bool | nrfx_clock_hfclk_is_running (void) |
Function for checking the HFCLK state. More... | |
nrfx_err_t | nrfx_clock_calibration_start (void) |
Function for starting calibration of internal LFCLK. More... | |
nrfx_err_t | nrfx_clock_is_calibrating (void) |
Function for checking if calibration is in progress. More... | |
void | nrfx_clock_calibration_timer_start (uint8_t interval) |
Function for starting calibration timer. More... | |
void | nrfx_clock_calibration_timer_stop (void) |
Function for stoping calibration timer. | |
__STATIC_INLINE uint32_t | nrfx_clock_ppi_task_addr (nrf_clock_task_t task) |
Function for returning a requested task address for the clock driver module. More... | |
__STATIC_INLINE uint32_t | nrfx_clock_ppi_event_addr (nrf_clock_event_t event) |
Function for returning a requested event address for the clock driver module. More... | |
void | nrfx_clock_irq_handler (void) |
CLOCK peripheral driver.
typedef void(* nrfx_clock_event_handler_t)(nrfx_clock_evt_type_t event) |
Clock event handler.
[in] | event | Event. |
nrfx_err_t nrfx_clock_calibration_start | ( | void | ) |
Function for starting calibration of internal LFCLK.
This function starts the calibration process. The process cannot be aborted. LFCLK and HFCLK must be running before this function is called.
NRFX_SUCCESS | If the procedure was successful. |
NRFX_ERROR_INVALID_STATE | If the low-frequency of high-frequency clock is off. |
NRFX_ERROR_BUSY | If calibration is in progress. |
void nrfx_clock_calibration_timer_start | ( | uint8_t | interval | ) |
Function for starting calibration timer.
interval | Time after which the CTTO event and interrupt will be generated (in 0.25 s units). |
__STATIC_INLINE bool nrfx_clock_hfclk_is_running | ( | void | ) |
Function for checking the HFCLK state.
true | If the HFCLK is running (XTAL source). |
false | If the HFCLK is not running. |
nrfx_err_t nrfx_clock_init | ( | nrfx_clock_event_handler_t | event_handler | ) |
Function for initializing internal structures in the nrfx_clock module.
After initialization, the module is in power off state (clocks are not started).
[in] | event_handler | Event handler provided by the user. Must not be NULL. |
NRFX_SUCCESS | If the procedure was successful. |
NRFX_ERROR_ALREADY_INITIALIZED | If the driver was already initialized. |
nrfx_err_t nrfx_clock_is_calibrating | ( | void | ) |
Function for checking if calibration is in progress.
This function indicates that the system is in calibration phase.
NRFX_SUCCESS | If the procedure was successful. |
NRFX_ERROR_BUSY | If calibration is in progress. |
__STATIC_INLINE bool nrfx_clock_lfclk_is_running | ( | void | ) |
Function for checking the LFCLK state.
true | If the LFCLK is running. |
false | If the LFCLK is not running. |
__STATIC_INLINE uint32_t nrfx_clock_ppi_event_addr | ( | nrf_clock_event_t | event | ) |
Function for returning a requested event address for the clock driver module.
[in] | event | One of the peripheral events. |
__STATIC_INLINE uint32_t nrfx_clock_ppi_task_addr | ( | nrf_clock_task_t | task | ) |
Function for returning a requested task address for the clock driver module.
[in] | task | One of the peripheral tasks. |