Skip to content

Commit

Permalink
Fix crashing due to unwanted interrupt nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
nekomona committed Jan 6, 2022
1 parent 166bdb0 commit 50bcbe4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firmware/keyboard/sipeed_keyboard_68/smk_hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down

0 comments on commit 50bcbe4

Please sign in to comment.