]>
Commit | Line | Data |
---|---|---|
6658905f | 1 | #ifndef __LCD\r |
2 | #define __LCD\r | |
3 | \r | |
4 | #define LCD_RESET_HIGH() PIO_OUTPUT_DATA_SET |= (1<<GPIO_LRST)\r | |
5 | #define LCD_RESET_LOW() PIO_OUTPUT_DATA_CLEAR |= (1<<GPIO_LRST)\r | |
6 | \r | |
7 | // The resolution of the LCD\r | |
8 | #define LCD_XRES 132\r | |
9 | #define LCD_YRES 132\r | |
10 | \r | |
11 | // 8bpp Color Mode - Some basic colors defined for ease of use\r | |
12 | // remember 8bpp color = 3xRed, 3xGreen & 2xBlue bits\r | |
13 | // organised as RRRGGGBB\r | |
14 | \r | |
15 | #define BLACK 0x00\r | |
16 | #define BLUE 0x03\r | |
17 | #define GREEN 0x1C\r | |
18 | #define CYAN 0x1F\r | |
19 | #define RED 0xE0\r | |
20 | #define MAGENTA 0xE3\r | |
21 | #define YELLOW 0xFC\r | |
22 | #define WHITE 0xFF\r | |
23 | \r | |
24 | // EPSON LCD command set\r | |
25 | #define ECASET 0x115\r | |
26 | #define EPWRCTR 0x120\r | |
27 | #define ENOP 0x125\r | |
28 | #define ERAMWR 0x15C\r | |
29 | #define ERAMRD 0x15D\r | |
30 | #define EPASET 0x175\r | |
31 | #define EEPSRRD1 0x17C\r | |
32 | #define EEPSRRD2 0x17D\r | |
33 | #define EVOLCTR 0x181\r | |
34 | #define ETMPGRD 0x182\r | |
35 | #define ESLPOUT 0x194\r | |
36 | #define ESLPIN 0x195\r | |
37 | #define EDISNOR 0x1A6\r | |
38 | #define EDISINV 0x1A7\r | |
39 | #define EPTLIN 0x1A8\r | |
40 | #define EPTLOUT 0x1A9\r | |
41 | #define EASCSET 0x1AA\r | |
42 | #define ESCSTART 0x1AB\r | |
43 | #define EDISOFF 0x1AE\r | |
44 | #define EDISON 0x1AF\r | |
45 | #define ECOMSCN 0x1BB\r | |
46 | #define EDATCTL 0x1BC\r | |
47 | #define EDISCTL 0x1CA\r | |
48 | #define EEPCOUT 0x1CC\r | |
49 | #define EEPCTIN 0x1CD\r | |
50 | #define ERGBSET8 0x1CE\r | |
51 | #define EOSCON 0x1D1\r | |
52 | #define EOSCOFF 0x1D2\r | |
53 | #define EVOLUP 0x1D6\r | |
54 | #define EVOLDOWN 0x1D7\r | |
55 | #define ERMWIN 0x1E0\r | |
56 | #define ERMWOUT 0x1EE\r | |
57 | #define EEPMWR 0x1FC\r | |
58 | #define EEPMRD 0x1FD\r | |
59 | \r | |
60 | // PHILIPS LCD command set\r | |
61 | #define PNOP 0x100\r | |
62 | #define PSWRESET 0x101\r | |
63 | #define PBSTROFF 0x102\r | |
64 | #define PBSTRON 0x103\r | |
65 | #define PRDDIDIF 0x104\r | |
66 | #define PRDDST 0x109\r | |
67 | #define PSLEEPIN 0x110\r | |
68 | #define PSLEEPOUT 0x111\r | |
69 | #define PPTLON 0x112\r | |
70 | #define PNORON 0x113\r | |
71 | #define PINVOFF 0x120\r | |
72 | #define PINVON 0x121\r | |
73 | #define PDALO 0x122\r | |
74 | #define PDAL 0x123\r | |
75 | #define PSETCON 0x125\r | |
76 | #define PDISPOFF 0x128\r | |
77 | #define PDISPON 0x129\r | |
78 | #define PCASET 0x12A\r | |
79 | #define PPASET 0x12B\r | |
80 | #define PRAMWR 0x12C\r | |
81 | #define PRGBSET 0x12D\r | |
82 | #define PPTLAR 0x130\r | |
83 | #define PVSCRDEF 0x133\r | |
84 | #define PTEOFF 0x134\r | |
85 | #define PTEON 0x135\r | |
86 | #define PMADCTL 0x136\r | |
87 | #define PSEP 0x137\r | |
88 | #define PIDMOFF 0x138\r | |
89 | #define PIDMON 0x139\r | |
90 | #define PCOLMOD 0x13A\r | |
91 | #define PSETVOP 0x1B0\r | |
92 | #define PBRS 0x1B4\r | |
93 | #define PTRS 0x1B6\r | |
94 | #define PFINV 0x1B9\r | |
95 | #define PDOR 0x1BA\r | |
96 | #define PTCDFE 0x1BD\r | |
97 | #define PTCVOPE 0x1BF\r | |
98 | #define PEC 0x1C0\r | |
99 | #define PSETMUL 0x1C2\r | |
100 | #define PTCVOPAB 0x1C3\r | |
101 | #define PTCVOPCD 0x1C4\r | |
102 | #define PTCDF 0x1C5\r | |
103 | #define PDF8C 0x1C6\r | |
104 | #define PSETBS 0x1C7\r | |
105 | #define PRDTEMP 0x1C8\r | |
106 | #define PNLI 0x1C9\r | |
107 | #define PRDID1 0x1DA\r | |
108 | #define PRDID2 0x1DB\r | |
109 | #define PRDID3 0x1DC\r | |
110 | #define PSFD 0x1EF\r | |
111 | #define PECM 0x1F0\r | |
112 | \r | |
113 | void LCDSend(unsigned int data);\r | |
114 | void LCDInit(void);\r | |
115 | void LCDReset(void);\r | |
116 | void LCDSetXY(unsigned char x, unsigned char y);\r | |
117 | void LCDSetPixel(unsigned char x, unsigned char y, unsigned char color);\r | |
118 | void LCDString (char *lcd_string, const char *font_style,unsigned char x, unsigned char y, unsigned char fcolor, unsigned char bcolor);\r | |
119 | void LCDFill (unsigned char xs,unsigned char ys,unsigned char width,unsigned char height, unsigned char color);\r | |
120 | #endif\r |