nrfx 4.5.0
Loading...
Searching...
No Matches
HFCLKAUDIO driver

HFCLKAUDIO clock driver. More...

Macros

#define NRFX_CLOCK_HFCLKAUDIO_EVT_HFCLKAUDIO_STARTED    NRFX_BITMASK_TO_BITPOS(NRF_CLOCK_INT_HFAUDIO_STARTED_MASK)
 HFCLKAUDIO started event.

Typedefs

typedef void(* nrfx_clock_hfclkaudio_event_handler_t) (void)
 Clock event handler.

Functions

int nrfx_clock_hfclkaudio_init (nrfx_clock_hfclkaudio_event_handler_t event_handler)
 Function for initializing internal structures in the HFCLKAUDIO driver.
void nrfx_clock_hfclkaudio_uninit (void)
 Function for uninitializing the HFCLKAUDIO driver.
bool nrfx_clock_hfclkaudio_init_check (void)
 Function for checking if the HFCLKAUDIO driver is initialized.
void nrfx_clock_hfclkaudio_start (void)
 Function for starting the HFCLKAUDIO clock.
void nrfx_clock_hfclkaudio_stop (void)
 Function for stopping the HFCLKAUDIO clock.
NRFX_STATIC_INLINE bool nrfx_clock_hfclkaudio_running_check (void)
 Function for checking the specified HFCLKAUDIO clock.
NRFX_STATIC_INLINE void nrfx_clock_hfclkaudio_config_set (uint16_t freq_value)
 Function for setting the HFCLKAUDIO configuration.
NRFX_STATIC_INLINE uint16_t nrfx_clock_hfclkaudio_config_get (void)
 Function for getting the HFCLKAUDIO configuration.
void nrfx_clock_hfclkaudio_irq_handler (void)
 HFCLKAUDIO interrupt handler.

Detailed Description

HFCLKAUDIO clock driver.

Function Documentation

◆ nrfx_clock_hfclkaudio_config_get()

NRFX_STATIC_INLINE uint16_t nrfx_clock_hfclkaudio_config_get ( void )

Function for getting the HFCLKAUDIO configuration.

The frequency of HFCLKAUDIO ranges from 10.666 MHz to 13.333 MHz in 40.7 Hz steps. To calculate frequency corresponding to the returned FREQ_VALUE, use the following equation: f_out = 32M * (4 + FREQ_VALUE * 2^(-16))/12

Returns
Current value of FREQ_VALUE for HFCLKAUDIO.

◆ nrfx_clock_hfclkaudio_config_set()

NRFX_STATIC_INLINE void nrfx_clock_hfclkaudio_config_set ( uint16_t freq_value)

Function for setting the HFCLKAUDIO configuration.

The frequency of HFCLKAUDIO ranges from 10.666 MHz to 13.333 MHz in 40.7 Hz steps. To calculate freq_value corresponding to the chosen frequency, use the following equation: FREQ_VALUE = 2^16 * ((12 * f_out / 32M) - 4)

Warning
Chosen frequency must fit in 11.176 MHz - 11.402 MHz or 12.165 MHz - 12.411 MHz frequency bands.
Parameters
[in]freq_valueNew FREQ_VALUE for HFCLKAUDIO.

◆ nrfx_clock_hfclkaudio_init()

int nrfx_clock_hfclkaudio_init ( nrfx_clock_hfclkaudio_event_handler_t event_handler)

Function for initializing internal structures in the HFCLKAUDIO driver.

After initialization, the HFCLKAUDIO driver is in power off state (clock is 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_hfclkaudio_init_check()

bool nrfx_clock_hfclkaudio_init_check ( void )

Function for checking if the HFCLKAUDIO driver is initialized.

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

◆ nrfx_clock_hfclkaudio_running_check()

NRFX_STATIC_INLINE bool nrfx_clock_hfclkaudio_running_check ( void )

Function for checking the specified HFCLKAUDIO clock.

Return values
trueThe HFCLKAUDIO clock is running.
falseThe HFCLKAUDIO clock is not running.