summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2009-08-02 16:43:58 +0000
committerBertrik Sikken <bertrik@sikken.nl>2009-08-02 16:43:58 +0000
commitee0ab03286dc98fa3153f8ceca81cffb9fd2d375 (patch)
treec39936e39cae30038f69e6df5194b81ae38000f4 /firmware
parent322fae42992040a30416ddd1587fd96dbca0a5e7 (diff)
downloadrockbox-ee0ab03286dc98fa3153f8ceca81cffb9fd2d375.tar.gz
rockbox-ee0ab03286dc98fa3153f8ceca81cffb9fd2d375.tar.bz2
rockbox-ee0ab03286dc98fa3153f8ceca81cffb9fd2d375.zip
Samsung YP-S3: update backlight brightness curve again (can't go all the way down to 1/256 brightness) and update yp-s3 bootloader demo.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22117 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/s5l8700/yps3/backlight-yps3.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/target/arm/s5l8700/yps3/backlight-yps3.c b/firmware/target/arm/s5l8700/yps3/backlight-yps3.c
index 1fdcc8347d..d543687825 100644
--- a/firmware/target/arm/s5l8700/yps3/backlight-yps3.c
+++ b/firmware/target/arm/s5l8700/yps3/backlight-yps3.c
@@ -37,9 +37,9 @@
void _backlight_set_brightness(int brightness)
{
- /* pwm = round(sqrt(2)**x), where brightness level x = 1..16 */
+ /* pwm = round(16 * 16**(x/16)), where brightness level x = 1..16 */
static const unsigned int logtable[] =
- {1, 2, 3, 4, 6, 8, 11, 16, 23, 32, 45, 64, 91, 128, 181, 256};
+ {19, 23, 27, 32, 38, 45, 54, 64, 76, 91, 108, 128, 152, 181, 215, 256};
/* set PWM width */
TADATA0 = logtable[brightness];
@@ -77,6 +77,8 @@ bool _backlight_init(void)
/* Enable button LEDs: P3.2 (menu/back), P3.3 (cursor), P4.2 (middle) */
PCON3 = (PCON3 & ~0x0000FF00) | 0x00001100;
PCON4 = (PCON4 & ~0x00000F00) | 0x00000100;
+ PDAT3 &= ~(3 << 2);
+ PDAT4 &= ~(1 << 2);
/* enable timer clock */
PWRCON &= ~(1 << 4);