summaryrefslogtreecommitdiff
path: root/firmware/backlight.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r--firmware/backlight.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index aac438c673..76ffc6f0e4 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -156,14 +156,14 @@ static struct event_queue backlight_queue;
156 156
157static int backlight_timer; 157static int backlight_timer;
158static int backlight_timeout = 5*HZ; 158static int backlight_timeout = 5*HZ;
159#ifdef HAVE_CHARGING 159#ifdef CONFIG_CHARGING
160static int backlight_timeout_plugged = 5*HZ; 160static int backlight_timeout_plugged = 5*HZ;
161#endif 161#endif
162 162
163#ifdef HAVE_REMOTE_LCD 163#ifdef HAVE_REMOTE_LCD
164static int remote_backlight_timer; 164static int remote_backlight_timer;
165static int remote_backlight_timeout = 5*HZ; 165static int remote_backlight_timeout = 5*HZ;
166#ifdef HAVE_CHARGING 166#ifdef CONFIG_CHARGING
167static int remote_backlight_timeout_plugged = 5*HZ; 167static int remote_backlight_timeout_plugged = 5*HZ;
168#endif 168#endif
169#endif 169#endif
@@ -370,7 +370,7 @@ void backlight_thread(void)
370 { 370 {
371#ifdef HAVE_REMOTE_LCD 371#ifdef HAVE_REMOTE_LCD
372 case REMOTE_BACKLIGHT_ON: 372 case REMOTE_BACKLIGHT_ON:
373#ifdef HAVE_CHARGING 373#ifdef CONFIG_CHARGING
374 if (charger_inserted() 374 if (charger_inserted()
375#ifdef HAVE_USB_POWER 375#ifdef HAVE_USB_POWER
376 || usb_powered() 376 || usb_powered()
@@ -399,7 +399,7 @@ void backlight_thread(void)
399 399
400#endif /* HAVE_REMOTE_LCD */ 400#endif /* HAVE_REMOTE_LCD */
401 case BACKLIGHT_ON: 401 case BACKLIGHT_ON:
402#ifdef HAVE_CHARGING 402#ifdef CONFIG_CHARGING
403 if (charger_inserted() 403 if (charger_inserted()
404#ifdef HAVE_USB_POWER 404#ifdef HAVE_USB_POWER
405 || usb_powered() 405 || usb_powered()
@@ -447,7 +447,7 @@ void backlight_thread(void)
447 447
448static void backlight_tick(void) 448static void backlight_tick(void)
449{ 449{
450#ifdef HAVE_CHARGING 450#ifdef CONFIG_CHARGING
451 static bool charger_was_inserted = false; 451 static bool charger_was_inserted = false;
452 bool charger_is_inserted = charger_inserted() 452 bool charger_is_inserted = charger_inserted()
453#ifdef HAVE_USB_POWER 453#ifdef HAVE_USB_POWER
@@ -463,7 +463,7 @@ static void backlight_tick(void)
463#endif 463#endif
464 } 464 }
465 charger_was_inserted = charger_is_inserted; 465 charger_was_inserted = charger_is_inserted;
466#endif /* HAVE_CHARGING */ 466#endif /* CONFIG_CHARGING */
467 467
468 if(backlight_timer) 468 if(backlight_timer)
469 { 469 {
@@ -535,7 +535,7 @@ bool is_backlight_on(void)
535/* return value in ticks; 0 means always on, <0 means always off */ 535/* return value in ticks; 0 means always on, <0 means always off */
536int backlight_get_current_timeout(void) 536int backlight_get_current_timeout(void)
537{ 537{
538#ifdef HAVE_CHARGING 538#ifdef CONFIG_CHARGING
539 if (charger_inserted() 539 if (charger_inserted()
540#ifdef HAVE_USB_POWER 540#ifdef HAVE_USB_POWER
541 || usb_powered() 541 || usb_powered()
@@ -558,7 +558,7 @@ void backlight_set_timeout(int index)
558 backlight_on(); 558 backlight_on();
559} 559}
560 560
561#ifdef HAVE_CHARGING 561#ifdef CONFIG_CHARGING
562void backlight_set_timeout_plugged(int index) 562void backlight_set_timeout_plugged(int index)
563{ 563{
564 if((unsigned)index >= sizeof(backlight_timeout_value)) 564 if((unsigned)index >= sizeof(backlight_timeout_value))
@@ -589,7 +589,7 @@ void remote_backlight_set_timeout(int index)
589 remote_backlight_on(); 589 remote_backlight_on();
590} 590}
591 591
592#ifdef HAVE_CHARGING 592#ifdef CONFIG_CHARGING
593void remote_backlight_set_timeout_plugged(int index) 593void remote_backlight_set_timeout_plugged(int index)
594{ 594{
595 if((unsigned)index >= sizeof(backlight_timeout_value)) 595 if((unsigned)index >= sizeof(backlight_timeout_value))
@@ -603,7 +603,7 @@ void remote_backlight_set_timeout_plugged(int index)
603/* return value in ticks; 0 means always on, <0 means always off */ 603/* return value in ticks; 0 means always on, <0 means always off */
604int remote_backlight_get_current_timeout(void) 604int remote_backlight_get_current_timeout(void)
605{ 605{
606#ifdef HAVE_CHARGING 606#ifdef CONFIG_CHARGING
607 if (charger_inserted() 607 if (charger_inserted()
608#ifdef HAVE_USB_POWER 608#ifdef HAVE_USB_POWER
609 || usb_powered() 609 || usb_powered()