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

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

?? coordinatora.c

?? 此程式庫有許多的zigbee程式源碼
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
}/**************************************************************************** * * NAME: vProcessCurrentTimeBlock * * DESCRIPTION: * Operates a simple state machine. Called 20 times per second, this performs * several tasks over a 1 second period, with the time split into 50ms blocks. * In one block it updates the display, in another it starts a reading from * the temperature, in another it reads the temperature, etc. * * PARAMETERS:      Name            RW  Usage *                  u8TimeBlock     R   Current time block, 0-19 * * RETURNS: * void * * NOTES: * A value greater than 19 may be used for u8TimeBlock, to ensure that the * simple state machine remains idle. * ****************************************************************************/PRIVATE void vProcessCurrentTimeBlock(uint8 u8TimeBlock){    uint8 u8LocalSensor;    /* Process current block scheduled activity */    switch (u8TimeBlock)    {    case BLOCK_UPDATE:        /* Time to update the display */        vProcessUpdateBlock();        /* Also update the information passed back to the endpoints in the           beacon payload */        vUpdateBeaconPayload();        break;    case BLOCK_START_TEMP:        /* Time to start read of the temperature sensor. We read sensors           even if we don't use the data, as the coordinator is assumed to           be a device that doesn't have to be particularly economical on           power */        vHTSstartReadTemp();        break;    case BLOCK_READ_TEMP:        /* Time to read the temperature sensor */        u8LocalSensor = (uint8)u16HTSreadTempResult();        if (u8LocalSensor > 52)        {            u8LocalSensor = 52;        }        if (sDemoData.sNode.bLocalNode)        {            sDemoData.sNode.asNodeData[0].asNodeElementData[E_SENSOR_TEMP].u8NowValue = u8LocalSensor;            sDemoData.sNode.asNodeData[0].u8FramesMissed = 0;        }        break;    case BLOCK_START_HUMIDITY:        /* Time to start a read of the humidity sensor */        vHTSstartReadHumidity();        break;    case BLOCK_READ_HUMIDITY:        /* Time to read the humidity sensor */        u8LocalSensor = (uint8)u16HTSreadHumidityResult();        if (u8LocalSensor > 104)        {            u8LocalSensor = 104;        }        if (sDemoData.sNode.bLocalNode)        {            sDemoData.sNode.asNodeData[0].asNodeElementData[E_SENSOR_HTS].u8NowValue = u8LocalSensor;        }        break;    case BLOCK_READ_LIGHT:        /* Time to read the light sensor. This sensor automatically starts           a new conversion afterwards so there is no need for a 'start read' */        u8LocalSensor = (uint8)(u16ALSreadChannelResult() >> 9);        if (u8LocalSensor > 6)        {            u8LocalSensor = 6;        }        if (sDemoData.sNode.bLocalNode)        {            sDemoData.sNode.asNodeData[0].asNodeElementData[E_SENSOR_ALS].u8NowValue = u8LocalSensor;        }        break;    }}/**************************************************************************** * * NAME: bProcessKeys * * DESCRIPTION: * Gets the latest button presses and detects any change since the last time * the buttons were checked. If there is a change it is passed to the * individual handler for the screen currently being displayed (the buttons * are all 'soft' keys so their meaning changes from screen to screen). The * exception to this is a button combination that causes the software to * shutdown and stop the LCD. There is also a reset combination. * * PARAMETERS:      Name            RW  Usage *                  pu8Keys         RW  Persistent value of buttons pressed * * RETURNS: * TRUE if reset combination is pressed * ****************************************************************************/PRIVATE bool_t bProcessKeys(uint8 *pu8Keys){    uint8 u8KeysDown;    uint8 u8NewKeysDown;    uint8 *fad;       u8KeysDown = *pu8Keys;    /* Process key press */    u8NewKeysDown = u8ButtonReadFfd();    if (u8NewKeysDown != 0)    {        if ((u8NewKeysDown | u8KeysDown) != u8KeysDown)        {           /* Logical OR values to enable multiple keys at once */           u8KeysDown |= u8NewKeysDown;           /* Key presses depend on mode */         	if(LCD_RT){         		 vProcessKeyPressSelet(u8KeysDown);         		char acString[5];	         			    			if(Foodau2==1){	    			vValToDec(acString, sfootData.food, "  ");    				vLcdWriteText(acString, Foodau1, 40);	    		}	    		if(Foodau2==2){	    			vValToDec(acString, sfootData.number, "  ");    				vLcdWriteText(acString, Foodau1, 110);	    		}    			    			vLcdRefreshAll();            }            else{               vLcdClear();               vLcdRefreshAll();               vLcdLine(6);               vLcdWriteText("Select", 7, 0);				vLcdWriteText("\\", 7, 47);				vLcdWriteText("]", 7, 74);				vLcdWriteText("send", 7, 103);               vLcdRefreshAll();               LCD_RT=1;               }        }    }    else    {        u8KeysDown = 0;    }    /* Store value for use next time */    *pu8Keys = u8KeysDown;    return (u8KeysDown == E_KEYS_0_AND_3);}/****************************************************************************/PRIVATE void vProcessKeyPressSelet(uint8 u8KeyMap){    switch (u8KeyMap)    {    case E_KEY_0:    		if(Foodau1<=4){	    		Foodau2++;	    		if(Foodau2>=3){	    			FOOD[Foodau1*2]=sfootData.food;	    			FOOD[Foodau1*2+1]=sfootData.number;	    			vLcdWriteText("^NUMBER", Foodau1, 60);	    			Foodau1++;	    			Foodau2=1;	    			sfootData.food=sfootData.number=0;	    			if(Foodau1==4){break;}	    		}	    		if(Foodau2==1){	    			vLcdWriteText("@FOOD", Foodau1, 0);	    		}	    		if(Foodau2==2){	    			vLcdWriteText("^FOOD", Foodau1, 0);	    			vLcdWriteText("@NUMBER", Foodau1, 60);	    		}	    		vLcdRefreshAll();	    	}    		        break;    case E_KEY_1:    	if(Foodau1<=4){	    	if(Foodau2==1){				    		vAdjustAlarm(&sfootData.food, 5, 1, TRUE);	    	}	    	if(Foodau2==2){				    		vAdjustAlarm(&sfootData.number, 20, 1, TRUE);	    	}      	}        break;    case E_KEY_2:    	if(Foodau1<=4){        	if(Foodau2==1){			      			vAdjustAlarm(&sfootData.food, 5, 1, 0);      		}      		if(Foodau2==2){			      			vAdjustAlarm(&sfootData.number, 20, 1, 0);      		}      	}        break;    case E_KEY_3:               break;    }}/**************************************************************************** * * NAME: u8UpdateTimeBlock * * DESCRIPTION: * Moves the state machine time block on by one time period. * * PARAMETERS:      Name            RW  Usage *                  u8TimeBlock     R   Previous time block * * RETURNS: * uint8 Next time block * ****************************************************************************/PRIVATE uint8 u8UpdateTimeBlock(uint8 u8TimeBlock){    /* Update block state for next time, if in a state where regular       updates should be performed */    if ((sDemoData.sSystem.eState != E_STATE_SET_CHANNEL)        && (sDemoData.sSystem.eState != E_STATE_SETUP_SCREEN)        && (sDemoData.sSystem.eState != E_STATE_SCANNING))    {        u8TimeBlock++;        if (u8TimeBlock >= MAX_BLOCKS)        {            u8TimeBlock = 0;        }    }    return u8TimeBlock;}/**************************************************************************** * * 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 timeout has * happened, the loop is exited. * * RETURNS: * void when a timeout is detected * * NOTES: * There is a possibility of the system locking up if an interrupt is * generated and handled by the Application Queue API just before the request * to doze the CPU. Normally there won't be an issue as the wake-up timer will * generate an interrupt eventually, but it is theoretically possible that an * MLME or MCPS event just before the timer fires could create this situation * (has never been seen in practice). An easy solution is to use the second * wake-up timer as a watchdog. * ****************************************************************************/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)            {                vProcessIncomingData(psMcpsInd);                vAppQApiReturnMcpsIndBuffer(psMcpsInd);            }        } while (psMcpsInd != NULL);        /* Check for anything on the MLME upward queue */        do        {            psMlmeInd = psAppQApiReadMlmeInd();            if (psMlmeInd != NULL)            {                vProcessIncomingMlme(psMlmeInd);                vAppQApiReturnMlmeIndBuffer(psMlmeInd);            }        } while (psMlmeInd != NULL);        /* Check for anything on the AHI upward queue */        do        {            psAHI_Ind = psAppQApiReadHwInd();            if (psAHI_Ind != NULL)            {                if (bProcessForTimeout(psAHI_Ind) == TRUE)                {                    bDone = TRUE;                }                vAppQApiReturnHwIndBuffer(psAHI_Ind);            }        } while (psAHI_Ind != NULL);    } while (bDone == FALSE);}/**************************************************************************** * * NAME: vProcessIncomingData * * DESCRIPTION: * Deals with any incoming MCPS data events. If the event is an indication * from a device with a short address matching a demo endpoint, the data in * the payload is stored for display the next time that the LCD is updated. * * PARAMETERS: Name        RW  Usage *             psMcpsInd   R   Pointer to structure containing MCPS event * * RETURNS: * void * ****************************************************************************/PRIVATE void vProcessIncomingData(MAC_McpsDcfmInd_s *psMcpsInd){    MAC_RxFrameData_s *psFrame;    MAC_Addr_s *psAddr;    tsNodeData *psNodeData;    uint16 u16NodeAddr;    uint8 u8Node;    uint8 u8Count;    psFrame = &psMcpsInd->uParam.sIndData.sFrame;    /* Check that MCPS frame is a valid sensor one */    if ((psMcpsInd->u8Type != MAC_MCPS_IND_DATA)        || (psFrame->u8SduLength != 8)        || (psFrame->au8Sdu[0] != DEMO_ENDPOINT_IDENTIFIER))    {        return;    }    /* Use address to determine node */    psAddr = &psFrame->sSrcAddr;    if (psAddr->u8AddrMode != 2)    {        return;    }    u16NodeAddr = psAddr->uAddr.u16Short;    if ((u16NodeAddr < DEMO_ENDPOINT_ADDR_BASE)        || (u16NodeAddr >= (DEMO_ENDPOINT_ADDR_BASE + DEMO_ENDPOINTS)))    {        return;    }    /* Store data for node */    u8Node = (uint8)(u16NodeAddr - DEMO_ENDPOINT_ADDR_BASE);    psNodeData = &sDemoData.sNode.asNodeData[u8Node];    psNodeData->u8FramesMissed = 0;    psNodeData->u8SwitchOn = psFrame->au8Sdu[2];    vLedControl(u8Node, psNodeData->u8SwitchOn);    for (u8Count = 0; u8Count < DEMO_SENSOR_LIST_LEN; u8Count++)    {        psNodeData->asNodeElementData[u8Count].u8NowValue = psFrame->au8Sdu[u8Count + 3];    }    psNodeData->u8Rssi = psFrame->u8LinkQuality;}/**************************************************************************** * * NAME: vProcessIncomingMlme * * DESCRIPTION: * Deals with any incoming MCPS events. If the event is an indication that * device wants to associate, goes through a process to determine a short * address for the device, either as 'next on the list' or the same address * that was proviously given if the device has associated before. Then sends * an association response via the stack. * * For debug purposes, also displays any Communication Status indications. * * PARAMETERS: Name        RW  Usage *             psMlmeInd   R   Pointer to structure containing MLME event * * RETURNS: * void * ****************************************************************************/PRIVATE void vProcessIncomingMlme(MAC_MlmeDcfmInd_s *psMlmeInd){    MAC_MlmeReqRsp_s   sMlmeReqRsp;    MAC_MlmeSyncCfm_s  sMlmeSyncCfm;    uint16             u16ShortAddress;    uint8              u8Node;    uint8              u8AssocStatus;    switch (psMlmeInd->u8Type)    {    case MAC_MLME_IND_ASSOCIATE:        /* Only respond if in network or node modes. We aren't a coordinator           until then */        if ((sDemoData.sSystem.eState == E_STATE_NETWORK)            || (sDemoData.sSystem.eState == E_STATE_NODE)            || (sDemoData.sSystem.eState == E_STATE_NODE_CONTROL))        {            /* Default short address */            u16ShortAddress = 0xffff;            /* Check node extended address matches and device wants short address               (for the demo, we only use short address) */            if (psMlmeInd->uParam.sIndAssociate.u8Capability & 0x80)            {                /* Check if already associated (idiot proofing) */                u8Node = 0;                while (u8Node < sDemoData.sNode.u8AssociatedNodes)                {                    if ((psMlmeInd->uParam.sIndAssociate.sDeviceAddr.u32L == sDemoData.sNode.asAssocNodes[u8Node].sExtAddr.u32L) &&                        (psMlmeInd->uParam.sIndAssociate.sDeviceAddr.u32H == sDemoData.sNode.asAssocNodes[u8Node].sExtAddr.u32H))                    {                        /* Already in system: give it same short address */                        u16ShortAddress = sDemoData.sNode.asAssocNodes[u8Node].u16ShortAddr;                    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产人妖系列| 久久久久久久综合狠狠综合| 2024国产精品| 欧美一二三区精品| 日韩免费福利电影在线观看| 狠狠色丁香婷婷综合| 成人av在线资源网站| 国产在线一区观看| 91麻豆产精品久久久久久| 欧美精品久久99久久在免费线| 欧洲国内综合视频| 久久久午夜精品理论片中文字幕| 国产精品第13页| 亚洲一区二区精品视频| 麻豆精品一区二区三区| av高清久久久| 久久精品一二三| 一区二区激情视频| 国产高清精品在线| 777久久久精品| 久久久久99精品一区| 夜夜嗨av一区二区三区网页| 国模大尺度一区二区三区| 99在线精品视频| 2020国产精品自拍| 日韩在线一区二区| 色菇凉天天综合网| 成人欧美一区二区三区白人| 亚洲精品少妇30p| 国产高清不卡一区| 欧美一区二区三区精品| 国产精品久久久久9999吃药| 精品一区二区三区免费播放 | 亚洲在线中文字幕| 国产suv一区二区三区88区| 91精品国产色综合久久不卡电影| 亚洲日本va午夜在线影院| 国产酒店精品激情| 欧美电影免费观看高清完整版在线 | 日韩欧美成人一区二区| 日韩精品久久久久久| 欧美美女一区二区三区| 免费精品视频在线| 久久伊人中文字幕| 99久久婷婷国产综合精品电影| 自拍偷拍国产精品| 91黄色免费看| 亚洲va天堂va国产va久| 欧美日韩成人综合在线一区二区| 调教+趴+乳夹+国产+精品| 51久久夜色精品国产麻豆| 精品亚洲国产成人av制服丝袜| 精品国产在天天线2019| 不卡免费追剧大全电视剧网站| 亚洲欧美自拍偷拍色图| 欧美日韩在线播放一区| 午夜a成v人精品| 337p粉嫩大胆噜噜噜噜噜91av| 懂色av一区二区三区免费观看| 国产精品久久久久久久第一福利| 在线观看网站黄不卡| 亚洲电影第三页| 欧美一区二区三区喷汁尤物| 奇米影视一区二区三区| 国产亚洲自拍一区| 成人深夜福利app| 综合久久一区二区三区| 色妹子一区二区| 日韩不卡一区二区| 国产日本亚洲高清| 欧美亚洲免费在线一区| 麻豆一区二区三| 亚洲精品视频在线观看网站| 91精品在线免费| 99国产精品久久| 久久er精品视频| 亚洲女同女同女同女同女同69| 91精品久久久久久久91蜜桃| 岛国精品在线观看| 日本成人在线电影网| 日韩美女啊v在线免费观看| 337p亚洲精品色噜噜噜| 国产成人精品网址| 爽爽淫人综合网网站| 亚洲三级免费观看| 26uuu亚洲综合色| 欧美日本一区二区| 91在线一区二区三区| 国产在线不卡视频| 亚洲图片自拍偷拍| 日本一区二区三区在线观看| 欧美一级黄色片| 国产a久久麻豆| 亚洲成av人片一区二区三区| 国产欧美日韩精品a在线观看| 欧美日韩视频一区二区| 成人av在线资源网站| 免费成人在线观看| 午夜国产精品一区| 亚洲一卡二卡三卡四卡五卡| 国产精品人人做人人爽人人添| 日韩一卡二卡三卡四卡| 日本韩国一区二区三区| 国产一区二区三区在线观看精品 | 国产精品视频一区二区三区不卡| 日韩欧美亚洲另类制服综合在线| 在线观看一区二区精品视频| 99re热视频精品| 成人avav在线| 成人av在线电影| 播五月开心婷婷综合| 国产大陆亚洲精品国产| 国产精品一区在线观看乱码| 韩国av一区二区| 国内久久婷婷综合| 精品一区二区三区在线视频| 久久草av在线| 日韩精品一卡二卡三卡四卡无卡| 亚洲欧美韩国综合色| 亚洲精品综合在线| 亚洲人成网站精品片在线观看| 国产亚洲欧美日韩在线一区| 久久久精品国产99久久精品芒果| 欧美电影免费观看高清完整版在线 | 日韩视频免费直播| 欧美一区二区二区| 欧美一区二区三区影视| 91精品国产一区二区三区| 56国语精品自产拍在线观看| 欧美一区二区在线视频| 欧美日韩亚洲综合| 91视频国产资源| 在线亚洲一区观看| 色嗨嗨av一区二区三区| 在线观看视频一区| 制服丝袜中文字幕亚洲| 欧美日韩一区小说| 欧美一区二区观看视频| 久久伊99综合婷婷久久伊| 国产精品三级av在线播放| 日本一区二区免费在线观看视频| 国产精品三级视频| 亚洲黄色av一区| 亚洲3atv精品一区二区三区| 美女一区二区视频| 成人一级片在线观看| 在线免费视频一区二区| 日韩一级免费一区| 国产精品天干天干在线综合| 亚洲自拍偷拍网站| 久久99国产乱子伦精品免费| 国产盗摄精品一区二区三区在线| 色综合咪咪久久| 欧美tickling挠脚心丨vk| 国产精品毛片a∨一区二区三区| 亚洲综合激情小说| 国内精品不卡在线| 欧美亚一区二区| 亚洲精品一区二区在线观看| 亚洲视频免费在线观看| 日韩av一区二区三区| www.久久久久久久久| 欧美一区二区视频在线观看| 国产精品美女久久久久久2018| 视频一区二区三区在线| 99久久99久久精品免费观看| 欧美剧情片在线观看| 国产精品伦理在线| 美女脱光内衣内裤视频久久网站 | 亚洲丝袜另类动漫二区| 捆绑调教一区二区三区| 色综合中文综合网| 在线不卡一区二区| 亚洲视频在线观看一区| 国产一区在线不卡| 4438x亚洲最大成人网| 亚洲精品中文在线观看| 国产真实乱偷精品视频免| 欧美精品一二三| 亚洲精选在线视频| 成人国产免费视频| 久久亚洲精华国产精华液| 亚洲精品视频在线观看网站| 岛国精品一区二区| 欧美一级xxx| 婷婷久久综合九色国产成人| 色婷婷国产精品综合在线观看| 国产欧美精品国产国产专区| 视频一区中文字幕国产| 91精品福利视频| 亚洲狠狠丁香婷婷综合久久久| 国产91色综合久久免费分享| 精品精品国产高清a毛片牛牛| 亚洲国产精品久久久久秋霞影院| 色婷婷av久久久久久久| 一区免费观看视频| a4yy欧美一区二区三区| 中文字幕中文在线不卡住| 成人av电影在线网| 18成人在线观看|