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.

关于simplink异步的数据接收的问题

你好

请问使用EasyLink_receiveAsync()函数进行异步数据接收时,是不是  不使用EasyLink_abort()的话将一直保持在接收状态呢, 还是在接收到一组数据后就退出射频接收了?

我现在想在指定时间内一直接收数据,当超出指定时间则关闭接收,写法如下,请问这样写可以么?

            EasyLink_receiveAsync(RxDoneCb, 0);

            Semaphore_pend(RcvDoneSem, (JOINACK_RCV_TIME_US / Clock_tickPeriod)) ;

            if(EasyLink_abort() == EasyLink_Status_Success)
            {
               Semaphore_pend(RcvDoneSem, BIOS_WAIT_FOREVER);
            }
  • EasyLink_receiveAsync不会阻塞,利用中断函数来接收, 收到后会触发中断函数rxDoneCallback。
    另外您可以看一下 dev.ti.com/.../easylink-api-reference.html

    This function is a non blocking call to Rx a packet. The Rx is turned on and the Callback is called once a packet is received. The Rx will timeout if EasyLink_Ctrl_AsyncRx_TimeOut ctrl message is used to set the timeout to something other than 0.
  • 是的,这个是异步,所以需要EasyLink_abort来结束,并且执行这个函数也会跳转到回调里面, 我现在其实想知道,如果接收到数据后,我不使用abort关掉他,是否还可以接收下一组数据?
  • 是退出接收状态,还是继续接收,是根据你的repeat设定来的

    When a packet is received, reception is restarted on the same channel if pParams->bRepeat = 1, the end
    event has not been observed, and the packet fits in the receive queue. If pParams->bRepeat = 0, the
    operation always ends when a packet is received.