码迷,mamicode.com
首页 > 其他好文 > 详细

sleep机制

时间:2018-11-09 12:41:42      阅读:25      评论:0      收藏:0      [点我收藏+]

标签:任务   server   als   ota   ide   generate   ack   not   control   

1:如下条件都要满足才可以进入SLEEP

  1.1:

emAfForceEndDeviceToStayAwake=TURE;   不能SLEEP

 

1.2:

   如果emAfStayAwakeWhenNotJoined=1,则只有设备加入网络了才能睡觉

 

1.3:串口BUF中要没有数据才能睡觉

 

1.4这里面的任务的(emberAfGetCurrentSleepControlCallback() != EMBER_AF_STAY_AWAKE);

#define EMBER_AF_GENERATED_EVENT_CONTEXT { 0x1, 0x3, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfIdentifyClusterServerTickCallbackControl1}, \
{ 0x1, 0x19, true, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfOtaBootloadClusterClientTickCallbackControl1}, \
{ 0x2, 0x3, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfIdentifyClusterServerTickCallbackControl2}, \
{ 0x3, 0x3, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfIdentifyClusterServerTickCallbackControl3}, \
{ 0x4, 0x3, false, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfIdentifyClusterServerTickCallbackControl4}, \
{ 0x4, 0x19, true, EMBER_AF_LONG_POLL, EMBER_AF_OK_TO_SLEEP, &emberAfOtaBootloadClusterClientTickCallbackControl4}

 

 

开发人员可以使用下面这个函数来控制要不要进入睡眠

void emberAfForceEndDeviceToStayAwake(bool stayAwake)

sleep机制

标签:任务   server   als   ota   ide   generate   ack   not   control   

原文地址:https://www.cnblogs.com/zhuguangming/p/9934403.html

(0)
(0)
   
举报
评论 一句话评论(0
0条  
登录后才能评论!
© 2014 mamicode.com 版权所有 京ICP备13008772号-2
迷上了代码!