diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-02-18 05:32:06 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-02-18 05:32:06 +0000 |
commit | 9a6f419775270340ee154c55dbe52e99682fb77a (patch) | |
tree | 188fa4854d2ac5529f701de1bbba29a3241495bc /firmware/backlight.c | |
parent | bd47d48c21ddcdd56b3654db78613d93739b8ce7 (diff) | |
download | rockbox-9a6f419775270340ee154c55dbe52e99682fb77a.tar.gz rockbox-9a6f419775270340ee154c55dbe52e99682fb77a.zip |
CONFIG_CHARGING
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12384 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r-- | firmware/backlight.c | 18 |
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 | ||
117 | static int backlight_timer; | 117 | static int backlight_timer; |
118 | static int backlight_timeout = 5*HZ; | 118 | static int backlight_timeout = 5*HZ; |
119 | #ifdef CONFIG_CHARGING | 119 | #if CONFIG_CHARGING |
120 | static int backlight_timeout_plugged = 5*HZ; | 120 | static 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 |
127 | static int remote_backlight_timer; | 127 | static int remote_backlight_timer; |
128 | static int remote_backlight_timeout = 5*HZ; | 128 | static int remote_backlight_timeout = 5*HZ; |
129 | #ifdef CONFIG_CHARGING | 129 | #if CONFIG_CHARGING |
130 | static int remote_backlight_timeout_plugged = 5*HZ; | 130 | static 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 */ |
348 | static void backlight_update_state(void) | 348 | static 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 */ |
387 | static void remote_backlight_update_state(void) | 387 | static 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 | ||
504 | static void backlight_tick(void) | 504 | static 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 */ |
623 | int backlight_get_current_timeout(void) | 623 | int 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 |
649 | void backlight_set_timeout_plugged(int index) | 649 | void 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 |
728 | void remote_backlight_set_timeout_plugged(int index) | 728 | void 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 */ |
767 | int remote_backlight_get_current_timeout(void) | 767 | int 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() |