亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? endpoint.c

?? 此程式庫有許多的zigbee程式源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
#ifdef UART0_DEBUG    vDebug("Sy ");#endif    /* Set the coordinator source address before syncing to avoid PAN conflict       indication */    s_psMacPib->u16CoordShortAddr = DEMO_COORD_ADDR;    /* Create sync request on channel selected during scan */    sMlmeReqRsp.u8Type = MAC_MLME_REQ_SYNC;    sMlmeReqRsp.u8ParamLength = sizeof(MAC_MlmeReqSync_s);    sMlmeReqRsp.uParam.sReqSync.u8Channel = sDemoData.sSystem.u8Channel;    sMlmeReqRsp.uParam.sReqSync.u8TrackBeacon = TRUE;    /* Put in sync request. There is no deferred confirm for this, we just get       a SYNC-LOSS later if it didn't work */    vAppApiMlmeRequest(&sMlmeReqRsp, &sMlmeSyncCfm);}/**************************************************************************** * * NAME: vStartAssociate * * DESCRIPTION: * Sends an MLME request to the 802.15.4 to request an association with the * coordinator found during a previous scan. If the  returned confirmation is * not 'deferred', a fatal error is assumed. * * RETURNS: * void * ****************************************************************************/PRIVATE void vStartAssociate(void){    MAC_MlmeReqRsp_s  sMlmeReqRsp;    MAC_MlmeSyncCfm_s sMlmeSyncCfm;    sDemoData.sSystem.eState = E_STATE_ASSOCIATING;#ifdef UART0_DEBUG    vDebug("As ");#endif    /* Create associate request. We know short address and PAN ID of       coordinator as this is preset and we have checked that received       beacon matched this */    sMlmeReqRsp.u8Type = MAC_MLME_REQ_ASSOCIATE;    sMlmeReqRsp.u8ParamLength = sizeof(MAC_MlmeReqAssociate_s);    sMlmeReqRsp.uParam.sReqAssociate.u8LogicalChan = sDemoData.sSystem.u8Channel;    sMlmeReqRsp.uParam.sReqAssociate.u8Capability = 0x80; /* We want short address, other features off */    sMlmeReqRsp.uParam.sReqAssociate.u8SecurityEnable = FALSE;    sMlmeReqRsp.uParam.sReqAssociate.sCoord.u8AddrMode = 2;    sMlmeReqRsp.uParam.sReqAssociate.sCoord.u16PanId = DEMO_PAN_ID;    sMlmeReqRsp.uParam.sReqAssociate.sCoord.uAddr.u16Short = DEMO_COORD_ADDR;    /* Put in associate request and check immediate confirm. Should be       deferred, in which case response is handled by event handler */    vAppApiMlmeRequest(&sMlmeReqRsp, &sMlmeSyncCfm);    if (sMlmeSyncCfm.u8Status != MAC_MLME_CFM_DEFERRED)    {        /* Unexpected result */        vDisplayError("Associate request returned error",                      ((uint32)sMlmeSyncCfm.u8Status) << 8                      | (uint32)sMlmeSyncCfm.uParam.sCfmAssociate.u8Status);    }}/**************************************************************************** * * NAME: vProcessInterrupts * * DESCRIPTION: * Loops around checking for upward events from the Application Queue API. * To save power, the CPU is set to doze at the start of the loop. If an event * is generated, the CPU is woken up and processes it, then the code here is * allowed to continue. * * For each type of event, the queue is checked and, if there is something to * process, the appropriate handler is called. The buffer is then returned to * the Application Queue API. This continues until all events have been * processed. If the hardware event handler detects that a 'reset' button * press sequence has happened, the loop is exited. * * Note that the buttons are configured to generate interrupts when they are * pressed. * * RETURNS: * void when a 'reset' button press sequence is detected. * ****************************************************************************/PRIVATE void vProcessInterrupts(void){    MAC_MlmeDcfmInd_s *psMlmeInd;    MAC_McpsDcfmInd_s *psMcpsInd;    AppQApiHwInd_s    *psAHI_Ind;    bool_t             bDone;    /* Wait for events */    bDone = FALSE;    do    {        /* Doze CPU: it will wake when interrupt occurs, then process           interrupts, then this code will be able to process queue */        vAHI_CpuDoze();        /* Check for anything on the MCPS upward queue */        do        {            psMcpsInd = psAppQApiReadMcpsInd();            if (psMcpsInd != NULL)            {               #ifdef UART0_DEBUG                        //    vDebug("vProcessIncomingMcps ");#endif                vProcessIncomingMcps(psMcpsInd);                vAppQApiReturnMcpsIndBuffer(psMcpsInd);            }        } while (psMcpsInd != NULL);        /* Check for anything on the MLME upward queue */        do        {            psMlmeInd = psAppQApiReadMlmeInd();            if (psMlmeInd != NULL)            {               #ifdef UART0_DEBUG                       //     vDebug("vProcessIncomingMlme ");#endif                vProcessIncomingMlme(psMlmeInd);                vAppQApiReturnMlmeIndBuffer(psMlmeInd);            }        } while (psMlmeInd != NULL);        /* Check for anything on the AHI upward queue */        do        {            psAHI_Ind = psAppQApiReadHwInd();            if (psAHI_Ind != NULL)            {                /* We don't bother to pass the queue data as we are only                   expecting key press interrupts and, if we get anything else,                   reading the keys won't have any unfortunate side effects */                if (bProcessKeyPress() == TRUE)                {                   #ifdef UART0_DEBUG                            vDebug("bProcessKeyPress ");#endif                    bDone = TRUE;                }				   #ifdef UART0_DEBUG                            vDebug("vAppQApiReturnHwIndBuffer ");#endif                vAppQApiReturnHwIndBuffer(psAHI_Ind);            }        } while (psAHI_Ind != NULL);    } while (bDone == FALSE);}/**************************************************************************** * * NAME: vProcessIncomingMcps * * DESCRIPTION: * Deals with any incoming MCPS data events. Only deferred confirmations of * frame transmission requests are specifically handled, to move the state * machine forward. * * PARAMETERS: Name        RW  Usage *             psMcpsInd   R   Pointer to structure containing MCPS event * * RETURNS: * void * ****************************************************************************/PRIVATE void vProcessIncomingMcps(MAC_McpsDcfmInd_s *psMcpsInd){    /* Process MCPS indication by checking if it is a confirmation of our           outgoing frame */              #ifdef UART0_DEBUG                           // vDebug("vProcessIncomingMcps ");#endif    if ((psMcpsInd->u8Type == MAC_MCPS_DCFM_DATA)        && (sDemoData.sSystem.eState == E_STATE_TX_DATA))    {        if (psMcpsInd->uParam.sDcfmData.u8Handle == sDemoData.sTransceiver.u8CurrentTxHandle)        {            /* Increment handle for next time. Increment failures */            sDemoData.sTransceiver.u8CurrentTxHandle++;            /* Start to read sensors. This takes a while but rather than               wait for an interrupt we just poll and, once finished, move back               to the running state to wait for the next beacon. Not a power               saving solution! */            sDemoData.sSystem.eState = E_STATE_READ_SENSORS;			   #ifdef UART0_DEBUG                            //vDebug("vProcessRead ");#endif            vProcessRead();            sDemoData.sSystem.eState = E_STATE_RUNNING;        }    }}/**************************************************************************** * * NAME: vProcessIncomingMlme * * DESCRIPTION: * Deals with any incoming MCPS events. There are 4 events that are handled: * * 1. Scan deferred confirmation *    If the scan saw a beacon from the expected coordinator, the stack is *    asked to start synchronisation. Otherwise, it tries to scan again. * * 2. Associate deferred confirmation *    If the association was successful, the short address is stored and the *    device enters the 'running' state, in which it will respond to beacons *    by sending back a frame of sensor information. If the association was *    not successful, it is attempted again. * * 3. Becon notify indication *    If synchronising, this is used to indicate that synchronisation is *    complete and association is atempted. If in 'running' state, it is *    used to trigger the sending of a frame containing sensor information *    to the coordinator. * * 4. Sync loss indication *    Device starts another scan. * * PARAMETERS: Name        RW  Usage *             psMlmeInd   R   Pointer to structure containing MLME event * * RETURNS: * void * ****************************************************************************/PRIVATE void vProcessIncomingMlme(MAC_MlmeDcfmInd_s *psMlmeInd){    MAC_PanDescr_s *psPanDesc;    int i;    /* We respond to several MLME indications and confirmations, depending       on mode */    switch (psMlmeInd->u8Type)    {    case MAC_MLME_DCFM_SCAN:#ifdef UART0_DEBUG        vDebug("MSc ");#endif        /* Only respond to this if scanning */        if (sDemoData.sSystem.eState == E_STATE_SCANNING)        {#ifdef UART0_DEBUG            vDebug("MScSt ");#endif            /* Make sure it is what we're after */            switch (psMlmeInd->uParam.sDcfmScan.u8Status)            {            case MAC_ENUM_SUCCESS:                if (psMlmeInd->uParam.sDcfmScan.u8ScanType == MAC_MLME_SCAN_TYPE_ACTIVE)                {#ifdef UART0_DEBUG                    vDebug("MScOk ");#endif                    /* Determine which, if any, network contains demo coordinator.                       Algorithm for determining which network to connect to is                       beyond the scope of 802.15.4, and we use a simple approach                       of matching the required PAN ID and short address, both of                       which we already know */                    i = 0;                    while (i < psMlmeInd->uParam.sDcfmScan.u8ResultListSize)                    {                        psPanDesc = &psMlmeInd->uParam.sDcfmScan.uList.asPanDescr[i];#ifdef UART0_DEBUG                        vDisplayHex(psPanDesc->u8LogicalChan, 2);                        vDebug(":");                        vDisplayHex(psPanDesc->sCoord.u16PanId, 4);                        vDebug(":");                        vDisplayHex(psPanDesc->sCoord.uAddr.u16Short, 4);                        vDebug(" ");#endif                        if ((psPanDesc->sCoord.u16PanId == DEMO_PAN_ID)                            && (psPanDesc->sCoord.u8AddrMode == 2)                            && (psPanDesc->sCoord.uAddr.u16Short == DEMO_COORD_ADDR))                        {#ifdef UART0_DEBUG                            vDebug("MScUs ");#endif                            /* Matched so start to synchronise and associate */                            sDemoData.sSystem.u8Channel = psPanDesc->u8LogicalChan;                            vStartSync();                            return;                        }                        i++;                    }                    /* Failed to find coordinator: keep trying */                    vStartScan();                }                break;            case MAC_ENUM_NO_BEACON:                /* Failed to find coordinator: keep trying */                vStartScan();                break;            default:                break;            }        }        break;    case MAC_MLME_DCFM_ASSOCIATE:        /* Only respond if in associating mode */        switch (sDemoData.sSystem.eState)        {        case E_STATE_ASSOCIATING:            if (psMlmeInd->uParam.sDcfmAssociate.u8Status == MAC_ENUM_SUCCESS)            {                /* Store short address */                sDemoData.sSystem.u16ShortAddr = psMlmeInd->uParam.sDcfmAssociate.u16AssocShortAddr;                /* Node is a value between 0 and the number of endpoints - 1.                   It is determined by the short address */                sDemoData.sSystem.u8ThisNode = sDemoData.sSystem.u16ShortAddr - DEMO_ENDPOINT_ADDR_BASE;                /* We are now in the running state */                sDemoData.sSystem.eState = E_STATE_RUNNING;            }            else            {                /* Try, try again */                vStartAssociate();            }            break;        case E_STATE_ASSOC_TO_SCAN:            vStartScan();            break;        default:            break;        }        break;    case MAC_MLME_IND_BEACON_NOTIFY:        /* Beacon has arrived. If in sync'ing mode, should only see this           once synchronisation has been achieved. If running, use this           to time reading of sensors. In other states, ignore it */        switch (sDemoData.sSystem.eState)        {        case E_STATE_SYNCING:            /* Can now associate */            vStartAssociate();            break;        case E_STATE_RUNNING:            /* Process received data in beacon payload */            vProcessRxBeacon(psMlmeInd);            break;        default:            break;        }        break;    case MAC_MLME_IND_SYNC_LOSS:        /* Lost sync with coordinator so try to find coordinator again */        if (sDemoData.sSystem.eState != E_STATE_ASSOCIATING)        {            vStartScan();        }        else        {            sDemoData.sSystem.eState = E_STATE_ASSOC_TO_SCAN;        }        break;    default:        break;    }}/**************************************************************************** * * NAME: bProcessKeyPress * * DESCRIPTION: * Porcesses buttons, to turn on or off the remote switch or to detect a * reset request. * * RETURNS: * TRUE if reset combination detected. * ****************************************************************************/PRIVATE bool_t bProcessKeyPress(void)    /*肚癳data 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
夜夜亚洲天天久久| 国产福利一区二区| 玉米视频成人免费看| 欧美日韩国产大片| www.日韩在线| 国产成人在线网站| 国产一本一道久久香蕉| 美洲天堂一区二卡三卡四卡视频| 亚洲精品成人悠悠色影视| 国产精品狼人久久影院观看方式| 国产性做久久久久久| 久久天天做天天爱综合色| 欧美一区二区免费观在线| 色婷婷久久综合| 色狠狠av一区二区三区| 91久久精品一区二区三区| 99国产麻豆精品| av在线免费不卡| av激情综合网| 色综合久久99| 欧亚一区二区三区| 欧美中文字幕一区二区三区亚洲| 在线观看亚洲一区| 欧美日韩一区二区三区视频| 欧美丝袜丝交足nylons| 欧美日韩午夜精品| 制服.丝袜.亚洲.另类.中文| 69av一区二区三区| 欧美一级国产精品| 精品美女一区二区三区| 欧美精品一区二区久久久| 久久欧美中文字幕| 国产精品网站一区| 亚洲综合一区二区三区| 首页欧美精品中文字幕| 婷婷综合五月天| 久久精品国产亚洲高清剧情介绍 | 国产精品久久久久婷婷| 国产精品超碰97尤物18| 尤物视频一区二区| 午夜伦欧美伦电影理论片| 美女看a上一区| 国产精品一区不卡| 91麻豆自制传媒国产之光| 欧洲人成人精品| 欧美不卡123| 国产精品麻豆网站| 亚洲愉拍自拍另类高清精品| 欧美aaa在线| 国产不卡免费视频| 欧美在线视频你懂得| 欧美精品乱人伦久久久久久| 精品久久久久久久久久久院品网 | 欧美精品日韩一区| 2021中文字幕一区亚洲| 1区2区3区国产精品| 香蕉乱码成人久久天堂爱免费| 精品一区二区三区蜜桃| caoporn国产一区二区| 欧美日韩中文另类| 久久久久久久久岛国免费| 亚洲欧美日韩一区二区三区在线观看| 亚洲国产一二三| 国产一区二区三区不卡在线观看 | 欧美精品高清视频| 欧美大度的电影原声| 久久免费视频色| 中文字幕一区二区三区蜜月| 日韩av不卡一区二区| 成人网页在线观看| 欧美一级理论片| 亚洲六月丁香色婷婷综合久久| 免费看欧美女人艹b| jlzzjlzz亚洲日本少妇| 日韩精品一区二区三区中文不卡| 国产精品久久久久久一区二区三区| 丝袜美腿亚洲综合| 91丨porny丨中文| 久久免费看少妇高潮| 亚洲成a人v欧美综合天堂下载 | 国产成人精品免费一区二区| 国产成人精品免费看| 欧美日本免费一区二区三区| 欧美高清视频一二三区| 日韩一级欧美一级| 中文字幕一区日韩精品欧美| 久久综合网色—综合色88| 久久久国产精品不卡| 午夜精品久久久久| 成人精品电影在线观看| 日韩区在线观看| 亚洲综合色婷婷| 国产一区二区看久久| 欧美日韩成人综合在线一区二区| 国产日本一区二区| 麻豆精品在线播放| 欧美久久一二区| 一区二区在线观看视频在线观看| 日本亚洲三级在线| 欧美四级电影网| 亚洲欧美日韩精品久久久久| 成人在线一区二区三区| 久久久精品中文字幕麻豆发布| 午夜激情综合网| 欧美日韩高清一区二区不卡| 亚洲精品成人a在线观看| 91在线小视频| 国产精品伦理一区二区| 国产成人综合视频| 精品久久久久久亚洲综合网| 日本vs亚洲vs韩国一区三区二区 | 日本高清免费不卡视频| 国产精品久久影院| 粉嫩嫩av羞羞动漫久久久| 久久免费午夜影院| 国产精品综合二区| 久久色.com| 国内外精品视频| 精品国产一区二区三区久久久蜜月| 日韩精品1区2区3区| 欧美精品1区2区3区| 日本少妇一区二区| 日韩欧美亚洲另类制服综合在线| 免费日本视频一区| 欧美一区二区精美| 男女男精品视频网| 日韩欧美国产综合一区| 夜夜精品浪潮av一区二区三区| 国产高清一区日本| 中文字幕高清一区| 在线欧美日韩国产| 国产欧美综合色| 国产曰批免费观看久久久| 久久久青草青青国产亚洲免观| 国产激情一区二区三区四区| 欧美激情艳妇裸体舞| 91视频.com| 亚洲韩国精品一区| 欧美一区二区三区视频免费| 麻豆国产一区二区| 国产日本亚洲高清| 99re视频这里只有精品| 亚洲一区二区三区四区五区黄 | 日韩视频永久免费| 久久国产精品色| 久久久精品免费观看| 91在线视频免费91| 最新久久zyz资源站| 欧美午夜片在线看| 亚洲丰满少妇videoshd| 日韩西西人体444www| 国产一区视频导航| 久久精品人人做| 91日韩一区二区三区| 亚洲品质自拍视频网站| 日韩一级大片在线| 成人一级视频在线观看| 亚洲午夜精品17c| 欧美精品一区二区不卡| 99视频超级精品| 日av在线不卡| 国产精品国产三级国产有无不卡 | 99re66热这里只有精品3直播| 亚洲天堂精品视频| 欧美在线一区二区三区| 成人高清伦理免费影院在线观看| 国产在线精品免费| 93久久精品日日躁夜夜躁欧美| 九九九精品视频| 国产精品一卡二卡| 国模无码大尺度一区二区三区| 国产麻豆日韩欧美久久| 国产凹凸在线观看一区二区| 97精品久久久久中文字幕| 一本久久综合亚洲鲁鲁五月天| 色诱视频网站一区| 欧美日韩高清一区二区| 久久久久国产精品麻豆ai换脸| 亚洲视频网在线直播| 粉嫩绯色av一区二区在线观看| 亚洲欧洲日产国码二区| 制服丝袜国产精品| 99久久久国产精品免费蜜臀| 免费在线成人网| 亚洲一区二区在线观看视频| 久久久精品国产99久久精品芒果| 欧美午夜一区二区三区免费大片| 国产一区二区毛片| 日产国产高清一区二区三区| 亚洲日本成人在线观看| 日韩精品一区二区三区在线观看| 成人高清视频免费观看| 国内外成人在线| 亚洲va国产va欧美va观看| 欧美激情一区二区三区| 日韩欧美国产电影| 91在线云播放| 国产成人自拍在线| 欧美aaaaaa午夜精品| 自拍视频在线观看一区二区|