nrfx 4.5.0
Loading...
Searching...
No Matches

LFRC clock driver. More...

Macros

#define NRFX_CLOCK_LFRC_EVT_OFFSET   32
 Symbol specifying driver event offset for LFRC hardware events.

Typedefs

typedef void(* nrfx_clock_lfrc_event_handler_t) (nrfx_clock_lfrc_evt_type_t event)
 LFRC event handler.

Enumerations

enum  nrfx_clock_lfrc_evt_type_t { NRFX_CLOCK_LFRC_EVT_CAL_DONE }
 Clock events. More...

Functions

int nrfx_clock_lfrc_init (nrfx_clock_lfrc_event_handler_t event_handler)
 Function for initializing internal structures in the nrfx_clock_lfrc driver.
void nrfx_clock_lfrc_uninit (void)
 Function for uninitializing the LFRC driver.
bool nrfx_clock_lfrc_init_check (void)
 Function for checking if the LFRC driver is initialized.
int nrfx_clock_lfrc_calibration_start (void)
 Function for starting the calibration of internal LFRC.
int nrfx_clock_lfrc_calibrating_check (void)
 Function for checking if calibration is in progress.
void nrfx_clock_lfrc_irq_handler (void)
 LFRC interrupt handler.

Detailed Description

LFRC clock driver.

Typedef Documentation

◆ nrfx_clock_lfrc_event_handler_t

typedef void(* nrfx_clock_lfrc_event_handler_t) (nrfx_clock_lfrc_evt_type_t event)

LFRC event handler.

Parameters
[in]eventEvent.

Enumeration Type Documentation

◆ nrfx_clock_lfrc_evt_type_t

Clock events.

Enumerator
NRFX_CLOCK_LFRC_EVT_CAL_DONE 

Calibration has been done.

Function Documentation

◆ nrfx_clock_lfrc_calibrating_check()

int nrfx_clock_lfrc_calibrating_check ( void )

Function for checking if calibration is in progress.

This function indicates that the system is in calibration phase.

Return values
0The procedure is successful.
-EBUSYClock is in the calibration phase.

◆ nrfx_clock_lfrc_calibration_start()

int nrfx_clock_lfrc_calibration_start ( void )

Function for starting the calibration of internal LFRC.

This function starts the calibration process. The process cannot be aborted. LFRC and high-frequency clock must be running before this function is called.

Return values
0The procedure is successful.
-EINPROGRESSThe low-frequency or high-frequency clock is off.
-EBUSYClock is in the calibration phase.

◆ nrfx_clock_lfrc_init()

int nrfx_clock_lfrc_init ( nrfx_clock_lfrc_event_handler_t event_handler)

Function for initializing internal structures in the nrfx_clock_lfrc driver.

After initialization, the driver is in power off state (clocks are not started).

Parameters
[in]event_handlerEvent handler provided by the user. If not provided, driver works in blocking mode.
Return values
0The procedure is successful.
-EALREADYThe driver is already initialized.

◆ nrfx_clock_lfrc_init_check()

bool nrfx_clock_lfrc_init_check ( void )

Function for checking if the LFRC driver is initialized.

Return values
trueDriver is already initialized.
falseDriver is not initialized.