|
oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
|
Hardware Abstraction Layer for I2S / SAI bus operations. More...
Functions | |
| int | ove_hal_i2s_open (ove_i2s_t i2s, const struct ove_i2s_cfg *cfg) |
| Configure and enable the I2S / SAI peripheral. | |
| void | ove_hal_i2s_close (ove_i2s_t i2s) |
| Disable the I2S peripheral and release DMA resources. | |
| int | ove_hal_i2s_start (ove_i2s_t i2s) |
| Start circular DMA streaming. | |
| int | ove_hal_i2s_stop (ove_i2s_t i2s) |
| Stop DMA streaming. | |
| int | ove_hal_i2s_pause (ove_i2s_t i2s) |
| Pause DMA (can be resumed without reconfiguration). | |
| int | ove_hal_i2s_resume (ove_i2s_t i2s) |
| Resume DMA after pause. | |
Hardware Abstraction Layer for I2S / SAI bus operations.
The HAL configures the I2S peripheral and manages DMA streaming. Codec initialisation is NOT part of this interface — it is board-specific and done separately via I2C.
GPIO and clock setup is handled by MCU HAL weak callbacks (e.g. HAL_SAI_MspInit on STM32) provided by the board BSP.
DMA half/full-complete ISRs must call the portable helpers: ove_i2s_rx_half_cplt_isr(), ove_i2s_rx_cplt_isr() ove_i2s_tx_half_cplt_isr(), ove_i2s_tx_cplt_isr()
| int ove_hal_i2s_open | ( | ove_i2s_t | i2s, |
| const struct ove_i2s_cfg * | cfg | ||
| ) |
Configure and enable the I2S / SAI peripheral.
Maps the instance index to hardware, configures sample rate and framing, and sets up DMA channels. Does NOT start streaming.
| [in] | i2s | I2S handle with storage already assigned. |
| [in] | cfg | Configuration descriptor. |
| int ove_hal_i2s_start | ( | ove_i2s_t | i2s | ) |
Start circular DMA streaming.
TX starts first (generates clocks for synchronous RX slave).