暂存+1
This commit is contained in:
parent
9a7a6d49f1
commit
6bcbcb854d
|
@ -828,24 +828,24 @@ int Nt26k_Process_Events(Nt26kEvent nt26k_recv_event, struct at_device *device,
|
|||
continue;
|
||||
}
|
||||
}
|
||||
else if (rt_strcmp(event->event_name, "掉电事件") == RT_EOK)
|
||||
{
|
||||
rt_uint8_t cnt = 0;
|
||||
while ((device_power_down_flag == 0)&&(cnt < 10))
|
||||
{
|
||||
rt_thread_mdelay(500);
|
||||
}
|
||||
if (device->class->device_ops->control(device, AT_DEVICE_CTRL_POWER_OFF, RT_NULL) == RT_EOK)
|
||||
{
|
||||
LOG_D("关闭模组");
|
||||
nt26k_power_down_flag = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return RT_EOK; // 函数执行完毕,返回0
|
||||
}
|
||||
}
|
||||
if (rt_strcmp(event->event_name, "掉电事件") == RT_EOK)
|
||||
{
|
||||
rt_uint8_t cnt = 0;
|
||||
while ((device_power_down_flag == 0)&&(cnt < 10))
|
||||
{
|
||||
rt_thread_mdelay(500);
|
||||
}
|
||||
if (device->class->device_ops->control(device, AT_DEVICE_CTRL_POWER_OFF, RT_NULL) == RT_EOK)
|
||||
{
|
||||
LOG_D("关闭模组");
|
||||
nt26k_power_down_flag = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue