This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
SPI数据传输的API是SPI_transfer(),请参考SPI.c和 SPI.h中的注释,了解具体使用方法。
* ## Transferring data #
* Data transmitted and received by the SPI peripheral is performed using
* SPI_transfer(). SPI_transfer() accepts a pointer to a SPI_Transaction
* structure that dictates what quantity of data is sent and received.
*
* @code
* SPI_Transaction spiTransaction;
*
* spiTransaction.count = someIntegerValue;
* spiTransaction.txBuf = transmitBufferPointer;
* spiTransaction.rxBuf = receiveBufferPointer;
*
* ret = SPI_transfer(handle, &spiTransaction);
* if (!ret) {
* System_printf("Unsuccessful SPI transfer");
* }
* @endcode