Intel® Quark™ Microcontroller Software Interface
1.4.0
Intel® Quark™ Microcontroller BSP
|
I2S. More...
Data Structures | |
struct | qm_i2s_buffer_link |
Ring buffer link definition. More... | |
struct | qm_i2s_channel_cfg_data_t |
I2S controller configuration. More... | |
struct | qm_i2s_clock_cfg_data_t |
I2S Clock Configuration. More... | |
Typedefs | |
typedef struct qm_i2s_buffer_link | qm_i2s_buffer_link_t |
Ring buffer link definition. | |
Functions | |
int | qm_i2s_dma_channel_config (const qm_i2s_t i2s, const qm_i2s_audio_stream_t audio_stream, const qm_i2s_channel_cfg_data_t *const config) |
Function to configure specified I2S controller stream Configuration parameters must be valid or an error is returned - see return values below. More... | |
int | qm_i2s_channel_disable (const qm_i2s_t i2s, const qm_i2s_audio_stream_t audio_stream) |
Function to place I2S controller into a disabled state. More... | |
int | qm_i2s_set_clock_config (const qm_i2s_t i2s, const qm_i2s_clock_cfg_data_t *const i2s_clk_cfg) |
Function to configure and enable I2S clocks Configuration parameters must be valid or an error is returned - see return values below. More... | |
int | qm_i2s_dma_transfer (const qm_i2s_t i2s, const qm_i2s_audio_stream_t audio_stream) |
Function to transmit a block of data to the specified I2S channel. More... | |
int | qm_i2s_dma_transfer_terminate (const qm_i2s_t i2s, qm_i2s_channel_cfg_data_t *const config) |
Terminate the current DMA transfer on the given I2S peripheral channel. More... | |
I2S.
enum qm_i2s_audio_rate_t |
I2S Audio rates available.
enum qm_i2s_buffer_mode_t |
enum qm_i2s_clk_src_t |
I2S Audio sample resolution.
Resolution ranges between 12 bits and 32 bits.
enum qm_i2s_status_t |
I2S status type.
int qm_i2s_channel_disable | ( | const qm_i2s_t | i2s, |
const qm_i2s_audio_stream_t | audio_stream | ||
) |
Function to place I2S controller into a disabled state.
This function assumes that there is no pending transaction on the I2S interface in question. It is the responsibility of the calling application to do so.
[in] | i2s | I2S controller identifier |
[in] | audio_stream | I2S audio_stream identifier |
0 | on success. |
Negative | errno for possible error codes. |
int qm_i2s_dma_channel_config | ( | const qm_i2s_t | i2s, |
const qm_i2s_audio_stream_t | audio_stream, | ||
const qm_i2s_channel_cfg_data_t *const | config | ||
) |
Function to configure specified I2S controller stream Configuration parameters must be valid or an error is returned - see return values below.
[in] | i2s | I2S controller identifier |
[in] | audio_stream | I2S audio_stream identifier |
[in] | config | Pointer to configuration structure |
0 | on success. |
Negative | errno for possible error codes. |
int qm_i2s_dma_transfer | ( | const qm_i2s_t | i2s, |
const qm_i2s_audio_stream_t | audio_stream | ||
) |
Function to transmit a block of data to the specified I2S channel.
[in] | i2s | I2S controller identifier |
[in] | audio_stream | I2S audio_stream identifier |
0 | on success. |
Negative | errno for possible error codes. |
int qm_i2s_dma_transfer_terminate | ( | const qm_i2s_t | i2s, |
qm_i2s_channel_cfg_data_t *const | config | ||
) |
Terminate the current DMA transfer on the given I2S peripheral channel.
Terminate the current DMA transfer on the I2S channel. This will cause the relevant callbacks to be invoked.
In the case the user is doing a continuous transfer using a circular linked list, it might be useful to fine control at which point in the linked list that we stop the transfer. To do this, set the relevant linked list item's "next" item to NULL.
[in] | i2s | I2S controller identifier |
[in] | config | Pointer to configuration structure |
0 | on success. |
Negative | errno for possible error codes. |
int qm_i2s_set_clock_config | ( | const qm_i2s_t | i2s, |
const qm_i2s_clock_cfg_data_t *const | i2s_clk_cfg | ||
) |
Function to configure and enable I2S clocks Configuration parameters must be valid or an error is returned - see return values below.
[in] | i2s | I2S controller identifier |
[in] | i2s_clk_cfg | I2S Clock configuration |
0 | on success. |
Negative | errno for possible error codes. |