diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2006-07-25 11:15:50 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2006-07-25 11:15:50 +0000 |
| commit | 9051afa8a061152941ed4cf99e0ceb9bc4a3caf1 (patch) | |
| tree | 40883fe94c814baadeb6a08d0060dd3c8dea7015 /firmware | |
| parent | 7136fd9bb6f589ae873057aa9731c45f17a7b339 (diff) | |
| download | rockbox-9051afa8a061152941ed4cf99e0ceb9bc4a3caf1.zip rockbox-9051afa8a061152941ed4cf99e0ceb9bc4a3caf1.tar.gz rockbox-9051afa8a061152941ed4cf99e0ceb9bc4a3caf1.tar.bz2 rockbox-9051afa8a061152941ed4cf99e0ceb9bc4a3caf1.tar.xz | |
Contrast setting cleanup: * Only include contrast setting for targets where it's used. * Make lcd_default_contrast() a stub for simulators.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10317 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
| -rw-r--r-- | firmware/drivers/lcd-16bit.c | 8 | ||||
| -rw-r--r-- | firmware/drivers/lcd-2bit-horz.c | 9 | ||||
| -rw-r--r-- | firmware/drivers/lcd-h100.c | 4 | ||||
| -rw-r--r-- | firmware/drivers/lcd-ipod.c | 9 | ||||
| -rw-r--r-- | firmware/drivers/lcd-player.c | 10 | ||||
| -rw-r--r-- | firmware/drivers/lcd-recorder.c | 8 |
6 files changed, 19 insertions, 29 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index 4297937..d237dac 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c @@ -72,14 +72,6 @@ static const char scroll_tick_table[16] = { 100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3 }; -#ifndef TARGET_TREE -/* probably just a dummy */ -int lcd_default_contrast(void) -{ - return 28; -} -#endif - /* LCD init */ void lcd_init(void) { diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c index e70df3f..4ee2e2e 100644 --- a/firmware/drivers/lcd-2bit-horz.c +++ b/firmware/drivers/lcd-2bit-horz.c @@ -79,15 +79,6 @@ void lcd_init(void) sizeof(scroll_stack), scroll_name); } -int lcd_default_contrast(void) -{ -#if defined(IPOD_MINI) || defined(IPOD_MINI2G) - return 42; -#else - return 35; -#endif -} - /*** parameter handling ***/ void lcd_set_drawmode(int mode) diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c index f460165..3698339 100644 --- a/firmware/drivers/lcd-h100.c +++ b/firmware/drivers/lcd-h100.c @@ -102,13 +102,13 @@ static const char scroll_tick_table[16] = { /*** hardware configuration ***/ +#ifndef SIMULATOR + int lcd_default_contrast(void) { return 28; } -#ifndef SIMULATOR - void lcd_set_contrast(int val) { lcd_write_command_ex(LCD_CNTL_ELECTRONIC_VOLUME, val, -1); diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c index 67f9e7c..6500335 100644 --- a/firmware/drivers/lcd-ipod.c +++ b/firmware/drivers/lcd-ipod.c @@ -146,6 +146,15 @@ void lcd_init_device(void) /*** hardware configuration ***/ +int lcd_default_contrast(void) +{ +#if defined(IPOD_MINI) || defined(IPOD_MINI2G) + return 42; +#else + return 35; +#endif +} + /* Rockbox stores the contrast as 0..63 - we add 64 to it */ void lcd_set_contrast(int val) { diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c index d01ec34..7da3452 100644 --- a/firmware/drivers/lcd-player.c +++ b/firmware/drivers/lcd-player.c @@ -274,11 +274,6 @@ bool lcdx_putc(int x, int y, unsigned short ch) return false; } -int lcd_default_contrast(void) -{ - return 30; -} - void lcd_clear_display(void) { int i; @@ -483,6 +478,11 @@ void lcd_icon(int icon, bool enable) lcd_write_data(&icon_mirror[pos], 1); } +int lcd_default_contrast(void) +{ + return 30; +} + void lcd_set_contrast(int val) { lcd_data_byte = (unsigned char) (31 - val); diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index 22bfebe..75faa18 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c @@ -157,11 +157,11 @@ void lcd_write_data( const unsigned char* data, int count ) /*** hardware configuration ***/ +#ifndef SIMULATOR + int lcd_default_contrast(void) { -#ifdef SIMULATOR - return 30; -#elif CONFIG_LCD == LCD_GMINI100 +#if CONFIG_LCD == LCD_GMINI100 return 31; #elif CONFIG_LCD == LCD_IFP7XX return 45; @@ -170,8 +170,6 @@ int lcd_default_contrast(void) #endif } -#ifndef SIMULATOR - void lcd_set_contrast(int val) { lcd_write_command(LCD_CNTL_CONTRAST); |