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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 5a40bdfde0..a1fd58c447 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -43,7 +43,7 @@ static long last_read; /* Last button status, for debouncing/filtering */
43#ifdef HAVE_LCD_BITMAP 43#ifdef HAVE_LCD_BITMAP
44static bool flipped; /* buttons can be flipped to match the LCD flip */ 44static bool flipped; /* buttons can be flipped to match the LCD flip */
45#endif 45#endif
46#ifdef CONFIG_BACKLIGHT 46#if CONFIG_BACKLIGHT
47static bool filter_first_keypress; 47static bool filter_first_keypress;
48#ifdef HAVE_REMOTE_LCD 48#ifdef HAVE_REMOTE_LCD
49static bool remote_filter_first_keypress; 49static bool remote_filter_first_keypress;
@@ -71,7 +71,7 @@ static void button_tick(void)
71 static int repeat_count = 0; 71 static int repeat_count = 0;
72 static bool repeat = false; 72 static bool repeat = false;
73 static bool post = false; 73 static bool post = false;
74#ifdef CONFIG_BACKLIGHT 74#if CONFIG_BACKLIGHT
75 static bool skip_release = false; 75 static bool skip_release = false;
76#ifdef HAVE_REMOTE_LCD 76#ifdef HAVE_REMOTE_LCD
77 static bool skip_remote_release = false; 77 static bool skip_remote_release = false;
@@ -112,7 +112,7 @@ static void button_tick(void)
112 diff = btn ^ lastbtn; 112 diff = btn ^ lastbtn;
113 if(diff && (btn & diff) == 0) 113 if(diff && (btn & diff) == 0)
114 { 114 {
115#ifdef CONFIG_BACKLIGHT 115#if CONFIG_BACKLIGHT
116#ifdef HAVE_REMOTE_LCD 116#ifdef HAVE_REMOTE_LCD
117 if(diff & BUTTON_REMOTE) 117 if(diff & BUTTON_REMOTE)
118 if(!skip_remote_release) 118 if(!skip_remote_release)
@@ -202,7 +202,7 @@ static void button_tick(void)
202 if (queue_empty(&button_queue)) 202 if (queue_empty(&button_queue))
203 { 203 {
204 queue_post(&button_queue, BUTTON_REPEAT | btn, 0); 204 queue_post(&button_queue, BUTTON_REPEAT | btn, 0);
205#ifdef CONFIG_BACKLIGHT 205#if CONFIG_BACKLIGHT
206#ifdef HAVE_REMOTE_LCD 206#ifdef HAVE_REMOTE_LCD
207 skip_remote_release = false; 207 skip_remote_release = false;
208#endif 208#endif
@@ -213,7 +213,7 @@ static void button_tick(void)
213 } 213 }
214 else 214 else
215 { 215 {
216#ifdef CONFIG_BACKLIGHT 216#if CONFIG_BACKLIGHT
217#ifdef HAVE_REMOTE_LCD 217#ifdef HAVE_REMOTE_LCD
218 if (btn & BUTTON_REMOTE) { 218 if (btn & BUTTON_REMOTE) {
219 if (!remote_filter_first_keypress || is_remote_backlight_on() 219 if (!remote_filter_first_keypress || is_remote_backlight_on()
@@ -288,7 +288,7 @@ void button_init(void)
288#ifdef HAVE_LCD_BITMAP 288#ifdef HAVE_LCD_BITMAP
289 flipped = false; 289 flipped = false;
290#endif 290#endif
291#ifdef CONFIG_BACKLIGHT 291#if CONFIG_BACKLIGHT
292 filter_first_keypress = false; 292 filter_first_keypress = false;
293#ifdef HAVE_REMOTE_LCD 293#ifdef HAVE_REMOTE_LCD
294 remote_filter_first_keypress = false; 294 remote_filter_first_keypress = false;
@@ -360,7 +360,7 @@ void button_set_flip(bool flip)
360} 360}
361#endif /* HAVE_LCD_BITMAP */ 361#endif /* HAVE_LCD_BITMAP */
362 362
363#ifdef CONFIG_BACKLIGHT 363#if CONFIG_BACKLIGHT
364void set_backlight_filter_keypress(bool value) 364void set_backlight_filter_keypress(bool value)
365{ 365{
366 filter_first_keypress = value; 366 filter_first_keypress = value;