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.

CC3200 有没有在TI RTOS下的SPI例程

Other Parts Discussed in Thread: CC3200SDK

新手求问,在C:\ti\tirtos_cc32xx_2_16_01_14\products\tidrivers_cc32xx_2_16_01_13\packages\ti\drivers找到相关的API,但是不知如何使用,请问有没有相关资料可供参考?

多谢~

  • 请看 :C:\ti\CC3200SDK_1.3.0\cc3200-sdk\example\spi_demo

    文档:C:\ti\CC3200SDK_1.3.0\cc3200-sdk\docs\ 里面的CC3200-Peripheral_Driver_Library_User's_Guide

  • Alvin Chen,

      你好,我之前浏览过那个例程,那个例程好像是non-os下实现的,请问一下rtos下使用和non-os下使用的是同一套api吗?

  • SPI_Handle      handle;
    SPI_Params      params;
    SPI_Transaction spiTransaction;
    
    SPI_Params_init(&params);
    params.bitRate  = someNewBitRate;
    handle = SPI_open(someSPI_configIndexValue, &params);
    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