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 Wi-Fi 接收数据有没有类似中断的功能可用?

Other Parts Discussed in Thread: CC3200

请问:

我用CC3200搭建TCP无线传输,CC3200不停地向PC端发送数据,想要实现CC3200接收到PC机发出的停止命令后就停止数据发送。

例程里面给出CC3200接收数据是循环调用sl_Recv()函数:

// waits for 1000 packets from the connected TCP client
    while (lLoopCount < g_ulPacketCount)
    {
        iStatus = sl_Recv(iNewSockID, g_cBsdBuf, iTestBufLen, 0);
        if( iStatus <= 0 )
        {
          // error
          sl_Close(iNewSockID);
          sl_Close(iSockID);
          ASSERT_ON_ERROR(RECV_ERROR);
        }

        lLoopCount++;
    }

这样不适合同时也在发送数据的情况。

那么,请问有没有中断,或者类似于中断的功能,在socket接收到数据的时候触发一个我自己定义的函数?