From 6bcbcb854d9b6df6aef0557522ed117aec557061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=A9=AC=5F666?= <13089258+pony-six-hundred-and-sixty-six@user.noreply.gitee.com> Date: Mon, 20 Jan 2025 14:34:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/src/bsp_nt26k.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/bsp/src/bsp_nt26k.c b/bsp/src/bsp_nt26k.c index de27533..c67b798 100644 --- a/bsp/src/bsp_nt26k.c +++ b/bsp/src/bsp_nt26k.c @@ -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