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.

CC2650中有哪些定时器或是延时函数?

请教ti的大神,在TI-MAC协议栈中上层app中有哪些可以用定时器或是延时函数,比如我想延迟1秒可以怎么用定时器或是用什么 延时函数?

  • 可以用这个: Task_ti_sysbios_knl_Task_sleep(standbyDurationMs*100)

  • 以SimpleBLECentral example为例,直接加到GAP_LINK_ESTABLISHED_EVENT中,示例:

    case GAP_LINK_ESTABLISHED_EVENT:
          {
            gapEstLinkReqEvent_t *pPkt = (gapEstLinkReqEvent_t *) pMsg;
            
            ti_sysbios_knl_Task_sleep(10*100);

            if (pPkt->hdr.status == SUCCESS)
            {
              // Notify the Bond Manager of the connection
              VOID GAPBondMgr_LinkEst(pPkt->devAddrType, pPkt->devAddr,
                                       pPkt->connectionHandle, GAP_PROFILE_CENTRAL);
            }
          }
          break;