NetBurner 3.1
SSCCtx_t Class Reference

#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.
 

Detailed Description

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.

Member Function Documentation

◆ getCurrentConfig()

int SSCCtx_t::getCurrentConfig ( SSC_cfg_t cfg)

Fills in the config object with the current active configuration.

Parameters
[out]cfgThe configuration object to populate.
Returns
Negative on failure.

◆ getState()

ctxState_t SSCCtx_t::getState ( )

Returns the current driver state.

Returns
The current driver state.

◆ Init()

int SSCCtx_t::Init ( const SSC_cfg_t cfg)

Initializes the SSC hardware and driver context.

Parameters
[in]cfgThe configuration to use.
Returns
Negative on failure.

◆ ReadyReceiveBuffer()

int SSCCtx_t::ReadyReceiveBuffer ( void *  buffer,
uint32_t  bufferLen,
bool  waitIfNeeded 
)

Hands off a buffer to be written to by the SSC driver.

Parameters
bufferA pointer to the buffer to be written to.
bufferLenThe length of the buffer to be written. (Must be multiples of 1, 2, or 4 bytes depending on word bit width)
waitIfNeededWhether the driver should wait for space to receive or fail immediately upon exhausting the queue depth.
Returns
Negative on failure.

◆ TransmitBuffer()

int SSCCtx_t::TransmitBuffer ( void *  buffer,
uint32_t  bufferLen,
bool  waitIfNeeded 
)

Hands off a buffer to be transmitted by the SSC driver.

Parameters
bufferA pointer to the buffer to be transmit.
bufferLenThe length of the buffer to be transmit. (Must be multiples of 1, 2, or 4 bytes depending on word bit width)
waitIfNeededWhether the driver should wait for space to transmit or fail immediately upon exhausting the queue depth.
Returns
Negative on failure.

The documentation for this class was generated from the following files: