summaryrefslogtreecommitdiffstats
path: root/firmware/target/sh
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-11-12 18:49:53 +0000
committerJens Arnold <amiconn@rockbox.org>2007-11-12 18:49:53 +0000
commitef12b3b5c678e4fa44d60061b0c1bc312e589ba1 (patch)
tree4c2572d7bf3d995be16b33fa2e46ccccad34f4ee /firmware/target/sh
parent8537cbf091634efa57768dccff39049afdf6d288 (diff)
downloadrockbox-ef12b3b5c678e4fa44d60061b0c1bc312e589ba1.tar.gz
rockbox-ef12b3b5c678e4fa44d60061b0c1bc312e589ba1.zip
Hardware controlled backlight brightness for iPod Video and Nano, retaining the software PWM fade in/ fade out. * Backlight handling cleanup, getting rid of one layer of 'lowlevelness'. * Use atomic GPIO bit manipulation for PP502x backlight handling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15599 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/sh')
-rw-r--r--firmware/target/sh/archos/fm_v2/backlight-target.h6
-rw-r--r--firmware/target/sh/archos/ondio/backlight-target.h6
-rw-r--r--firmware/target/sh/archos/player/backlight-target.h6
-rw-r--r--firmware/target/sh/archos/recorder/backlight-target.h6
4 files changed, 12 insertions, 12 deletions
diff --git a/firmware/target/sh/archos/fm_v2/backlight-target.h b/firmware/target/sh/archos/fm_v2/backlight-target.h
index 834d10bdc6..693e2c8200 100644
--- a/firmware/target/sh/archos/fm_v2/backlight-target.h
+++ b/firmware/target/sh/archos/fm_v2/backlight-target.h
@@ -22,15 +22,15 @@
#include "config.h"
#include "rtc.h"
-#define __backlight_init() true
+#define _backlight_init() true
-static inline void __backlight_on(void)
+static inline void _backlight_on(void)
{
/* Enable square wave */
rtc_write(0x0a, rtc_read(0x0a) | 0x40);
}
-static inline void __backlight_off(void)
+static inline void _backlight_off(void)
{
/* Disable square wave */
rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
diff --git a/firmware/target/sh/archos/ondio/backlight-target.h b/firmware/target/sh/archos/ondio/backlight-target.h
index 9be66bd6a0..94d5eb6f2f 100644
--- a/firmware/target/sh/archos/ondio/backlight-target.h
+++ b/firmware/target/sh/archos/ondio/backlight-target.h
@@ -25,7 +25,7 @@
#ifdef HAVE_BACKLIGHT
/* A stock Ondio has no backlight, it needs a hardware mod. */
-static inline bool __backlight_init(void)
+static inline bool _backlight_init(void)
{
PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */
or_b(0x40, &PADRH); /* drive it high */
@@ -33,12 +33,12 @@ static inline bool __backlight_init(void)
return true;
}
-static inline void __backlight_on(void)
+static inline void _backlight_on(void)
{
or_b(0x40, &PADRH); /* drive it high */
}
-static inline void __backlight_off(void)
+static inline void _backlight_off(void)
{
and_b(~0x40, &PADRH); /* drive it low */
}
diff --git a/firmware/target/sh/archos/player/backlight-target.h b/firmware/target/sh/archos/player/backlight-target.h
index d3bb7f39ed..ede3c86635 100644
--- a/firmware/target/sh/archos/player/backlight-target.h
+++ b/firmware/target/sh/archos/player/backlight-target.h
@@ -22,7 +22,7 @@
#include "config.h"
#include "cpu.h"
-static inline bool __backlight_init(void)
+static inline bool _backlight_init(void)
{
PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */
and_b(~0x40, &PADRH); /* drive and set low */
@@ -30,13 +30,13 @@ static inline bool __backlight_init(void)
return true;
}
-static inline void __backlight_on(void)
+static inline void _backlight_on(void)
{
and_b(~0x40, &PADRH); /* drive and set low */
or_b(0x40, &PAIORH);
}
-static inline void __backlight_off(void)
+static inline void _backlight_off(void)
{
and_b(~0x40, &PAIORH); /* let it float (up) */
}
diff --git a/firmware/target/sh/archos/recorder/backlight-target.h b/firmware/target/sh/archos/recorder/backlight-target.h
index 834d10bdc6..693e2c8200 100644
--- a/firmware/target/sh/archos/recorder/backlight-target.h
+++ b/firmware/target/sh/archos/recorder/backlight-target.h
@@ -22,15 +22,15 @@
#include "config.h"
#include "rtc.h"
-#define __backlight_init() true
+#define _backlight_init() true
-static inline void __backlight_on(void)
+static inline void _backlight_on(void)
{
/* Enable square wave */
rtc_write(0x0a, rtc_read(0x0a) | 0x40);
}
-static inline void __backlight_off(void)
+static inline void _backlight_off(void)
{
/* Disable square wave */
rtc_write(0x0a, rtc_read(0x0a) & ~0x40);