summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iaudio
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-09-26 20:46:17 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-09-26 20:46:17 +0000
commite63649279186e119614b9ca892bcfa27e6af8337 (patch)
tree0e70869af41405372a2c229370c3d880719e38c7 /firmware/target/coldfire/iaudio
parent9e92d06dd16a337dea5d7e80e747a8983e48891f (diff)
downloadrockbox-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')
-rwxr-xr-xfirmware/target/coldfire/iaudio/x5/lcd-remote-x5.c11
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 */
57static bool cached_invert = false; 55static bool cached_invert = false;
58static bool cached_flip = false; 56static bool cached_flip = false;
59static int cached_contrast = LCD_REMOTE_DEFAULT_CONTRAST; 57static int cached_contrast = DEFAULT_REMOTE_CONTRAST_SETTING;
60 58
61bool remote_initialized = false; 59bool remote_initialized = false;
62 60
@@ -294,7 +292,7 @@ void lcd_remote_write_data(const unsigned char* p_bytes, int count)
294 292
295int lcd_remote_default_contrast(void) 293int lcd_remote_default_contrast(void)
296{ 294{
297 return LCD_REMOTE_DEFAULT_CONTRAST; 295 return DEFAULT_REMOTE_CONTRAST_SETTING;
298} 296}
299 297
300void lcd_remote_powersave(bool on) 298void lcd_remote_powersave(bool on)
@@ -309,6 +307,11 @@ void lcd_remote_powersave(bool on)
309 307
310void lcd_remote_set_contrast(int val) 308void 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);