36typedef void (*SSC_BufferDoneFn_t)(
void *buffer,
bool valid);
160enum bufferDepletionBehavior_t
163 DEPLETED_REPEAT_LAST,
296extern const SSC_cfg_t SSC_I2S_SLAVE_24_TXRX_RK;
297extern const SSC_cfg_t SSC_I2S_SLAVE_24_TXRX_TK;
298extern const SSC_cfg_t SSC_I2S_SLAVE_24_TXRX_TKRK;
299extern const SSC_cfg_t SSC_I2S_SLAVE_16_TXRX_RK;
300extern const SSC_cfg_t SSC_I2S_SLAVE_16_TXRX_TK;
301extern const SSC_cfg_t SSC_I2S_SLAVE_16_TXRX_TKRK;
302extern const SSC_cfg_t SSC_I2S_SLAVE_8_TXRX_RK;
303extern const SSC_cfg_t SSC_I2S_SLAVE_8_TXRX_TK;
304extern const SSC_cfg_t SSC_I2S_SLAVE_8_TXRX_TKRK;
306extern const SSC_cfg_t SSC_LJUST_SLAVE_24_TXRX_RK;
307extern const SSC_cfg_t SSC_LJUST_SLAVE_24_TXRX_TK;
308extern const SSC_cfg_t SSC_LJUST_SLAVE_24_TXRX_TKRK;
309extern const SSC_cfg_t SSC_LJUST_SLAVE_16_TXRX_RK;
310extern const SSC_cfg_t SSC_LJUST_SLAVE_16_TXRX_TK;
311extern const SSC_cfg_t SSC_LJUST_SLAVE_16_TXRX_TKRK;
312extern const SSC_cfg_t SSC_LJUST_SLAVE_8_TXRX_RK;
313extern const SSC_cfg_t SSC_LJUST_SLAVE_8_TXRX_TK;
314extern const SSC_cfg_t SSC_LJUST_SLAVE_8_TXRX_TKRK;
343 SSC_BufferDoneFn_t txBufDone;
344 SSC_BufferDoneFn_t rxBufDone;
345 uint32_t txReadyCount;
346 uint32_t rxReadyCount;
367 void initBDs(
bool loopRx,
bool loopTx);
409 int TransmitBuffer(
void *buffer, uint32_t bufferLen,
bool waitIfNeeded);
ctxState_t getState()
Returns the current driver state.
int ReadyReceiveBuffer(void *buffer, uint32_t bufferLen, bool waitIfNeeded)
Hands off a buffer to be written to by the SSC driver.
Definition ssc_i2s.cpp:429
void RegisterRxBufferDoneCB(SSC_BufferDoneFn_t cb)
Registers a callback for when a receive buffer is finished.
Definition ssc_i2s.cpp:500
void RegisterTxBufferDoneCB(SSC_BufferDoneFn_t cb)
Registers a callback for when a transmit buffer is finished.
Definition ssc_i2s.cpp:495
int TransmitBuffer(void *buffer, uint32_t bufferLen, bool waitIfNeeded)
Hands off a buffer to be transmitted by the SSC driver.
Definition ssc_i2s.cpp:367
int Init(const SSC_cfg_t &cfg)
Initializes the SSC hardware and driver context.
Definition ssc_i2s.cpp:309
void Shutdown()
Shuts down the SSC hardware and driver.
Definition ssc_i2s.cpp:331
int getCurrentConfig(SSC_cfg_t &cfg)
Fills in the config object with the current active configuration.
Configuration structure for the SSC driver. Passed to the initialize function to configure the hardwa...
Definition ssc_i2s.h:249
uint16_t clkDiv
Definition ssc_i2s.h:250
SSC_rxtx_cfg_t rx
Definition ssc_i2s.h:252
SSC_rxtx_cfg_t tx
Definition ssc_i2s.h:253
Configuration structure for a given direction (rx or tx) of the SSC module. Passed to the initialize ...
Definition ssc_i2s.h:213
uint8_t bitsPerWord
Definition ssc_i2s.h:230
uint8_t wordsPerFrame
Definition ssc_i2s.h:227
uint8_t syncLen
Definition ssc_i2s.h:223
clkSrc_t clkSrc
Definition ssc_i2s.h:221
frameSyncOut_t syncOut
Definition ssc_i2s.h:226
clkGate_t clkGate
Definition ssc_i2s.h:218
dataValid_t dataValid
Definition ssc_i2s.h:219
uint8_t startDly
Definition ssc_i2s.h:216
bitOrder_t bitOrder
Definition ssc_i2s.h:228
bool syncDataEnabled
Definition ssc_i2s.h:225
startCond_t startCond
Definition ssc_i2s.h:217
bool lineIdleState
Definition ssc_i2s.h:229
frameEdge_t syncEdge
Definition ssc_i2s.h:224
bufferDepletionBehavior_t depletionBehavior
Definition ssc_i2s.h:232
bool enable
Definition ssc_i2s.h:214
uint8_t period
Definition ssc_i2s.h:215
clkOut_t clkOut
Definition ssc_i2s.h:220