summaryrefslogtreecommitdiff
path: root/firmware/target/arm/iriver/h10/lcd-h10.c
diff options
context:
space:
mode:
authorHristo Kovachev <bger@rockbox.org>2006-08-11 08:35:27 +0000
committerHristo Kovachev <bger@rockbox.org>2006-08-11 08:35:27 +0000
commit9dc0e6222942b31ecf8a7ba4b8f4d1dff1d52caa (patch)
treeca0458168d06e758160bae2980797ee52ed27fb4 /firmware/target/arm/iriver/h10/lcd-h10.c
parent2c3fd0ce7e035fe0c42fed1e4be9c5a22518fd6f (diff)
downloadrockbox-9dc0e6222942b31ecf8a7ba4b8f4d1dff1d52caa.tar.gz
rockbox-9dc0e6222942b31ecf8a7ba4b8f4d1dff1d52caa.zip
Patch #5731 by Barry Wardell: more iriver h10 work. Thanks!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10521 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/iriver/h10/lcd-h10.c')
-rw-r--r--firmware/target/arm/iriver/h10/lcd-h10.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/firmware/target/arm/iriver/h10/lcd-h10.c b/firmware/target/arm/iriver/h10/lcd-h10.c
index c2fa05b05c..3640aa1ba1 100644
--- a/firmware/target/arm/iriver/h10/lcd-h10.c
+++ b/firmware/target/arm/iriver/h10/lcd-h10.c
@@ -36,8 +36,8 @@
36 36
37static bool display_on=false; /* is the display turned on? */ 37static bool display_on=false; /* is the display turned on? */
38 38
39#define LCD_CMD *(volatile unsigned short *)0xf0008000 39#define LCD_CMD *(volatile unsigned short *)0x70003008 /* or maybe 0x70008a0c */
40#define LCD_DATA *(volatile unsigned short *)0xf0008002 40#define LCD_DATA *(volatile unsigned short *)0x70003010
41 41
42/* register defines for the Renesas HD66773R */ 42/* register defines for the Renesas HD66773R */
43#define R_HORIZ_RAM_ADDR_POS 0x16 43#define R_HORIZ_RAM_ADDR_POS 0x16
@@ -98,30 +98,23 @@ const short high8to9[] ICONST_ATTR = {
98/* called very frequently - inline! */ 98/* called very frequently - inline! */
99inline void lcd_write_reg(int reg, int val) 99inline void lcd_write_reg(int reg, int val)
100{ 100{
101#if 0
102 LCD_CMD = (reg >> 8) << 1; 101 LCD_CMD = (reg >> 8) << 1;
103 LCD_CMD = (reg & 0xff) << 1; 102 LCD_CMD = (reg & 0xff) << 1;
104 LCD_DATA = (val >> 8) << 1; 103 LCD_DATA = (val >> 8) << 1;
105 LCD_DATA = (val & 0xff) << 1; 104 LCD_DATA = (val & 0xff) << 1;
106#endif
107 (void)reg;
108 (void)val;
109} 105}
110 106
111/* called very frequently - inline! */ 107/* called very frequently - inline! */
112inline void lcd_begin_write_gram(void) 108inline void lcd_begin_write_gram(void)
113{ 109{
114#if 0
115 LCD_CMD = (R_WRITE_DATA_2_GRAM >> 8) << 1; 110 LCD_CMD = (R_WRITE_DATA_2_GRAM >> 8) << 1;
116 LCD_CMD = (R_WRITE_DATA_2_GRAM & 0xff) << 1; 111 LCD_CMD = (R_WRITE_DATA_2_GRAM & 0xff) << 1;
117#endif
118} 112}
119 113
120/* called very frequently - inline! */ 114/* called very frequently - inline! */
121inline void lcd_write_data(const unsigned short* p_bytes, int count) ICODE_ATTR; 115inline void lcd_write_data(const unsigned short* p_bytes, int count) ICODE_ATTR;
122inline void lcd_write_data(const unsigned short* p_bytes, int count) 116inline void lcd_write_data(const unsigned short* p_bytes, int count)
123{ 117{
124#if 0
125 unsigned int tmp; 118 unsigned int tmp;
126 unsigned int *ptr = (unsigned int *)p_bytes; 119 unsigned int *ptr = (unsigned int *)p_bytes;
127 bool extra; 120 bool extra;
@@ -144,9 +137,6 @@ inline void lcd_write_data(const unsigned short* p_bytes, int count)
144 LCD_DATA = high8to9[read >> 8]; 137 LCD_DATA = high8to9[read >> 8];
145 LCD_DATA = read<<1; 138 LCD_DATA = read<<1;
146 } 139 }
147#endif
148 (void)p_bytes;
149 (void)count;
150} 140}
151 141
152/*** hardware configuration ***/ 142/*** hardware configuration ***/
@@ -158,15 +148,12 @@ int lcd_default_contrast(void)
158 148
159void lcd_set_contrast(int val) 149void lcd_set_contrast(int val)
160{ 150{
161#if 0
162 if (val >= 15) // val must'nt be 15 or 31 151 if (val >= 15) // val must'nt be 15 or 31
163 ++val; 152 ++val;
164 if (val > 30) 153 if (val > 30)
165 return; 154 return;
166 155
167 lcd_write_reg(0x0e, 0x201e + (val << 8)); 156 lcd_write_reg(0x0e, 0x201e + (val << 8));
168#endif
169 (void)val;
170} 157}
171 158
172void lcd_set_invert_display(bool yesno) 159void lcd_set_invert_display(bool yesno)
@@ -197,9 +184,9 @@ void lcd_roll(int lines)
197 */ 184 */
198void lcd_init_device(void) 185void lcd_init_device(void)
199{ 186{
200#if 0
201 display_on=true; 187 display_on=true;
202 188
189#if 0
203 /* LCD Reset */ 190 /* LCD Reset */
204 and_l(~0x00000010, &GPIO1_OUT); 191 and_l(~0x00000010, &GPIO1_OUT);
205 or_l(0x00000010, &GPIO1_ENABLE); 192 or_l(0x00000010, &GPIO1_ENABLE);
@@ -268,10 +255,7 @@ void lcd_init_device(void)
268 255
269void lcd_enable(bool on) 256void lcd_enable(bool on)
270{ 257{
271#if 0
272 display_on = on; 258 display_on = on;
273#endif
274 (void)on;
275} 259}
276 260
277/*** update functions ***/ 261/*** update functions ***/
@@ -297,7 +281,6 @@ void lcd_blit(const fb_data* data, int x, int by, int width,
297void lcd_update(void) ICODE_ATTR; 281void lcd_update(void) ICODE_ATTR;
298void lcd_update(void) 282void lcd_update(void)
299{ 283{
300#if 0
301 if(display_on){ 284 if(display_on){
302 285
303 /* Copy display bitmap to hardware */ 286 /* Copy display bitmap to hardware */
@@ -305,14 +288,12 @@ void lcd_update(void)
305 lcd_begin_write_gram(); 288 lcd_begin_write_gram();
306 lcd_write_data((unsigned short *)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT); 289 lcd_write_data((unsigned short *)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT);
307 } 290 }
308#endif
309} 291}
310 292
311/* Update a fraction of the display. */ 293/* Update a fraction of the display. */
312void lcd_update_rect(int, int, int, int) ICODE_ATTR; 294void lcd_update_rect(int, int, int, int) ICODE_ATTR;
313void lcd_update_rect(int x, int y, int width, int height) 295void lcd_update_rect(int x, int y, int width, int height)
314{ 296{
315#if 0
316 if(display_on) { 297 if(display_on) {
317 int ymax = y + height; 298 int ymax = y + height;
318 299
@@ -343,9 +324,4 @@ void lcd_update_rect(int x, int y, int width, int height)
343 lcd_write_reg(R_HORIZ_RAM_ADDR_POS, 0x7f00); 324 lcd_write_reg(R_HORIZ_RAM_ADDR_POS, 0x7f00);
344 lcd_write_reg(R_VERT_RAM_ADDR_POS, 0x9f00); 325 lcd_write_reg(R_VERT_RAM_ADDR_POS, 0x9f00);
345 } 326 }
346#endif
347 (void)x;
348 (void)y;
349 (void)width;
350 (void)height;
351} 327}