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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 889c7a688d..b20afe13f6 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -52,12 +52,12 @@ static long last_read; /* Last button status, for debouncing/filtering */
52#ifdef HAVE_LCD_BITMAP 52#ifdef HAVE_LCD_BITMAP
53static bool flipped; /* buttons can be flipped to match the LCD flip */ 53static bool flipped; /* buttons can be flipped to match the LCD flip */
54#endif 54#endif
55#if CONFIG_BACKLIGHT 55#ifdef HAVE_BACKLIGHT
56static bool filter_first_keypress; 56static bool filter_first_keypress;
57#ifdef HAVE_REMOTE_LCD 57#ifdef HAVE_REMOTE_LCD
58static bool remote_filter_first_keypress; 58static bool remote_filter_first_keypress;
59#endif 59#endif
60#endif /* CONFIG_BACKLIGHT */ 60#endif /* HAVE_BACKLIGHT */
61#ifdef HAVE_HEADPHONE_DETECTION 61#ifdef HAVE_HEADPHONE_DETECTION
62bool phones_present = false; 62bool phones_present = false;
63#endif 63#endif
@@ -80,7 +80,7 @@ static void button_tick(void)
80 static int repeat_count = 0; 80 static int repeat_count = 0;
81 static bool repeat = false; 81 static bool repeat = false;
82 static bool post = false; 82 static bool post = false;
83#if CONFIG_BACKLIGHT 83#ifdef HAVE_BACKLIGHT
84 static bool skip_release = false; 84 static bool skip_release = false;
85#ifdef HAVE_REMOTE_LCD 85#ifdef HAVE_REMOTE_LCD
86 static bool skip_remote_release = false; 86 static bool skip_remote_release = false;
@@ -121,7 +121,7 @@ static void button_tick(void)
121 diff = btn ^ lastbtn; 121 diff = btn ^ lastbtn;
122 if(diff && (btn & diff) == 0) 122 if(diff && (btn & diff) == 0)
123 { 123 {
124#if CONFIG_BACKLIGHT 124#ifdef HAVE_BACKLIGHT
125#ifdef HAVE_REMOTE_LCD 125#ifdef HAVE_REMOTE_LCD
126 if(diff & BUTTON_REMOTE) 126 if(diff & BUTTON_REMOTE)
127 if(!skip_remote_release) 127 if(!skip_remote_release)
@@ -211,7 +211,7 @@ static void button_tick(void)
211 if (queue_empty(&button_queue)) 211 if (queue_empty(&button_queue))
212 { 212 {
213 queue_post(&button_queue, BUTTON_REPEAT | btn, 0); 213 queue_post(&button_queue, BUTTON_REPEAT | btn, 0);
214#if CONFIG_BACKLIGHT 214#ifdef HAVE_BACKLIGHT
215#ifdef HAVE_REMOTE_LCD 215#ifdef HAVE_REMOTE_LCD
216 skip_remote_release = false; 216 skip_remote_release = false;
217#endif 217#endif
@@ -222,7 +222,7 @@ static void button_tick(void)
222 } 222 }
223 else 223 else
224 { 224 {
225#if CONFIG_BACKLIGHT 225#ifdef HAVE_BACKLIGHT
226#ifdef HAVE_REMOTE_LCD 226#ifdef HAVE_REMOTE_LCD
227 if (btn & BUTTON_REMOTE) { 227 if (btn & BUTTON_REMOTE) {
228 if (!remote_filter_first_keypress || is_remote_backlight_on() 228 if (!remote_filter_first_keypress || is_remote_backlight_on()
@@ -347,7 +347,7 @@ void button_init(void)
347#ifdef HAVE_LCD_BITMAP 347#ifdef HAVE_LCD_BITMAP
348 flipped = false; 348 flipped = false;
349#endif 349#endif
350#if CONFIG_BACKLIGHT 350#ifdef HAVE_BACKLIGHT
351 filter_first_keypress = false; 351 filter_first_keypress = false;
352#ifdef HAVE_REMOTE_LCD 352#ifdef HAVE_REMOTE_LCD
353 remote_filter_first_keypress = false; 353 remote_filter_first_keypress = false;
@@ -419,7 +419,7 @@ void button_set_flip(bool flip)
419} 419}
420#endif /* HAVE_LCD_BITMAP */ 420#endif /* HAVE_LCD_BITMAP */
421 421
422#if CONFIG_BACKLIGHT 422#ifdef HAVE_BACKLIGHT
423void set_backlight_filter_keypress(bool value) 423void set_backlight_filter_keypress(bool value)
424{ 424{
425 filter_first_keypress = value; 425 filter_first_keypress = value;