comparison lcd.c @ 65:662e7f01c991

Convert \r\n to \n. While I'm here remove teh readback test since it doesn't work.
author Daniel O'Connor <darius@dons.net.au>
date Sun, 14 Apr 2013 14:26:46 +0930
parents ff29436c0224
children
comparison
equal deleted inserted replaced
64:ff29436c0224 65:662e7f01c991
138 GPIO_SetBits(GPIOE, GPIO_Pin_1); 138 GPIO_SetBits(GPIOE, GPIO_Pin_1);
139 delay(500); 139 delay(500);
140 140
141 id = lcd_readreg(0x00); 141 id = lcd_readreg(0x00);
142 if (id != 0x9325) { 142 if (id != 0x9325) {
143 printf("LCD ID doesn't match, expected 0x9325 got 0x%x\r\n", id); 143 printf("LCD ID doesn't match, expected 0x9325 got 0x%x\n", id);
144 return; 144 return;
145 } 145 }
146 printf("LCD ID matches\r\n"); 146 printf("LCD ID matches\n");
147 147
148 lcd_writereg(0x00e3, 0x3008); /* Set internal timing (not documented) */ 148 lcd_writereg(0x00e3, 0x3008); /* Set internal timing (not documented) */
149 lcd_writereg(0x00e7, 0x0012); /* Set internal timing (not documented) */ 149 lcd_writereg(0x00e7, 0x0012); /* Set internal timing (not documented) */
150 lcd_writereg(0x00ef, 0x1231); /* Set internal timing (not documented) */ 150 lcd_writereg(0x00ef, 0x1231); /* Set internal timing (not documented) */
151 lcd_writereg(0x0000, 0x0001); /* Start Oscillation */ 151 lcd_writereg(0x0000, 0x0001); /* Start Oscillation */
217 lcd_writereg(0x0038, 0x0707); 217 lcd_writereg(0x0038, 0x0707);
218 lcd_writereg(0x0039, 0x0007); 218 lcd_writereg(0x0039, 0x0007);
219 lcd_writereg(0x003c, 0x0600); 219 lcd_writereg(0x003c, 0x0600);
220 lcd_writereg(0x003d, 0x020b); 220 lcd_writereg(0x003d, 0x020b);
221 221
222 fputs("Testing\r\n", stdout); 222 fputs("Filling\n", stdout);
223 lcd_startgram(0, 0);
224 lcd_writedata(0xa5a5);
225 lcd_writedata(0x5a5a);
226 lcd_startgram(0, 0);
227 if ((id = lcd_readdata(1)) != 0xa5a5)
228 printf("Expected 0xa5a5 got 0x%04x\r\n", id);
229
230 if ((id = lcd_readdata(0)) != 0x5a5a)
231 printf("Expected 0x5a5a got 0x%04x\r\n", id);
232
233 fputs("Filling\r\n", stdout);
234 /* Fill panel */ 223 /* Fill panel */
235 lcd_startgram(0, 0); 224 lcd_startgram(0, 0);
236 225
237 for (y = 0; y < 320; y++) 226 for (y = 0; y < 320; y++)
238 for (x = 0; x < 240; x++) 227 for (x = 0; x < 240; x++)