summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2009-07-20 21:30:07 +0000
committerDave Chapman <dave@dchapman.com>2009-07-20 21:30:07 +0000
commit808938220adda4eaa2defedf5fb6a0a13754beb5 (patch)
tree10adcbdd8e0564a1a58fe0bf08ca98e4b3125498
parent534cd216a0747d66b5b37f29a858119448d67fde (diff)
Nano2G Backlight driver improvements - the previous version didn't work reliably.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21986 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c
index 8a2e0d41a8..fd600559c0 100644
--- a/firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c
+++ b/firmware/target/arm/s5l8700/ipodnano2g/backlight-nano2g.c
@@ -47,21 +47,21 @@ void _backlight_set_brightness(int brightness)
void _backlight_on(void)
{
- bl_i2c_writebyte(0x2b,10);
- bl_i2c_writebyte(0x2a,6);
- bl_i2c_writebyte(0x28,0x2e);
- bl_i2c_writebyte(0x29,(bl_i2c_readbyte(0x29)&0xf0)|1);
- bl_i2c_writebyte(0x2a,7);
+ bl_i2c_writebyte(0x29,1);
}
void _backlight_off(void)
{
- bl_i2c_writebyte(0x2b,10);
- bl_i2c_writebyte(0x29,bl_i2c_readbyte(0x29)&0xf0);
- bl_i2c_writebyte(0x2a,7);
+ bl_i2c_writebyte(0x29,0);
}
bool _backlight_init(void)
{
+ bl_i2c_writebyte(0x2a,6);
+ bl_i2c_writebyte(0x28,0x2e);
+ bl_i2c_writebyte(0x2b,20);
+
_backlight_on();
+
+ return true;
}