summaryrefslogtreecommitdiff
path: root/firmware/backlight.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-07-22 09:09:26 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-07-22 09:09:26 +0000
commit6c7011415b91e23d4740b8df8fba84d450c55a6d (patch)
treed46f84f11ab38d4b1c18e82efd2c3874d3895e3a /firmware/backlight.c
parente4fc3d471c96478a0f47e880363a25ad4b5929dd (diff)
It turns out that the backlight port pin on the player can be set to an input (and pulled up externally) to shut off the backlight. That may save us a few picoamps :-)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4918 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r--firmware/backlight.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index edf8ff3744..f43c8a06fc 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -74,7 +74,7 @@ void backlight_thread(void)
/* Disable square wave */
rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
#else
- or_b(0x40, &PADRH);
+ and_b(~0x40, &PAIORH);
#endif
}
/* else if(backlight_timer) */
@@ -85,6 +85,7 @@ void backlight_thread(void)
rtc_write(0x0a, rtc_read(0x0a) | 0x40);
#else
and_b(~0x40, &PADRH);
+ or_b(0x40, &PAIORH);
#endif
}
break;
@@ -94,7 +95,7 @@ void backlight_thread(void)
/* Disable square wave */
rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
#else
- or_b(0x40, &PADRH);
+ and_b(~0x40, &PAIORH);
#endif
break;
@@ -172,10 +173,5 @@ void backlight_init(void)
create_thread(backlight_thread, backlight_stack,
sizeof(backlight_stack), backlight_thread_name);
-#ifndef HAVE_RTC
-
- or_b(0x40, &PAIORH); /* Set data direction of PA14 */
-#endif
-
backlight_on();
}