summaryrefslogtreecommitdiff
path: root/firmware
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
parente4fc3d471c96478a0f47e880363a25ad4b5929dd (diff)
downloadrockbox-6c7011415b91e23d4740b8df8fba84d450c55a6d.tar.gz
rockbox-6c7011415b91e23d4740b8df8fba84d450c55a6d.zip
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')
-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)
74 /* Disable square wave */ 74 /* Disable square wave */
75 rtc_write(0x0a, rtc_read(0x0a) & ~0x40); 75 rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
76#else 76#else
77 or_b(0x40, &PADRH); 77 and_b(~0x40, &PAIORH);
78#endif 78#endif
79 } 79 }
80 /* else if(backlight_timer) */ 80 /* else if(backlight_timer) */
@@ -85,6 +85,7 @@ void backlight_thread(void)
85 rtc_write(0x0a, rtc_read(0x0a) | 0x40); 85 rtc_write(0x0a, rtc_read(0x0a) | 0x40);
86#else 86#else
87 and_b(~0x40, &PADRH); 87 and_b(~0x40, &PADRH);
88 or_b(0x40, &PAIORH);
88#endif 89#endif
89 } 90 }
90 break; 91 break;
@@ -94,7 +95,7 @@ void backlight_thread(void)
94 /* Disable square wave */ 95 /* Disable square wave */
95 rtc_write(0x0a, rtc_read(0x0a) & ~0x40); 96 rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
96#else 97#else
97 or_b(0x40, &PADRH); 98 and_b(~0x40, &PAIORH);
98#endif 99#endif
99 break; 100 break;
100 101
@@ -172,10 +173,5 @@ void backlight_init(void)
172 create_thread(backlight_thread, backlight_stack, 173 create_thread(backlight_thread, backlight_stack,
173 sizeof(backlight_stack), backlight_thread_name); 174 sizeof(backlight_stack), backlight_thread_name);
174 175
175#ifndef HAVE_RTC
176
177 or_b(0x40, &PAIORH); /* Set data direction of PA14 */
178#endif
179
180 backlight_on(); 176 backlight_on();
181} 177}