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 b9473be..d38306b 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -465,10 +465,10 @@ void button_set_flip(bool flip)
if (flip != flipped) /* not the current setting */
{
/* avoid race condition with the button_tick() */
- int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
+ int oldlevel = disable_irq_save();
lastbtn = button_flip(lastbtn);
flipped = flip;
- set_irq_level(oldlevel);
+ restore_irq(oldlevel);
}
}
#endif /* HAVE_LCD_BITMAP */