![]() |
nRF Connect SDK API 3.3.99
|
Audio I2S interface API for Audio applications. More...
Macros | |
| #define | FRAME_SIZE_BYTES ((CONFIG_I2S_LRCK_FREQ_HZ / 1000 * 10) * CONFIG_I2S_CH_NUM * CONFIG_AUDIO_BIT_DEPTH_OCTETS) |
| Calculate frame size in bytes based on audio configuration. | |
| #define | FRAME_SIZE_MONO_BYTES (FRAME_SIZE_BYTES / CONFIG_I2S_CH_NUM) |
| #define | BLOCK_SIZE_BYTES (FRAME_SIZE_BYTES / CONFIG_FIFO_FRAME_SPLIT_NUM) |
| #define | I2S_SAMPLES_NUM (BLOCK_SIZE_BYTES / (CONFIG_AUDIO_BIT_DEPTH_OCTETS) / (32 / CONFIG_AUDIO_BIT_DEPTH_BITS)) |
| Calculate number of samples per I2S block. | |
Typedefs | |
| typedef void(* | i2s_blk_comp_callback_t) (uint32_t frame_start_ts, uint32_t *rx_buf_released, uint32_t const *tx_buf_released) |
| I2S block complete event callback type. | |
Functions | |
| void | audio_i2s_set_next_buf (const uint8_t *tx_buf, uint32_t *rx_buf) |
| Supply the buffers to be used in the next part of the I2S transfer. | |
| void | audio_i2s_start (const uint8_t *tx_buf, uint32_t *rx_buf) |
| Start the continuous I2S transfer. | |
| void | audio_i2s_stop (void) |
| Stop the continuous I2S transfer. | |
| void | audio_i2s_blk_comp_cb_register (i2s_blk_comp_callback_t blk_comp_callback) |
| Register callback function for I2S block complete event. | |
| void | audio_i2s_init (void) |
| Initialize I2S module. | |
Audio I2S interface API for Audio applications.
This module provides the I2S (Inter-IC Sound) interface for audio data transfer between the application and external audio hardware.