summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iriver
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-11-10 18:47:41 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-11-10 18:47:41 +0000
commit58825f6e7391a237be85e63bee08f7a0bb66dc38 (patch)
tree1324b528137ce35623eb3332f32d422331f80777 /firmware/target/coldfire/iriver
parentf669797d077d081078407dd6dabf4e7389acf68f (diff)
downloadrockbox-58825f6e7391a237be85e63bee08f7a0bb66dc38.zip
rockbox-58825f6e7391a237be85e63bee08f7a0bb66dc38.tar.gz
rockbox-58825f6e7391a237be85e63bee08f7a0bb66dc38.tar.bz2
rockbox-58825f6e7391a237be85e63bee08f7a0bb66dc38.tar.xz
Coldfire targets: Got the rest of the coldfire code out of backlight.c. Straightened up related items in configs and split backlight_set_brightness between the normal and boot/sim builds like the other functions. Should really have done all that in the first place.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11502 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/iriver')
-rw-r--r--firmware/target/coldfire/iriver/backlight-target.h2
-rw-r--r--firmware/target/coldfire/iriver/h100/backlight-h100.c7
-rw-r--r--firmware/target/coldfire/iriver/h300/backlight-h300.c7
3 files changed, 16 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iriver/backlight-target.h b/firmware/target/coldfire/iriver/backlight-target.h
index 086ab02..ac146ea 100644
--- a/firmware/target/coldfire/iriver/backlight-target.h
+++ b/firmware/target/coldfire/iriver/backlight-target.h
@@ -19,6 +19,8 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
+#define __BACKLIGHT_INIT
+void __backlight_init(void);
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 8ceac8a..62c24dc 100644
--- a/firmware/target/coldfire/iriver/h100/backlight-h100.c
+++ b/firmware/target/coldfire/iriver/h100/backlight-h100.c
@@ -24,6 +24,13 @@
#include "backlight.h"
#include "lcd.h"
+void __backlight_init(void)
+{
+ or_l(0x00020000, &GPIO1_ENABLE);
+ or_l(0x00020000, &GPIO1_FUNCTION);
+ and_l(~0x00020000, &GPIO1_OUT); /* Start with the backlight ON */
+}
+
void __backlight_on(void)
{
and_l(~0x00020000, &GPIO1_OUT);
diff --git a/firmware/target/coldfire/iriver/h300/backlight-h300.c b/firmware/target/coldfire/iriver/h300/backlight-h300.c
index 50bd757..ef1d6d3 100644
--- a/firmware/target/coldfire/iriver/h300/backlight-h300.c
+++ b/firmware/target/coldfire/iriver/h300/backlight-h300.c
@@ -25,6 +25,13 @@
#include "pcf50606.h"
#include "lcd.h"
+void __backlight_init(void)
+{
+ or_l(0x00020000, &GPIO1_ENABLE);
+ or_l(0x00020000, &GPIO1_FUNCTION);
+ or_l(0x00020000, &GPIO1_OUT); /* Start with the backlight ON */
+}
+
void __backlight_on(void)
{
lcd_enable(true);