XR871-OLD
XR871-OLD copied to clipboard
按键定时器没有创建
应该加上这个标志,否则按键定时器还没有创建就跑到这了,会导致初始化重启 --- a/project/common/apps/buttons/buttons.c +++ b/project/common/apps/buttons/buttons.c @@ -331,6 +331,7 @@ static void buttons_process_thread(void *arg) int prev_buttons_state = 0; button_obj *obj;
-
buttons_timer_time_up = false; while (buttons_thread_run_flag) { /* wait a button trigger or button timer time is up */ if (button_impl.low_level_wait_semaphore)
buttons_timer_time_up 虽然初始化是0,但是按键初始化还是会跑到button_timer_event()函数。 可能是跟flash有关,具体原因不清楚
初始化,这个buttons_timer_cb回调本不应该有的,但是会跑一次,导致的这个问题