Tool/software: Code Composer Studio
MCSPI_SlaveMode_MasterExample_bbbAM335x_armExampleProject
the callback function is
/* Callback mode functions */
void SPI_callback(SPI_Handle handle, SPI_Transaction *transaction)
{
SPI_osalPostLock(cbSem[0]);
}
typedef struct SPI_Transaction_s {
/* User input (write-only) fields */
size_t count; /*!< Number of frames for this transaction */
void *txBuf; /*!< void * to a buffer with data to be transmitted */
void *rxBuf; /*!< void * to a buffer to receive data */
void *arg; /*!< Argument to be passed to the callback function */ <======== variable I care
/* User output (read-only) fields */
SPI_Status status; /*!< Status code set by SPI_transfer */
/* Driver-use only fields */
} SPI_Transaction;
my question is how to set transaction->arg if my callback function has two arguments, char *msg_data and int msg_length? Thanks