diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2006-09-26 20:46:17 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2006-09-26 20:46:17 +0000 |
commit | e63649279186e119614b9ca892bcfa27e6af8337 (patch) | |
tree | 0e70869af41405372a2c229370c3d880719e38c7 /firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c | |
parent | 9e92d06dd16a337dea5d7e80e747a8983e48891f (diff) | |
download | rockbox-e63649279186e119614b9ca892bcfa27e6af8337.tar.gz rockbox-e63649279186e119614b9ca892bcfa27e6af8337.zip |
Fixed remote contrast settings. Maybe'll get some build errors here.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11071 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c')
-rwxr-xr-x | firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c b/firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c index 46e1eba1fd..6e3bb01a15 100755 --- a/firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c +++ b/firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c | |||
@@ -51,12 +51,10 @@ | |||
51 | #define RS_LO and_l(~0x00008000, &GPIO_OUT) | 51 | #define RS_LO and_l(~0x00008000, &GPIO_OUT) |
52 | #define RS_HI or_l(0x00008000, &GPIO_OUT) | 52 | #define RS_HI or_l(0x00008000, &GPIO_OUT) |
53 | 53 | ||
54 | #define LCD_REMOTE_DEFAULT_CONTRAST 0x18; | ||
55 | |||
56 | /* cached settings values */ | 54 | /* cached settings values */ |
57 | static bool cached_invert = false; | 55 | static bool cached_invert = false; |
58 | static bool cached_flip = false; | 56 | static bool cached_flip = false; |
59 | static int cached_contrast = LCD_REMOTE_DEFAULT_CONTRAST; | 57 | static int cached_contrast = DEFAULT_REMOTE_CONTRAST_SETTING; |
60 | 58 | ||
61 | bool remote_initialized = false; | 59 | bool remote_initialized = false; |
62 | 60 | ||
@@ -294,7 +292,7 @@ void lcd_remote_write_data(const unsigned char* p_bytes, int count) | |||
294 | 292 | ||
295 | int lcd_remote_default_contrast(void) | 293 | int lcd_remote_default_contrast(void) |
296 | { | 294 | { |
297 | return LCD_REMOTE_DEFAULT_CONTRAST; | 295 | return DEFAULT_REMOTE_CONTRAST_SETTING; |
298 | } | 296 | } |
299 | 297 | ||
300 | void lcd_remote_powersave(bool on) | 298 | void lcd_remote_powersave(bool on) |
@@ -309,6 +307,11 @@ void lcd_remote_powersave(bool on) | |||
309 | 307 | ||
310 | void lcd_remote_set_contrast(int val) | 308 | void lcd_remote_set_contrast(int val) |
311 | { | 309 | { |
310 | if (val < 0) | ||
311 | val = 0; | ||
312 | else if (val > 63) | ||
313 | val = 63; | ||
314 | |||
312 | cached_contrast = val; | 315 | cached_contrast = val; |
313 | if(remote_initialized) | 316 | if(remote_initialized) |
314 | lcd_remote_write_command_ex(LCD_SET_VOLUME, val); | 317 | lcd_remote_write_command_ex(LCD_SET_VOLUME, val); |