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/h100 | |
parent | 0ea4d3197ed7e56f39c630741cb69152ac9e41de (diff) | |
download | rockbox-73cd9f3b63718d1fe927e7ef4294ed902e8a1b73.tar.gz rockbox-73cd9f3b63718d1fe927e7ef4294ed902e8a1b73.zip |
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/h100')
-rw-r--r-- | firmware/target/coldfire/iriver/h100/backlight-h100.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 @@ | |||
24 | #include "backlight.h" | 24 | #include "backlight.h" |
25 | #include "lcd.h" | 25 | #include "lcd.h" |
26 | 26 | ||
27 | void __backlight_init(void) | 27 | /* Returns the current state of the backlight (true=ON, false=OFF). */ |
28 | bool __backlight_init(void) | ||
28 | { | 29 | { |
29 | or_l(0x00020000, &GPIO1_ENABLE); | 30 | or_l(0x00020000, &GPIO1_ENABLE); |
30 | or_l(0x00020000, &GPIO1_FUNCTION); | 31 | or_l(0x00020000, &GPIO1_FUNCTION); |
31 | and_l(~0x00020000, &GPIO1_OUT); /* Start with the backlight ON */ | 32 | |
33 | return (GPIO1_OUT & 0x00020000) ? false : true; | ||
32 | } | 34 | } |
33 | 35 | ||
34 | void __backlight_on(void) | 36 | void __backlight_on(void) |