diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-05-04 04:14:52 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-05-04 04:14:52 +0000 |
commit | f9fae86de25a71e79571d8e692868be544ac1bfb (patch) | |
tree | 976a546750eddf10df7d65b98b84b24df8eb3b4f /firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c | |
parent | ad031e903cc852379a8ecceff3d10d9e71bf6355 (diff) | |
download | rockbox-f9fae86de25a71e79571d8e692868be544ac1bfb.tar.gz rockbox-f9fae86de25a71e79571d8e692868be544ac1bfb.zip |
M:Robe 500: Add backlight cleanups and fix power management so that dangerous and shutoff voltages are taken care of, carge discharge curves are better modeled.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20849 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c')
-rw-r--r-- | firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c index 751a59da94..1596b83dc3 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c +++ b/firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c | |||
@@ -29,8 +29,6 @@ | |||
29 | #include "spi-target.h" | 29 | #include "spi-target.h" |
30 | #include "lcd-target.h" | 30 | #include "lcd-target.h" |
31 | 31 | ||
32 | int _backlight_brightness=DEFAULT_BRIGHTNESS_SETTING; | ||
33 | |||
34 | static void _backlight_write_brightness(int brightness) | 32 | static void _backlight_write_brightness(int brightness) |
35 | { | 33 | { |
36 | uint8_t bl_command[] = {0xa4, 0x00, brightness, 0xbb}; | 34 | uint8_t bl_command[] = {0xa4, 0x00, brightness, 0xbb}; |
@@ -41,7 +39,9 @@ void _backlight_on(void) | |||
41 | { | 39 | { |
42 | lcd_awake(); /* power on lcd + visible display */ | 40 | lcd_awake(); /* power on lcd + visible display */ |
43 | 41 | ||
44 | _backlight_write_brightness(_backlight_brightness); | 42 | #if !defined(CONFIG_BACKLIGHT_FADING) |
43 | _backlight_write_brightness(backlight_brightness); | ||
44 | #endif | ||
45 | } | 45 | } |
46 | 46 | ||
47 | void _backlight_off(void) | 47 | void _backlight_off(void) |
@@ -52,7 +52,6 @@ void _backlight_off(void) | |||
52 | /* Assumes that the backlight has been initialized */ | 52 | /* Assumes that the backlight has been initialized */ |
53 | void _backlight_set_brightness(int brightness) | 53 | void _backlight_set_brightness(int brightness) |
54 | { | 54 | { |
55 | _backlight_brightness=brightness; | ||
56 | _backlight_write_brightness(brightness); | 55 | _backlight_write_brightness(brightness); |
57 | } | 56 | } |
58 | 57 | ||
@@ -65,6 +64,6 @@ void __backlight_dim(bool dim_now) | |||
65 | 64 | ||
66 | bool _backlight_init(void) | 65 | bool _backlight_init(void) |
67 | { | 66 | { |
68 | _backlight_set_brightness(_backlight_brightness); | 67 | _backlight_set_brightness(backlight_brightness); |
69 | return true; | 68 | return true; |
70 | } | 69 | } |