From 6c7011415b91e23d4740b8df8fba84d450c55a6d Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Thu, 22 Jul 2004 09:09:26 +0000 Subject: 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 --- firmware/backlight.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'firmware/backlight.c') 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(); } -- cgit v1.2.3