This commit is contained in:
小马_666 2025-01-20 14:34:07 +08:00
parent 9a7a6d49f1
commit 6bcbcb854d
1 changed files with 13 additions and 13 deletions

View File

@ -828,7 +828,12 @@ int Nt26k_Process_Events(Nt26kEvent nt26k_recv_event, struct at_device *device,
continue; continue;
} }
} }
else if (rt_strcmp(event->event_name, "掉电事件") == RT_EOK) else
{
return RT_EOK; // 函数执行完毕返回0
}
}
if (rt_strcmp(event->event_name, "掉电事件") == RT_EOK)
{ {
rt_uint8_t cnt = 0; rt_uint8_t cnt = 0;
while ((device_power_down_flag == 0)&&(cnt < 10)) while ((device_power_down_flag == 0)&&(cnt < 10))
@ -841,11 +846,6 @@ int Nt26k_Process_Events(Nt26kEvent nt26k_recv_event, struct at_device *device,
nt26k_power_down_flag = 1; nt26k_power_down_flag = 1;
} }
} }
else
{
return RT_EOK; // 函数执行完毕返回0
}
}
} }
} }
else else