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.zip
rockbox-a1a08d0d5f36ab2212d9e1b78e54467469f4cf25.tar.gz
rockbox-a1a08d0d5f36ab2212d9e1b78e54467469f4cf25.tar.bz2
rockbox-a1a08d0d5f36ab2212d9e1b78e54467469f4cf25.tar.xz
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 9f9dce7..04a0e3c 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -182,10 +182,12 @@ static const struct bit_entry rtc_bits[] =
{2, S_O(repeat_mode), REPEAT_ALL, "repeat", "off,all,one" },
/* LCD */
{6, S_O(contrast), 40, "contrast", NULL },
+#ifdef HAVE_BACKLIGHT
{1, S_O(backlight_on_when_charging), false,
"backlight when plugged", off_on },
- {5, S_O(backlight_timeout), 5, "backlight timeout",
+ {5, S_O(backlight_timeout), 5, "backlight timeout",
"off,on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90" },
+#endif
#ifdef HAVE_LCD_BITMAP
{1, S_O(invert), false, "invert", off_on },
{1, S_O(flip_display), false, "flip display", off_on },
@@ -245,7 +247,9 @@ static const struct bit_entry hd_bits[] =
/* # of bits, offset+size, default, .cfg name, .cfg values */
/* more display */
+#ifdef HAVE_BACKLIGHT
{1, S_O(caption_backlight), false, "caption backlight", off_on },
+#endif
{5, S_O(scroll_speed), 8, "scroll speed", NULL }, /* 1...25 */
{7, S_O(scroll_step), 6, "scroll step", NULL }, /* 1...112 */
{8, S_O(scroll_delay), 100, "scroll delay", NULL }, /* 0...250 */
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index 4e9ec25..099b912 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -75,6 +75,7 @@ static bool contrast(void)
MAX_CONTRAST_SETTING );
}
+#ifdef HAVE_BACKLIGHT
static bool caption_backlight(void)
{
bool rc = set_bool( str(LANG_CAPTION_BACKLIGHT),
@@ -82,6 +83,7 @@ static bool caption_backlight(void)
return rc;
}
+#endif
/**
* Menu to set icon visibility
@@ -569,6 +571,8 @@ static bool useMRB(void)
&global_settings.usemrb, INT,
names, 3, NULL );
}
+
+#ifdef HAVE_BACKLIGHT
static bool backlight_on_when_charging(void)
{
bool result = set_bool(str(LANG_BACKLIGHT_ON_WHEN_CHARGING),
@@ -603,6 +607,7 @@ static bool backlight_timer(void)
return set_option(str(LANG_BACKLIGHT), &global_settings.backlight_timeout,
INT, names, 19, backlight_set_timeout );
}
+#endif /* HAVE_BACKLIGHT */
static bool poweroff_idle_timer(void)
{
@@ -1141,9 +1146,11 @@ static bool lcd_settings_menu(void)
bool result;
static const struct menu_item items[] = {
+#ifdef HAVE_BACKLIGHT
{ ID2P(LANG_BACKLIGHT), backlight_timer },
{ ID2P(LANG_BACKLIGHT_ON_WHEN_CHARGING), backlight_on_when_charging },
{ ID2P(LANG_CAPTION_BACKLIGHT), caption_backlight },
+#endif
{ ID2P(LANG_CONTRAST), contrast },
#ifdef HAVE_LCD_BITMAP
{ ID2P(LANG_INVERT), invert },
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 2612b92..3398577 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -987,7 +987,7 @@ bool wps_refresh(struct mp3entry* id3,
peak_meter_enabled = enable_pm;
#endif
-#ifndef SIMULATOR
+#if defined(HAVE_BACKLIGHT) && !defined(SIMULATOR)
if (global_settings.caption_backlight && id3) {
/* turn on backlight n seconds before track ends, and turn it off n
seconds into the new track. n == backlight_timeout, or 5s */
diff --git a/firmware/backlight.c b/firmware/backlight.c
index 10e4a2f..9767bba 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -28,13 +28,13 @@
#include "power.h"
#include "system.h"
+#ifdef HAVE_BACKLIGHT
+
const char backlight_timeout_value[19] =
{
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 45, 60, 90
};
-#ifdef HAVE_BACKLIGHT
-
#define BACKLIGHT_ON 1
#define BACKLIGHT_OFF 2