summaryrefslogtreecommitdiff
path: root/firmware/backlight.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r--firmware/backlight.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index d621aa42d1..99da3df0a8 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -116,7 +116,7 @@ static struct event_queue backlight_queue;
116 116
117static int backlight_timer; 117static int backlight_timer;
118static int backlight_timeout = 5*HZ; 118static int backlight_timeout = 5*HZ;
119#ifdef CONFIG_CHARGING 119#if CONFIG_CHARGING
120static int backlight_timeout_plugged = 5*HZ; 120static int backlight_timeout_plugged = 5*HZ;
121#endif 121#endif
122#ifdef HAS_BUTTON_HOLD 122#ifdef HAS_BUTTON_HOLD
@@ -126,7 +126,7 @@ static int backlight_on_button_hold = 0;
126#ifdef HAVE_REMOTE_LCD 126#ifdef HAVE_REMOTE_LCD
127static int remote_backlight_timer; 127static int remote_backlight_timer;
128static int remote_backlight_timeout = 5*HZ; 128static int remote_backlight_timeout = 5*HZ;
129#ifdef CONFIG_CHARGING 129#if CONFIG_CHARGING
130static int remote_backlight_timeout_plugged = 5*HZ; 130static int remote_backlight_timeout_plugged = 5*HZ;
131#endif 131#endif
132#ifdef HAS_REMOTE_BUTTON_HOLD 132#ifdef HAS_REMOTE_BUTTON_HOLD
@@ -347,7 +347,7 @@ static void __remote_backlight_off(void)
347/* Update state of backlight according to timeout setting */ 347/* Update state of backlight according to timeout setting */
348static void backlight_update_state(void) 348static void backlight_update_state(void)
349{ 349{
350#ifdef CONFIG_CHARGING 350#if CONFIG_CHARGING
351 if (charger_inserted() 351 if (charger_inserted()
352#ifdef HAVE_USB_POWER 352#ifdef HAVE_USB_POWER
353 || usb_powered() 353 || usb_powered()
@@ -386,7 +386,7 @@ static void backlight_update_state(void)
386/* Update state of remote backlight according to timeout setting */ 386/* Update state of remote backlight according to timeout setting */
387static void remote_backlight_update_state(void) 387static void remote_backlight_update_state(void)
388{ 388{
389#ifdef CONFIG_CHARGING 389#if CONFIG_CHARGING
390 if (charger_inserted() 390 if (charger_inserted()
391#ifdef HAVE_USB_POWER 391#ifdef HAVE_USB_POWER
392 || usb_powered() 392 || usb_powered()
@@ -503,7 +503,7 @@ void backlight_thread(void)
503 503
504static void backlight_tick(void) 504static void backlight_tick(void)
505{ 505{
506#ifdef CONFIG_CHARGING 506#if CONFIG_CHARGING
507 static bool charger_was_inserted = false; 507 static bool charger_was_inserted = false;
508 bool charger_is_inserted = charger_inserted() 508 bool charger_is_inserted = charger_inserted()
509#ifdef HAVE_USB_POWER 509#ifdef HAVE_USB_POWER
@@ -622,7 +622,7 @@ bool is_backlight_on(void)
622/* return value in ticks; 0 means always on, <0 means always off */ 622/* return value in ticks; 0 means always on, <0 means always off */
623int backlight_get_current_timeout(void) 623int backlight_get_current_timeout(void)
624{ 624{
625#ifdef CONFIG_CHARGING 625#if CONFIG_CHARGING
626 if (charger_inserted() 626 if (charger_inserted()
627#ifdef HAVE_USB_POWER 627#ifdef HAVE_USB_POWER
628 || usb_powered() 628 || usb_powered()
@@ -645,7 +645,7 @@ void backlight_set_timeout(int index)
645 backlight_update_state(); 645 backlight_update_state();
646} 646}
647 647
648#ifdef CONFIG_CHARGING 648#if CONFIG_CHARGING
649void backlight_set_timeout_plugged(int index) 649void backlight_set_timeout_plugged(int index)
650{ 650{
651 if((unsigned)index >= sizeof(backlight_timeout_value)) 651 if((unsigned)index >= sizeof(backlight_timeout_value))
@@ -724,7 +724,7 @@ void remote_backlight_set_timeout(int index)
724 remote_backlight_update_state(); 724 remote_backlight_update_state();
725} 725}
726 726
727#ifdef CONFIG_CHARGING 727#if CONFIG_CHARGING
728void remote_backlight_set_timeout_plugged(int index) 728void remote_backlight_set_timeout_plugged(int index)
729{ 729{
730 if((unsigned)index >= sizeof(backlight_timeout_value)) 730 if((unsigned)index >= sizeof(backlight_timeout_value))
@@ -766,7 +766,7 @@ void remote_backlight_set_on_button_hold(int index)
766/* return value in ticks; 0 means always on, <0 means always off */ 766/* return value in ticks; 0 means always on, <0 means always off */
767int remote_backlight_get_current_timeout(void) 767int remote_backlight_get_current_timeout(void)
768{ 768{
769#ifdef CONFIG_CHARGING 769#if CONFIG_CHARGING
770 if (charger_inserted() 770 if (charger_inserted()
771#ifdef HAVE_USB_POWER 771#ifdef HAVE_USB_POWER
772 || usb_powered() 772 || usb_powered()