summaryrefslogtreecommitdiff
path: root/firmware/backlight.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-10-30 08:56:06 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-10-30 08:56:06 +0000
commit139f9f28e9179a881c0bdd5c6bed6790591a07cb (patch)
tree21920a9ca8bf5e9123ff230c6aa3ec5e9b7acb1b /firmware/backlight.c
parent145ec81d2f879482fbfe192dcf39350f36bda3d7 (diff)
downloadrockbox-139f9f28e9179a881c0bdd5c6bed6790591a07cb.zip
rockbox-139f9f28e9179a881c0bdd5c6bed6790591a07cb.tar.gz
rockbox-139f9f28e9179a881c0bdd5c6bed6790591a07cb.tar.bz2
rockbox-139f9f28e9179a881c0bdd5c6bed6790591a07cb.tar.xz
move the iriver h1x0/h3x0 targets to the target tree
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11392 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r--firmware/backlight.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index 997e26d..46e2882 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -61,13 +61,7 @@ static inline void __backlight_off(void)
#ifndef TARGET_TREE
static inline void __backlight_on(void)
{
-#if CONFIG_BACKLIGHT == BL_IRIVER_H100
- and_l(~0x00020000, &GPIO1_OUT);
-#elif CONFIG_BACKLIGHT == BL_IRIVER_H300
- lcd_enable(true);
- sleep(HZ/100); /* lcd needs time - avoid flashing for dark screens */
- or_l(0x00020000, &GPIO1_OUT);
-#elif CONFIG_BACKLIGHT == BL_RTC
+#if CONFIG_BACKLIGHT == BL_RTC
/* Enable square wave */
rtc_write(0x0a, rtc_read(0x0a) | 0x40);
#elif CONFIG_BACKLIGHT == BL_PA14_LO /* Player */
@@ -84,12 +78,7 @@ static inline void __backlight_on(void)
static inline void __backlight_off(void)
{
-#if CONFIG_BACKLIGHT == BL_IRIVER_H100
- or_l(0x00020000, &GPIO1_OUT);
-#elif CONFIG_BACKLIGHT == BL_IRIVER_H300
- and_l(~0x00020000, &GPIO1_OUT);
- lcd_enable(false);
-#elif CONFIG_BACKLIGHT == BL_RTC
+#if CONFIG_BACKLIGHT == BL_RTC
/* Disable square wave */
rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
#elif CONFIG_BACKLIGHT == BL_PA14_LO /* Player */
@@ -162,7 +151,7 @@ static int lcd_sleep_timeout = 10*HZ;
#if defined(HAVE_BACKLIGHT_PWM_FADING) && !defined(SIMULATOR)
/* backlight fading */
-#define BL_PWM_INTERVAL 5000 /* Cycle interval in µs */
+#define BL_PWM_INTERVAL 5000 /* Cycle interval in s */
#define BL_PWM_COUNT 100
static const char backlight_fade_value[8] = { 0, 1, 2, 4, 6, 8, 10, 20 };
static int fade_in_count = 1;
@@ -352,26 +341,6 @@ static void __remote_backlight_off(void)
{
sim_remote_backlight(0);
}
-#else
-#ifndef TARGET_TREE
-static void __remote_backlight_on(void)
-{
-#if defined(IRIVER_H300_SERIES)
- and_l(~0x00000002, &GPIO1_OUT);
-#else
- and_l(~0x00000800, &GPIO_OUT);
-#endif
-}
-
-static void __remote_backlight_off(void)
-{
-#if defined(IRIVER_H300_SERIES)
- or_l(0x00000002, &GPIO1_OUT);
-#else
- or_l(0x00000800, &GPIO_OUT);
-#endif
-}
-#endif /* TARGET_TREE */
#endif /* SIMULATOR */
#endif /* HAVE_REMOTE_LCD */