comparison lcd.h @ 7:9404b9869c27

Make the LCD panel work (timings, GPIOE clock needs to be on, etc) Factor out LCD init (needs more work)
author Daniel O'Connor <darius@dons.net.au>
date Sun, 22 Jan 2012 17:10:51 +1030
parents efa2c22266e3
children 58d76cf522ff
comparison
equal deleted inserted replaced
6:2b92d9632999 7:9404b9869c27
4 void LCD_init(void); 4 void LCD_init(void);
5 void LCD_WR_Reg(uint16_t index, uint16_t val); 5 void LCD_WR_Reg(uint16_t index, uint16_t val);
6 uint16_t LCD_RD_Reg(uint16_t index); 6 uint16_t LCD_RD_Reg(uint16_t index);
7 uint16_t LCD_RD_Data(int first); 7 uint16_t LCD_RD_Data(int first);
8 void LCD_WR_Data(uint16_t val); 8 void LCD_WR_Data(uint16_t val);
9 void LCD_WR_StartData(uint16_t x, uint16_t y);
10 void Delay(__IO uint32_t nCount);
9 11
12 /* Touch controller (TSC2046N) defines */
10 /* Mode/channel select defines */ 13 /* Mode/channel select defines */
11 #define TP_READ_SEL(chan, mode, ref, pd) (0x80 | (((chan) & 0x07) << 4) | (((mode) & 0x01) << 3) | (((ref) & 0x01) << 2) | ((pd) & 0x03)) 14 #define TP_READ_SEL(chan, mode, ref, pd) (0x80 | (((chan) & 0x07) << 4) | (((mode) & 0x01) << 3) | (((ref) & 0x01) << 2) | ((pd) & 0x03))
12 15
13 /* Channel select */ 16 /* Channel select */
14 #define TP_CHAN_TEMP0 0 17 #define TP_CHAN_TEMP0 0