Enumerated types for I2S driver. More...
Enumerations | |
| enum | i2s_status_en { I2S_OK = 0 , I2S_ERROR , I2S_ERROR_INVALID_PARAM , I2S_ERROR_NOT_READY , I2S_ERROR_BUSY , I2S_ERROR_TIMEOUT , I2S_ERROR_NO_MEMORY , I2S_ERROR_INVALID_STATE , I2S_ERROR_UNDERRUN , I2S_ERROR_OVERRUN , I2S_ERROR_NOT_SUPPORTED , I2S_ERROR_HW_FAULT } |
| I2S return status codes. More... | |
| enum | i2s_data_format_en { I2S_FMT_STANDARD_I2S = 0 , I2S_FMT_LEFT_JUSTIFIED = 1 , I2S_FMT_RIGHT_JUSTIFIED = 2 , I2S_FMT_TDM = 3 } |
| I2S Data Format selection. More... | |
| enum | i2s_data_format_caps_en { I2S_FMT_CAP_STANDARD_I2S = (1 << 0) , I2S_FMT_CAP_LEFT_JUSTIFIED = (1 << 1) , I2S_FMT_CAP_RIGHT_JUSTIFIED = (1 << 2) , I2S_FMT_CAP_TDM = (1 << 3) } |
| I2S data format capability flags. More... | |
| enum | i2s_clock_mode_en { I2S_MODE_MASTER = 0 , I2S_MODE_SLAVE = 1 } |
| I2S Clock Mode selection. More... | |
| enum | i2s_direction_en { I2S_DIR_TX = 0 , I2S_DIR_RX = 1 } |
| I2S transfer direction. More... | |
| enum | i2s_state_en { I2S_STATE_NOT_READY = 0 , I2S_STATE_READY = 1 , I2S_STATE_RUNNING = 2 , I2S_STATE_STOPPING = 3 , I2S_STATE_ERROR = 4 } |
| I2S operational state. More... | |
| enum | i2s_trigger_cmd_en { I2S_TRIGGER_START = 0 , I2S_TRIGGER_STOP = 1 , I2S_TRIGGER_PREPARE = 2 , I2S_TRIGGER_PAUSE = 3 , I2S_TRIGGER_RESUME = 4 } |
| I2S trigger commands. More... | |
| enum | i2s_event_en { I2S_EVENT_TX_COMPLETE = (1 << 0) , I2S_EVENT_RX_COMPLETE = (1 << 1) , I2S_EVENT_TX_UNDERRUN = (1 << 2) , I2S_EVENT_RX_OVERRUN = (1 << 3) , I2S_EVENT_FRAME_ERROR = (1 << 4) , I2S_EVENT_ERROR = (1 << 5) } |
| I2S event types. More... | |
| enum | i2s_word_size_en { I2S_WORD_SIZE_8BIT = 8 , I2S_WORD_SIZE_16BIT = 16 , I2S_WORD_SIZE_24BIT = 24 , I2S_WORD_SIZE_32BIT = 32 } |
| I2S word size (bits per sample). More... | |
| enum | i2s_word_size_caps_en { I2S_WORD_SIZE_CAP_8BIT = (1 << 0) , I2S_WORD_SIZE_CAP_16BIT = (1 << 1) , I2S_WORD_SIZE_CAP_24BIT = (1 << 2) , I2S_WORD_SIZE_CAP_32BIT = (1 << 3) } |
| I2S word size capability flags. More... | |
| enum | i2s_sample_rate_en { I2S_SAMPLE_RATE_8000 = 8000U , I2S_SAMPLE_RATE_11025 = 11025U , I2S_SAMPLE_RATE_12000 = 12000U , I2S_SAMPLE_RATE_16000 = 16000U , I2S_SAMPLE_RATE_22050 = 22050U , I2S_SAMPLE_RATE_24000 = 24000U , I2S_SAMPLE_RATE_32000 = 32000U , I2S_SAMPLE_RATE_44100 = 44100U , I2S_SAMPLE_RATE_48000 = 48000U , I2S_SAMPLE_RATE_64000 = 64000U , I2S_SAMPLE_RATE_88200 = 88200U , I2S_SAMPLE_RATE_96000 = 96000U , I2S_SAMPLE_RATE_176400 = 176400U , I2S_SAMPLE_RATE_192000 = 192000U , I2S_SAMPLE_RATE_384000 = 384000U } |
| Supported sample Rates. | |
Enumerated types for I2S driver.
| enum i2s_status_en |
I2S return status codes.
This enumeration defines various return and error codes used by the I2S driver to indicate operation success, failure, and specific error conditions.
| enum i2s_data_format_en |
I2S Data Format selection.
This enumeration defines the serial data format for I2S communication. Different formats vary in timing relationships between data, bit clock, and word select (frame sync) signals.
I2S data format capability flags.
Use these flags to describe supported data formats. Multiple flags can be combined using bitwise OR.
| enum i2s_clock_mode_en |
I2S Clock Mode selection.
This enumeration defines whether the I2S controller operates as master (generating clocks) or slave (receiving clocks from external source).
| Enumerator | |
|---|---|
| I2S_MODE_MASTER | Controller generates bit clock and frame clock |
| I2S_MODE_SLAVE | Controller receives bit clock and frame clock |
| enum i2s_direction_en |
I2S transfer direction.
This enumeration defines the data transfer direction for I2S operations. Full duplex (simultaneous TX and RX) is not represented as a single direction value; configure and operate TX and RX independently for full-duplex use cases.
| Enumerator | |
|---|---|
| I2S_DIR_TX | Transmit direction only |
| I2S_DIR_RX | Receive direction only |
| enum i2s_state_en |
I2S operational state.
This enumeration represents the current operational state of an I2S channel. State transitions follow a defined sequence: NOT_READY -> READY -> RUNNING -> STOPPING -> READY. ERROR state may be entered from any state and requires recovery using I2S_TRIGGER_PREPARE before returning to READY.
| enum i2s_trigger_cmd_en |
I2S trigger commands.
This enumeration defines commands to control I2S stream operation. These commands change the operational state and control data flow.
| enum i2s_event_en |
I2S event types.
This enumeration defines events that trigger callbacks. Multiple events can be combined using bitwise OR for event masks.
| enum i2s_word_size_en |
I2S word size capability flags.
This enumeration defines bitmask flags for indicating supported word sizes in hardware capabilities. Multiple flags can be combined using bitwise OR.