#include <ssc_i2s.h>
Public Member Functions | |
int | Init (const SSC_cfg_t &cfg) |
Initializes the SSC hardware and driver context. More... | |
void | Shutdown () |
Shuts down the SSC hardware and driver. | |
int | getCurrentConfig (SSC_cfg_t &cfg) |
Fills in the config object with the current active configuration. More... | |
ctxState_t | getState () |
Returns the current driver state. More... | |
int | TransmitBuffer (void *buffer, uint32_t bufferLen, bool waitIfNeeded) |
Hands off a buffer to be transmitted by the SSC driver. More... | |
int | ReadyReceiveBuffer (void *buffer, uint32_t bufferLen, bool waitIfNeeded) |
Hands off a buffer to be written to by the SSC driver. More... | |
void | RegisterTxBufferDoneCB (SSC_BufferDoneFn_t cb) |
Registers a callback for when a transmit buffer is finished. | |
void | RegisterRxBufferDoneCB (SSC_BufferDoneFn_t cb) |
Registers a callback for when a receive buffer is finished. | |
SSCtcx_t is a driver for the Synchronous Serial Controller. It operates on a buffer level, where buffers are handed to the system and either transmitted or filled with received data as appropriate.
int SSCCtx_t::getCurrentConfig | ( | SSC_cfg_t & | cfg | ) |
Fills in the config object with the current active configuration.
[out] | cfg | The configuration object to populate. |
ctxState_t SSCCtx_t::getState | ( | ) |
Returns the current driver state.
int SSCCtx_t::Init | ( | const SSC_cfg_t & | cfg | ) |
Initializes the SSC hardware and driver context.
[in] | cfg | The configuration to use. |
int SSCCtx_t::ReadyReceiveBuffer | ( | void * | buffer, |
uint32_t | bufferLen, | ||
bool | waitIfNeeded | ||
) |
Hands off a buffer to be written to by the SSC driver.
buffer | A pointer to the buffer to be written to. |
bufferLen | The length of the buffer to be written. (Must be multiples of 1, 2, or 4 bytes depending on word bit width) |
waitIfNeeded | Whether the driver should wait for space to receive or fail immediately upon exhausting the queue depth. |
int SSCCtx_t::TransmitBuffer | ( | void * | buffer, |
uint32_t | bufferLen, | ||
bool | waitIfNeeded | ||
) |
Hands off a buffer to be transmitted by the SSC driver.
buffer | A pointer to the buffer to be transmit. |
bufferLen | The length of the buffer to be transmit. (Must be multiples of 1, 2, or 4 bytes depending on word bit width) |
waitIfNeeded | Whether the driver should wait for space to transmit or fail immediately upon exhausting the queue depth. |