M2M_T_SPI_RESULT m2m_spi_write(INT16 usif_num, UINT8 *bufferToSend, UINT8
*bufferReceive, INT16 len, INT16 *device)
Description: the function sends and receives data over the initialized SPI port.
Parameters:
usif_num: see the table below:
usif_num |
SPI mapped onto Serial Port |
3 |
USIF1 |
bufferToSend: pointer to the allocated buffer filled with data to be sent
bufferReceive: pointer to the allocated buffer that will be filled with data read
len: number of bytes to send; see M2M_SPI_BUFFER_LEN
device: NULL
Output
data:
on success: the
allocated buffer pointed by "bufferReceive" is filled with data read.
Return
value:
refer to
M2M_T_SPI_RESULTenum