summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/backlight.c2
-rw-r--r--firmware/export/config-iaudiox5.h3
-rwxr-xr-xfirmware/target/coldfire/iaudio/x5/lcd-x5.c11
3 files changed, 11 insertions, 5 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index 76ffc6f0e4..8568c98829 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -655,7 +655,7 @@ bool is_remote_backlight_on(void) {return true;}
655#endif /* #ifdef CONFIG_BACKLIGHT */ 655#endif /* #ifdef CONFIG_BACKLIGHT */
656 656
657#ifdef HAVE_BACKLIGHT_BRIGHTNESS 657#ifdef HAVE_BACKLIGHT_BRIGHTNESS
658#ifdef IRIVER_H300_SERIES 658#if defined(IRIVER_H300_SERIES) || defined(IAUDIO_X5)
659void backlight_set_brightness(int val) 659void backlight_set_brightness(int val)
660{ 660{
661 /* set H300 brightness by changing the PWM 661 /* set H300 brightness by changing the PWM
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index a04967c455..7ce230ee8e 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -42,7 +42,8 @@
42#define CONFIG_LCD LCD_X5 42#define CONFIG_LCD LCD_X5
43 43
44/* Define this for LCD backlight available */ 44/* Define this for LCD backlight available */
45#define CONFIG_BACKLIGHT BL_IRIVER_H100 /* port controlled */ 45#define CONFIG_BACKLIGHT BL_IRIVER_H100 /* port controlled !?!? */
46#define HAVE_BACKLIGHT_BRIGHTNESS
46 47
47/* Define this if you have a software controlled poweroff */ 48/* Define this if you have a software controlled poweroff */
48#define HAVE_SW_POWEROFF 49#define HAVE_SW_POWEROFF
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-x5.c b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
index 75ec2462be..1adcf6aaea 100755
--- a/firmware/target/coldfire/iaudio/x5/lcd-x5.c
+++ b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
@@ -38,8 +38,8 @@ static bool display_on=false; /* is the display turned on? */
38/* register defines for the Renesas HD66773R */ 38/* register defines for the Renesas HD66773R */
39#define R_HORIZ_RAM_ADDR_POS 0x16 39#define R_HORIZ_RAM_ADDR_POS 0x16
40#define R_VERT_RAM_ADDR_POS 0x17 40#define R_VERT_RAM_ADDR_POS 0x17
41#define R_RAM_ADDR_SET 0x21 41#define R_RAM_ADDR_SET 0x21
42#define R_WRITE_DATA_2_GRAM 0x22 42#define R_WRITE_DATA_2_GRAM 0x22
43 43
44/***************************************************** 44/*****************************************************
45The table below was generated by the following script: 45The table below was generated by the following script:
@@ -139,7 +139,12 @@ inline void lcd_write_data(const unsigned short* p_bytes, int count)
139 139
140void lcd_set_contrast(int val) 140void lcd_set_contrast(int val)
141{ 141{
142 (void)val; 142 if (val >= 15) // val must'nt be 15 or 31
143 ++val;
144 if (val > 30)
145 return;
146
147 lcd_write_reg(0x0e, 0x201e + (val << 8));
143} 148}
144 149
145void lcd_set_invert_display(bool yesno) 150void lcd_set_invert_display(bool yesno)