summaryrefslogtreecommitdiff
path: root/firmware/target/sh/archos/ondio
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/archos/ondio
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/archos/ondio')
-rw-r--r--firmware/target/sh/archos/ondio/backlight-target.h6
1 files changed, 3 insertions, 3 deletions
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 @@
25#ifdef HAVE_BACKLIGHT 25#ifdef HAVE_BACKLIGHT
26/* A stock Ondio has no backlight, it needs a hardware mod. */ 26/* A stock Ondio has no backlight, it needs a hardware mod. */
27 27
28static inline bool __backlight_init(void) 28static inline bool _backlight_init(void)
29{ 29{
30 PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */ 30 PACR1 &= ~0x3000; /* Set PA14 (backlight control) to GPIO */
31 or_b(0x40, &PADRH); /* drive it high */ 31 or_b(0x40, &PADRH); /* drive it high */
@@ -33,12 +33,12 @@ static inline bool __backlight_init(void)
33 return true; 33 return true;
34} 34}
35 35
36static inline void __backlight_on(void) 36static inline void _backlight_on(void)
37{ 37{
38 or_b(0x40, &PADRH); /* drive it high */ 38 or_b(0x40, &PADRH); /* drive it high */
39} 39}
40 40
41static inline void __backlight_off(void) 41static inline void _backlight_off(void)
42{ 42{
43 and_b(~0x40, &PADRH); /* drive it low */ 43 and_b(~0x40, &PADRH); /* drive it low */
44} 44}