28 #if (HAL_USE_I2S == TRUE) || defined(__DOXYGEN__) 38 #define I2S_MODE_SLAVE 0 39 #define I2S_MODE_MASTER 1 99 i2s_lld_driver_fields;
149 #define i2sIsBufferComplete(i2sp) ((bool)((i2sp)->state == I2S_COMPLETE)) 158 #define i2sStartExchangeI(i2sp) { \ 159 i2s_lld_start_exchange(i2sp); \ 160 (i2sp)->state = I2S_ACTIVE; \ 172 #define i2sStopExchangeI(i2sp) { \ 173 i2s_lld_stop_exchange(i2sp); \ 174 (i2sp)->state = I2S_READY; \ 189 #define _i2s_isr_half_code(i2sp) { \ 190 if ((i2sp)->config->end_cb != NULL) { \ 191 (i2sp)->config->end_cb(i2sp); \ 208 #define _i2s_isr_full_code(i2sp) { \ 209 if ((i2sp)->config->end_cb) { \ 210 (i2sp)->state = I2S_COMPLETE; \ 211 (i2sp)->config->end_cb(i2sp); \ 212 if ((i2sp)->state == I2S_COMPLETE) { \ 213 (i2sp)->state = I2S_ACTIVE; \ i2sstate_t
Driver state machine possible states.
void i2sInit(void)
I2S Driver initialization.
Driver configuration structure.
const void * tx_buffer
Transmission buffer pointer.
void i2sStop(I2SDriver *i2sp)
Deactivates the I2S peripheral.
PLATFORM I2S subsystem low level driver header.
i2scallback_t end_cb
Callback function called during streaming.
void i2sObjectInit(I2SDriver *i2sp)
Initializes the standard part of a I2SDriver structure.
void i2sStartExchange(I2SDriver *i2sp)
Starts a I2S data exchange.
#define i2s_lld_config_fields
Low level fields of the I2S configuration structure.
void i2sStart(I2SDriver *i2sp, const I2SConfig *config)
Configures and activates the I2S peripheral.
void i2sStopExchange(I2SDriver *i2sp)
Stops the ongoing data exchange.
const I2SConfig * config
Current configuration data.
void * rx_buffer
Receive buffer pointer.
size_t size
TX and RX buffers size as number of samples.
Structure representing an I2S driver.
void(* i2scallback_t)(I2SDriver *i2sp)
I2S notification callback type.
i2sstate_t state
Driver state.