Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison lcd.c @ 62:bb52e6dad784
The LCD works better when the GPIO clocks are enabled before frobbing them.
PWM doesn't work for some reason, just hard on for now.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Tue, 09 Apr 2013 00:28:29 +0930 |
parents | be0a1ac64d97 |
children | ff29436c0224 |
comparison
equal
deleted
inserted
replaced
61:9c5db7fee912 | 62:bb52e6dad784 |
---|---|
129 uint16_t id, x, y; | 129 uint16_t id, x, y; |
130 | 130 |
131 /* Initialise LCD panel */ | 131 /* Initialise LCD panel */ |
132 | 132 |
133 /* Pull reset pin low */ | 133 /* Pull reset pin low */ |
134 delay(1); | 134 delay(10); |
135 GPIO_ResetBits(GPIOE, GPIO_Pin_1); | 135 GPIO_ResetBits(GPIOE, GPIO_Pin_1); |
136 delay(10); | 136 delay(500); |
137 GPIO_SetBits(GPIOE, GPIO_Pin_1); | 137 GPIO_SetBits(GPIOE, GPIO_Pin_1); |
138 delay(50); | 138 delay(500); |
139 | 139 |
140 id = lcd_readreg(0x00); | 140 id = lcd_readreg(0x00); |
141 if (id != 0x9325) { | 141 if (id != 0x9325) { |
142 printf("LCD ID doesn't match, expected 0x9325 got 0x%x\r\n", id); | 142 printf("LCD ID doesn't match, expected 0x9325 got 0x%x\r\n", id); |
143 return; | 143 return; |