36 typedef void (*SSC_BufferDoneFn_t)(
void *buffer,
bool valid);
122 enum frameSyncOut_t {
152 enum bufferDepletionBehavior_t {
154 DEPLETED_REPEAT_LAST,
285 extern const SSC_cfg_t SSC_I2S_SLAVE_24_TXRX_RK;
286 extern const SSC_cfg_t SSC_I2S_SLAVE_24_TXRX_TK;
287 extern const SSC_cfg_t SSC_I2S_SLAVE_24_TXRX_TKRK;
288 extern const SSC_cfg_t SSC_I2S_SLAVE_16_TXRX_RK;
289 extern const SSC_cfg_t SSC_I2S_SLAVE_16_TXRX_TK;
290 extern const SSC_cfg_t SSC_I2S_SLAVE_16_TXRX_TKRK;
291 extern const SSC_cfg_t SSC_I2S_SLAVE_8_TXRX_RK;
292 extern const SSC_cfg_t SSC_I2S_SLAVE_8_TXRX_TK;
293 extern const SSC_cfg_t SSC_I2S_SLAVE_8_TXRX_TKRK;
295 extern const SSC_cfg_t SSC_LJUST_SLAVE_24_TXRX_RK;
296 extern const SSC_cfg_t SSC_LJUST_SLAVE_24_TXRX_TK;
297 extern const SSC_cfg_t SSC_LJUST_SLAVE_24_TXRX_TKRK;
298 extern const SSC_cfg_t SSC_LJUST_SLAVE_16_TXRX_RK;
299 extern const SSC_cfg_t SSC_LJUST_SLAVE_16_TXRX_TK;
300 extern const SSC_cfg_t SSC_LJUST_SLAVE_16_TXRX_TKRK;
301 extern const SSC_cfg_t SSC_LJUST_SLAVE_8_TXRX_RK;
302 extern const SSC_cfg_t SSC_LJUST_SLAVE_8_TXRX_TK;
303 extern const SSC_cfg_t SSC_LJUST_SLAVE_8_TXRX_TKRK;
332 SSC_BufferDoneFn_t txBufDone;
333 SSC_BufferDoneFn_t rxBufDone;
334 uint32_t txReadyCount;
335 uint32_t rxReadyCount;
356 void initBDs(
bool loopRx,
bool loopTx);
399 int TransmitBuffer(
void *buffer, uint32_t bufferLen,
bool waitIfNeeded);
ctxState_t getState()
Returns the current driver state.
NetBurner Real-Time Operating System API.
Configuration structure for a given direction (rx or tx) of the SSC module. Passed to the initialize ...
Definition: ssc_i2s.h:203
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:484
bool lineIdleState
Definition: ssc_i2s.h:219
dataValid_t dataValid
Definition: ssc_i2s.h:209
uint8_t syncLen
Definition: ssc_i2s.h:213
Semaphores are used to control access to shared resource critical section, or to communicate between ...
Definition: nbrtos.h:318
uint8_t startDly
Definition: ssc_i2s.h:206
Configuration structure for the SSC driver. Passed to the initialize function to configure the hardwa...
Definition: ssc_i2s.h:238
Definition: ssc_i2s.h:317
clkSrc_t clkSrc
Definition: ssc_i2s.h:211
uint8_t period
Definition: ssc_i2s.h:205
uint8_t bitsPerWord
Definition: ssc_i2s.h:220
SSC_rxtx_cfg_t tx
Definition: ssc_i2s.h:242
bool enable
Definition: ssc_i2s.h:204
void Shutdown()
Shuts down the SSC hardware and driver.
Definition: ssc_i2s.cpp:388
startCond_t startCond
Definition: ssc_i2s.h:207
uint8_t wordsPerFrame
Definition: ssc_i2s.h:217
uint16_t clkDiv
Definition: ssc_i2s.h:239
void RegisterTxBufferDoneCB(SSC_BufferDoneFn_t cb)
Registers a callback for when a transmit buffer is finished.
Definition: ssc_i2s.cpp:557
bitOrder_t bitOrder
Definition: ssc_i2s.h:218
frameEdge_t syncEdge
Definition: ssc_i2s.h:214
clkGate_t clkGate
Definition: ssc_i2s.h:208
int getCurrentConfig(SSC_cfg_t &cfg)
Fills in the config object with the current active configuration.
SSC_rxtx_cfg_t rx
Definition: ssc_i2s.h:241
void RegisterRxBufferDoneCB(SSC_BufferDoneFn_t cb)
Registers a callback for when a receive buffer is finished.
Definition: ssc_i2s.cpp:562
frameSyncOut_t syncOut
Definition: ssc_i2s.h:216
clkOut_t clkOut
Definition: ssc_i2s.h:210
int TransmitBuffer(void *buffer, uint32_t bufferLen, bool waitIfNeeded)
Hands off a buffer to be transmitted by the SSC driver.
Definition: ssc_i2s.cpp:419
bufferDepletionBehavior_t depletionBehavior
Definition: ssc_i2s.h:222
bool syncDataEnabled
Definition: ssc_i2s.h:215
int Init(const SSC_cfg_t &cfg)
Initializes the SSC hardware and driver context.
Definition: ssc_i2s.cpp:365