summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/olympus/mrobe-100/backlight-mr100.c
diff options
context:
space:
mode:
authorRobert Kukla <roolku@rockbox.org>2008-04-25 20:06:42 +0000
committerRobert Kukla <roolku@rockbox.org>2008-04-25 20:06:42 +0000
commitb39f9bffde554713c8e5268bfcf72e4ace8839db (patch)
tree5afa345f64d7034f1d14a34ef9393a71824a6276 /firmware/target/arm/olympus/mrobe-100/backlight-mr100.c
parentdb7333971699eaa306b2fa9b519132da917bba68 (diff)
downloadrockbox-b39f9bffde554713c8e5268bfcf72e4ace8839db.tar.gz
rockbox-b39f9bffde554713c8e5268bfcf72e4ace8839db.zip
m:robe 100 - backlight PWM fading
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17248 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/olympus/mrobe-100/backlight-mr100.c')
-rw-r--r--firmware/target/arm/olympus/mrobe-100/backlight-mr100.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/firmware/target/arm/olympus/mrobe-100/backlight-mr100.c b/firmware/target/arm/olympus/mrobe-100/backlight-mr100.c
index f5a7370590..07c97dfb58 100644
--- a/firmware/target/arm/olympus/mrobe-100/backlight-mr100.c
+++ b/firmware/target/arm/olympus/mrobe-100/backlight-mr100.c
@@ -17,19 +17,26 @@
*
****************************************************************************/
-#include "backlight-target.h"
+#include "config.h"
#include "system.h"
+#include "backlight-target.h"
#define MIN_BRIGHTNESS 0x80ff08ff
static const int log_brightness[12] = {0,4,8,12,20,28,40,60,88,124,176,255};
-void _backlight_on(void)
+/* Returns the current state of the backlight (true=ON, false=OFF). */
+bool _backlight_init(void)
+{
+ return (GPO32_ENABLE & 0x1000000) ? true : false;
+}
+
+void _backlight_hw_on(void)
{
GPO32_ENABLE |= 0x1000000;
}
-void _backlight_off(void)
+void _backlight_hw_off(void)
{
GPO32_ENABLE &= ~0x1000000;
}