From 50bcbe4bf5b74699343fa1611833737d8169488a Mon Sep 17 00:00:00 2001 From: nekomona Date: Thu, 6 Jan 2022 22:21:26 +0800 Subject: [PATCH] Fix crashing due to unwanted interrupt nesting --- firmware/keyboard/sipeed_keyboard_68/smk_hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/keyboard/sipeed_keyboard_68/smk_hid.c b/firmware/keyboard/sipeed_keyboard_68/smk_hid.c index 6b39b54..6ceb4de 100644 --- a/firmware/keyboard/sipeed_keyboard_68/smk_hid.c +++ b/firmware/keyboard/sipeed_keyboard_68/smk_hid.c @@ -234,9 +234,9 @@ void kb_set_idle_callback(uint8_t reportid, uint8_t duration){ kb_idle=duration==0; kb_idle_dur=duration*4; if(duration==0) - xTimerChangePeriod(hid_timer,portMAX_DELAY,portMAX_DELAY); + xTimerChangePeriodFromISR(hid_timer,portMAX_DELAY,NULL); else - xTimerChangePeriod(hid_timer,pdMS_TO_TICKS(kb_idle_dur),portMAX_DELAY); + xTimerChangePeriodFromISR(hid_timer,pdMS_TO_TICKS(kb_idle_dur),NULL); } void smk_reset_callback(){