oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
I2S

I2S / SAI audio bus driver. More...

Data Structures

struct  ove_i2s_cfg
 I2S bus configuration descriptor. More...
 

Typedefs

typedef void(* ove_i2s_cb_t) (ove_i2s_t i2s, void *user_data)
 I2S half-buffer completion callback.
 

Enumerations

enum  ove_i2s_dir_t { OVE_I2S_DIR_TX = 0x01 , OVE_I2S_DIR_RX = 0x02 , OVE_I2S_DIR_TXRX = 0x03 }
 I2S stream direction. More...
 

Functions

static int ove_i2s_create (ove_i2s_t *i, const struct ove_i2s_cfg *c)
 
static void ove_i2s_destroy (ove_i2s_t i)
 
static int ove_i2s_set_rx_callback (ove_i2s_t i, ove_i2s_cb_t cb, void *ud)
 
static int ove_i2s_set_tx_callback (ove_i2s_t i, ove_i2s_cb_t cb, void *ud)
 
static int ove_i2s_start (ove_i2s_t i)
 
static int ove_i2s_stop (ove_i2s_t i)
 
static int ove_i2s_pause (ove_i2s_t i)
 
static int ove_i2s_resume (ove_i2s_t i)
 
static void * ove_i2s_rx_buf (ove_i2s_t i)
 
static void * ove_i2s_tx_buf (ove_i2s_t i)
 
static size_t ove_i2s_half_buf_size (ove_i2s_t i)
 

Detailed Description

I2S / SAI audio bus driver.

Provides a portable I2S master driver for DMA-based audio streaming with double-buffered (ping-pong) operation. The driver delivers half-buffer completion callbacks from ISR context, enabling real-time audio processing.

The codec connected to the I2S bus is NOT initialised by this driver; codec setup is board-specific and must be done separately (e.g. via I2C register writes in the board BSP).

Note
Requires CONFIG_OVE_I2S.

Typedef Documentation

◆ ove_i2s_cb_t

typedef void(* ove_i2s_cb_t) (ove_i2s_t i2s, void *user_data)

I2S half-buffer completion callback.

Called from ISR context when a DMA half-transfer or full-transfer completes. The callback should be short — typically it unblocks a processing task.

Parameters
[in]i2sI2S handle.
[in]user_dataOpaque pointer supplied at registration time.

Enumeration Type Documentation

◆ ove_i2s_dir_t

I2S stream direction.

Enumerator
OVE_I2S_DIR_TX 

Transmit only (playback).

OVE_I2S_DIR_RX 

Receive only (capture).

OVE_I2S_DIR_TXRX 

Full-duplex (simultaneous TX + RX).