新手求问,在C:\ti\tirtos_cc32xx_2_16_01_14\products\tidrivers_cc32xx_2_16_01_13\packages\ti\drivers找到相关的API,但是不知如何使用,请问有没有相关资料可供参考?
多谢~
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.
新手求问,在C:\ti\tirtos_cc32xx_2_16_01_14\products\tidrivers_cc32xx_2_16_01_13\packages\ti\drivers找到相关的API,但是不知如何使用,请问有没有相关资料可供参考?
多谢~
Alvin Chen,
你好,我之前浏览过那个例程,那个例程好像是non-os下实现的,请问一下rtos下使用和non-os下使用的是同一套api吗?
SPI_Handle handle;
SPI_Params params;
SPI_Transaction spiTransaction;
SPI_Params_init(¶ms);
params.bitRate = someNewBitRate;
handle = SPI_open(someSPI_configIndexValue, ¶ms);
if (!handle) {
System_printf("SPI did not open");
}
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.
SPI_Transaction spiTransaction;
spiTransaction.count = someIntegerValue;
spiTransaction.txBuf = transmitBufferPointer;
spiTransaction.rxBuf = receiveBufferPointer;
ret = SPI_transfer(handle, &spiTransaction);
if (!ret) {
System_printf("Unsuccessful SPI transfer");
请看目录下的:C:\ti\tirtos_cc32xx_2_16_01_14\products\tidrivers_cc32xx_2_16_01_13\docs\tidriversAPIs.html
接口函数如下;
C:\ti\tirtos_cc32xx_2_16_01_14\products\tidrivers_cc32xx_2_16_01_13\packages\ti\drivers