AM243x MCU+ SDK  08.01.00
MCSPI_Transaction Struct Reference

Detailed Description

Data structure used with MCSPI_transfer()

It indicates how many MCSPI_FrameFormat frames are sent and received from the buffers pointed to txBuf and rxBuf. The args variable is an user-definable argument which gets passed to the MCSPI_CallbackFxn when the SPI driver is in MCSPI_TRANSFER_MODE_CALLBACK.

Data Fields

uint32_t channel
 
uint32_t count
 
void * txBuf
 
void * rxBuf
 
void * args
 
uint32_t status
 

Field Documentation

◆ channel

uint32_t MCSPI_Transaction::channel

[IN] Channel number (chip select) to use. Valid value from 0 to (MCSPI_MAX_NUM_CHANNELS - 1)

◆ count

uint32_t MCSPI_Transaction::count

[IN] Number of frames for this transaction. This should in word size length and not in bytes

◆ txBuf

void* MCSPI_Transaction::txBuf

[IN] void * to a buffer with data to be transmitted.

If txBuf is NULL, the driver sends MCSPI frames with all data set to the default value specified by MCSPI_ChConfig.defaultTxData.

The size of the buffer should be count * MCSPI_ChConfig.dataSize in bytes rounded to nearest byte boundary. For example if MCSPI_ChConfig.dataSize is 12 bits, then size of buffers should be count * 2 bytes.

◆ rxBuf

void* MCSPI_Transaction::rxBuf

[IN] void * to a buffer to receive data.

If rxBuf is NULL, the driver discards all MCSPI frames received.

The size of the buffer is similar to txBuf as explained above.

◆ args

void* MCSPI_Transaction::args

[IN] Argument to be passed to the callback function

◆ status

uint32_t MCSPI_Transaction::status