diff options
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r-- | firmware/drivers/button.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 06c24e0e45..66c7e978fb 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c | |||
@@ -258,10 +258,11 @@ void button_set_flip(bool flip) | |||
258 | { | 258 | { |
259 | if (flip != flipped) /* not the curent setting */ | 259 | if (flip != flipped) /* not the curent setting */ |
260 | { | 260 | { |
261 | cli(); /* avoid race condition with the button_tick() */ | 261 | /* avoid race condition with the button_tick() */ |
262 | int oldlevel = set_irq_level(15); | ||
262 | lastbtn = button_flip(lastbtn); | 263 | lastbtn = button_flip(lastbtn); |
263 | flipped = flip; | 264 | flipped = flip; |
264 | sti(); | 265 | set_irq_level(oldlevel); |
265 | } | 266 | } |
266 | } | 267 | } |
267 | 268 | ||