diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2007-01-12 20:26:23 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2007-01-12 20:26:23 +0000 |
commit | 73cd9f3b63718d1fe927e7ef4294ed902e8a1b73 (patch) | |
tree | 82fc91d5a47c267a8a5a1cdd20aa89b2cd65a079 /firmware/target/coldfire/iriver | |
parent | 0ea4d3197ed7e56f39c630741cb69152ac9e41de (diff) |
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
Diffstat (limited to 'firmware/target/coldfire/iriver')
-rw-r--r-- | firmware/target/coldfire/iriver/backlight-target.h | 2 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/h100/backlight-h100.c | 6 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/h300/backlight-h300.c | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/firmware/target/coldfire/iriver/backlight-target.h b/firmware/target/coldfire/iriver/backlight-target.h index ac146eac83..e653fa1ffb 100644 --- a/firmware/target/coldfire/iriver/backlight-target.h +++ b/firmware/target/coldfire/iriver/backlight-target.h @@ -20,7 +20,7 @@ #define BACKLIGHT_TARGET_H #define __BACKLIGHT_INIT -void __backlight_init(void); +bool __backlight_init(void); /* Returns backlight current state (true=ON). */ void __backlight_on(void); void __backlight_off(void); #ifdef HAVE_BACKLIGHT_BRIGHTNESS 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) diff --git a/firmware/target/coldfire/iriver/h300/backlight-h300.c b/firmware/target/coldfire/iriver/h300/backlight-h300.c index ef1d6d344d..4cec54f0d7 100644 --- a/firmware/target/coldfire/iriver/h300/backlight-h300.c +++ b/firmware/target/coldfire/iriver/h300/backlight-h300.c @@ -25,11 +25,13 @@ #include "pcf50606.h" #include "lcd.h" -void __backlight_init(void) +bool __backlight_init(void) { or_l(0x00020000, &GPIO1_ENABLE); or_l(0x00020000, &GPIO1_FUNCTION); or_l(0x00020000, &GPIO1_OUT); /* Start with the backlight ON */ + + return true; /* Backlight always ON after boot. */ } void __backlight_on(void) |