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

HFCLKAUDIO peripheral 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 nrfx_clock module.
 
void nrfx_clock_hfclkaudio_uninit (void)
 Function for uninitializing the hfclkaudio module.
 
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 peripheral 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 nrfx_clock module.

After initialization, the module 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_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 clock domain is running.
falseThe clock domain is not running.