summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-10-09 19:56:27 +0000
committerJens Arnold <amiconn@rockbox.org>2004-10-09 19:56:27 +0000
commita1a08d0d5f36ab2212d9e1b78e54467469f4cf25 (patch)
treef640797017847e792df9abb7f6f872eefa670a06
parent5ae37f0ddbd2b072d61e63529926663a7dad6c47 (diff)
downloadrockbox-a1a08d0d5f36ab2212d9e1b78e54467469f4cf25.tar.gz
rockbox-a1a08d0d5f36ab2212d9e1b78e54467469f4cf25.zip
Removed backlight handling remains for platforms with no backlight (Ondio)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5236 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/settings.c6
-rw-r--r--apps/settings_menu.c7
-rw-r--r--apps/wps-display.c2
-rw-r--r--firmware/backlight.c4
4 files changed, 15 insertions, 4 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 9f9dce79c4..04a0e3cd84 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -182,10 +182,12 @@ static const struct bit_entry rtc_bits[] =
182 {2, S_O(repeat_mode), REPEAT_ALL, "repeat", "off,all,one" }, 182 {2, S_O(repeat_mode), REPEAT_ALL, "repeat", "off,all,one" },
183 /* LCD */ 183 /* LCD */
184 {6, S_O(contrast), 40, "contrast", NULL }, 184 {6, S_O(contrast), 40, "contrast", NULL },
185#ifdef HAVE_BACKLIGHT
185 {1, S_O(backlight_on_when_charging), false, 186 {1, S_O(backlight_on_when_charging), false,
186 "backlight when plugged", off_on }, 187 "backlight when plugged", off_on },
187 {5, S_O(backlight_timeout), 5, "backlight timeout", 188 {5, S_O(backlight_timeout), 5, "backlight timeout",
188 "off,on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90" }, 189 "off,on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90" },
190#endif
189#ifdef HAVE_LCD_BITMAP 191#ifdef HAVE_LCD_BITMAP
190 {1, S_O(invert), false, "invert", off_on }, 192 {1, S_O(invert), false, "invert", off_on },
191 {1, S_O(flip_display), false, "flip display", off_on }, 193 {1, S_O(flip_display), false, "flip display", off_on },
@@ -245,7 +247,9 @@ static const struct bit_entry hd_bits[] =
245 247
246 /* # of bits, offset+size, default, .cfg name, .cfg values */ 248 /* # of bits, offset+size, default, .cfg name, .cfg values */
247 /* more display */ 249 /* more display */
250#ifdef HAVE_BACKLIGHT
248 {1, S_O(caption_backlight), false, "caption backlight", off_on }, 251 {1, S_O(caption_backlight), false, "caption backlight", off_on },
252#endif
249 {5, S_O(scroll_speed), 8, "scroll speed", NULL }, /* 1...25 */ 253 {5, S_O(scroll_speed), 8, "scroll speed", NULL }, /* 1...25 */
250 {7, S_O(scroll_step), 6, "scroll step", NULL }, /* 1...112 */ 254 {7, S_O(scroll_step), 6, "scroll step", NULL }, /* 1...112 */
251 {8, S_O(scroll_delay), 100, "scroll delay", NULL }, /* 0...250 */ 255 {8, S_O(scroll_delay), 100, "scroll delay", NULL }, /* 0...250 */
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index 4e9ec25d79..099b912efe 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -75,6 +75,7 @@ static bool contrast(void)
75 MAX_CONTRAST_SETTING ); 75 MAX_CONTRAST_SETTING );
76} 76}
77 77
78#ifdef HAVE_BACKLIGHT
78static bool caption_backlight(void) 79static bool caption_backlight(void)
79{ 80{
80 bool rc = set_bool( str(LANG_CAPTION_BACKLIGHT), 81 bool rc = set_bool( str(LANG_CAPTION_BACKLIGHT),
@@ -82,6 +83,7 @@ static bool caption_backlight(void)
82 83
83 return rc; 84 return rc;
84} 85}
86#endif
85 87
86/** 88/**
87 * Menu to set icon visibility 89 * Menu to set icon visibility
@@ -569,6 +571,8 @@ static bool useMRB(void)
569 &global_settings.usemrb, INT, 571 &global_settings.usemrb, INT,
570 names, 3, NULL ); 572 names, 3, NULL );
571} 573}
574
575#ifdef HAVE_BACKLIGHT
572static bool backlight_on_when_charging(void) 576static bool backlight_on_when_charging(void)
573{ 577{
574 bool result = set_bool(str(LANG_BACKLIGHT_ON_WHEN_CHARGING), 578 bool result = set_bool(str(LANG_BACKLIGHT_ON_WHEN_CHARGING),
@@ -603,6 +607,7 @@ static bool backlight_timer(void)
603 return set_option(str(LANG_BACKLIGHT), &global_settings.backlight_timeout, 607 return set_option(str(LANG_BACKLIGHT), &global_settings.backlight_timeout,
604 INT, names, 19, backlight_set_timeout ); 608 INT, names, 19, backlight_set_timeout );
605} 609}
610#endif /* HAVE_BACKLIGHT */
606 611
607static bool poweroff_idle_timer(void) 612static bool poweroff_idle_timer(void)
608{ 613{
@@ -1141,9 +1146,11 @@ static bool lcd_settings_menu(void)
1141 bool result; 1146 bool result;
1142 1147
1143 static const struct menu_item items[] = { 1148 static const struct menu_item items[] = {
1149#ifdef HAVE_BACKLIGHT
1144 { ID2P(LANG_BACKLIGHT), backlight_timer }, 1150 { ID2P(LANG_BACKLIGHT), backlight_timer },
1145 { ID2P(LANG_BACKLIGHT_ON_WHEN_CHARGING), backlight_on_when_charging }, 1151 { ID2P(LANG_BACKLIGHT_ON_WHEN_CHARGING), backlight_on_when_charging },
1146 { ID2P(LANG_CAPTION_BACKLIGHT), caption_backlight }, 1152 { ID2P(LANG_CAPTION_BACKLIGHT), caption_backlight },
1153#endif
1147 { ID2P(LANG_CONTRAST), contrast }, 1154 { ID2P(LANG_CONTRAST), contrast },
1148#ifdef HAVE_LCD_BITMAP 1155#ifdef HAVE_LCD_BITMAP
1149 { ID2P(LANG_INVERT), invert }, 1156 { ID2P(LANG_INVERT), invert },
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 2612b92d2a..339857710c 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -987,7 +987,7 @@ bool wps_refresh(struct mp3entry* id3,
987 peak_meter_enabled = enable_pm; 987 peak_meter_enabled = enable_pm;
988#endif 988#endif
989 989
990#ifndef SIMULATOR 990#if defined(HAVE_BACKLIGHT) && !defined(SIMULATOR)
991 if (global_settings.caption_backlight && id3) { 991 if (global_settings.caption_backlight && id3) {
992 /* turn on backlight n seconds before track ends, and turn it off n 992 /* turn on backlight n seconds before track ends, and turn it off n
993 seconds into the new track. n == backlight_timeout, or 5s */ 993 seconds into the new track. n == backlight_timeout, or 5s */
diff --git a/firmware/backlight.c b/firmware/backlight.c
index 10e4a2fdfb..9767bbab3b 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -28,13 +28,13 @@
28#include "power.h" 28#include "power.h"
29#include "system.h" 29#include "system.h"
30 30
31#ifdef HAVE_BACKLIGHT
32
31const char backlight_timeout_value[19] = 33const char backlight_timeout_value[19] =
32{ 34{
33 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 45, 60, 90 35 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 45, 60, 90
34}; 36};
35 37
36#ifdef HAVE_BACKLIGHT
37
38#define BACKLIGHT_ON 1 38#define BACKLIGHT_ON 1
39#define BACKLIGHT_OFF 2 39#define BACKLIGHT_OFF 2
40 40