CLOCK peripheral driver.
More...
CLOCK peripheral driver.
Clock event handler.
- Parameters
-
Clock events.
Enumerator |
---|
NRFX_CLOCK_EVT_HFCLK_STARTED |
HFCLK has been started.
|
NRFX_CLOCK_EVT_LFCLK_STARTED |
LFCLK has been started.
|
NRFX_CLOCK_EVT_CTTO |
Calibration timeout.
|
NRFX_CLOCK_EVT_CAL_DONE |
Calibration has been done.
|
Function for starting the 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.
- Return values
-
NRFX_SUCCESS | The procedure is successful. |
NRFX_ERROR_INVALID_STATE | The low-frequency of high-frequency clock is off. |
NRFX_ERROR_BUSY | Clock is in the calibration phase. |
void nrfx_clock_calibration_timer_start |
( |
uint8_t |
interval | ) |
|
Function for starting calibration timer.
- Parameters
-
[in] | 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.
- Return values
-
true | The HFCLK is running (XTAL source). |
false | The HFCLK is not running. |
Function for initializing internal structures in the nrfx_clock module.
After initialization, the module is in power off state (clocks are not started).
- Parameters
-
[in] | event_handler | Event handler provided by the user. Must not be NULL. |
- Return values
-
NRFX_SUCCESS | The procedure is successful. |
NRFX_ERROR_ALREADY_INITIALIZED | The driver is already initialized. |
Function for checking if calibration is in progress.
This function indicates that the system is in calibration phase.
- Return values
-
NRFX_SUCCESS | The procedure is successful. |
NRFX_ERROR_BUSY | Clock is in the calibration phase. |
__STATIC_INLINE bool nrfx_clock_lfclk_is_running |
( |
void |
| ) |
|
Function for checking the LFCLK state.
- Return values
-
true | The LFCLK is running. |
false | The LFCLK is not running. |
Function for returning a requested event address for the clock driver module.
- Parameters
-
[in] | event | One of the peripheral events. |
- Returns
- Event address.
Function for returning a requested task address for the clock driver module.
- Parameters
-
[in] | task | One of the peripheral tasks. |
- Returns
- Task address.