From 73cd9f3b63718d1fe927e7ef4294ed902e8a1b73 Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Fri, 12 Jan 2007 20:26:23 +0000 Subject: Turn backlight ON at boot unless bootloader has already done that. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11992 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/coldfire/iriver/h100/backlight-h100.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'firmware/target/coldfire/iriver/h100') diff --git a/firmware/target/coldfire/iriver/h100/backlight-h100.c b/firmware/target/coldfire/iriver/h100/backlight-h100.c index 62c24dc861..7cff965ff9 100644 --- a/firmware/target/coldfire/iriver/h100/backlight-h100.c +++ b/firmware/target/coldfire/iriver/h100/backlight-h100.c @@ -24,11 +24,13 @@ #include "backlight.h" #include "lcd.h" -void __backlight_init(void) +/* Returns the current state of the backlight (true=ON, false=OFF). */ +bool __backlight_init(void) { or_l(0x00020000, &GPIO1_ENABLE); or_l(0x00020000, &GPIO1_FUNCTION); - and_l(~0x00020000, &GPIO1_OUT); /* Start with the backlight ON */ + + return (GPIO1_OUT & 0x00020000) ? false : true; } void __backlight_on(void) -- cgit v1.2.3