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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 66c7e978fb..cbb6d58f7b 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -30,6 +30,7 @@
#include "adc.h"
#include "serial.h"
#include "power.h"
+#include "system.h"
struct event_queue button_queue;
@@ -256,10 +257,10 @@ static int button_flip(int button)
*/
void button_set_flip(bool flip)
{
- if (flip != flipped) /* not the curent setting */
+ if (flip != flipped) /* not the current setting */
{
/* avoid race condition with the button_tick() */
- int oldlevel = set_irq_level(15);
+ int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
lastbtn = button_flip(lastbtn);
flipped = flip;
set_irq_level(oldlevel);