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
This commit is contained in:
Dave Chapman 2009-07-20 21:30:07 +00:00
parent 534cd216a0
commit 808938220a

View file

@ -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;
}