mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
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:
parent
534cd216a0
commit
808938220a
1 changed files with 8 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue