summaryrefslogtreecommitdiff
path: root/firmware/drivers/button.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r--firmware/drivers/button.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index b9473bec24..d38306b3ca 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -465,10 +465,10 @@ void button_set_flip(bool flip)
465 if (flip != flipped) /* not the current setting */ 465 if (flip != flipped) /* not the current setting */
466 { 466 {
467 /* avoid race condition with the button_tick() */ 467 /* avoid race condition with the button_tick() */
468 int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL); 468 int oldlevel = disable_irq_save();
469 lastbtn = button_flip(lastbtn); 469 lastbtn = button_flip(lastbtn);
470 flipped = flip; 470 flipped = flip;
471 set_irq_level(oldlevel); 471 restore_irq(oldlevel);
472 } 472 }
473} 473}
474#endif /* HAVE_LCD_BITMAP */ 474#endif /* HAVE_LCD_BITMAP */