Skip to content

Commit

Permalink
Merge pull request #39 from nekomona/main
Browse files Browse the repository at this point in the history
Fix crashing due to unwanted interrupt nesting
  • Loading branch information
bitsk authored Jan 8, 2022
2 parents 29e22c1 + 50bcbe4 commit d10aad9
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 d10aad9

Please sign in to comment.