43 #define UTFT_VERSION 281 64 #define SSD1963_480 12 65 #define SSD1963_800 13 68 #define SSD1289LATCHED 16 72 #define SSD1963_800ALT 20 74 #define ILI9325D_16ALT 22 77 #define ILI9341_S5P 25 78 #define ILI9341_S4P 26 85 #define ITDB32 0 // HX8347-A (16bit) 86 #define ITDB32WC 1 // ILI9327 (16bit) 87 #define TFT01_32W 1 // ILI9327 (16bit) 88 #define ITDB32S 2 // SSD1289 (16bit) 89 #define TFT01_32 2 // SSD1289 (16bit) 90 #define CTE32 2 // SSD1289 (16bit) 91 #define ITDB24 3 // ILI9325C (8bit) 92 #define ITDB24D 4 // ILI9325D (8bit) 93 #define ITDB24DWOT 4 // ILI9325D (8bit) 94 #define ITDB28 4 // ILI9325D (8bit) 95 #define TFT01_24_8 4 // ILI9325D (8bit) 96 #define DMTFT24104 4 // ILI9325D (8bit) 97 #define DMTFT28103 4 // ILI9325D (8bit) 98 #define TFT01_24_16 5 // ILI9325D (16bit) 99 #define ITDB22 6 // HX8340-B (8bit) 100 #define ITDB22SP 7 // HX8340-B (Serial 4Pin) 101 #define ITDB32WD 8 // HX8352-A (16bit) 102 #define TFT01_32WD 8 // HX8352-A (16bit) 103 #define CTE32W 8 // HX8352-A (16bit) 104 #define ITDB18SP 9 // ST7735 (Serial 5Pin) 105 #define LPH9135 10 // PCF8833 (Serial 5Pin) 106 #define ITDB25H 11 // S1D19122 (16bit) 107 #define ITDB43 12 // SSD1963 (16bit) 480x272 108 #define TFT01_43 12 // SSD1963 (16bit) 480x272 109 #define ITDB50 13 // SSD1963 (16bit) 800x480 110 #define TFT01_50 13 // SSD1963 (16bit) 800x480 111 #define CTE50 13 // SSD1963 (16bit) 800x480 112 #define EHOUSE50 13 // SSD1963 (16bit) 800x480 113 #define ITDB24E_8 14 // S6D1121 (8bit) 114 #define TFT01_24R2 14 // S6D1121 (8bit) 115 #define ITDB24E_16 15 // S6D1121 (16bit) 116 #define INFINIT32 16 // SSD1289 (Latched 16bit) -- Legacy, will be removed later 117 #define ELEE32_REVA 16 // SSD1289 (Latched 16bit) 120 #define ELEE32_REVB 19 // SSD1289 (8bit) 121 #define TFT01_70 20 // SSD1963 (16bit) 800x480 Alternative Init 122 #define CTE70 20 // SSD1963 (16bit) 800x480 Alternative Init 123 #define EHOUSE70 20 // SSD1963 (16bit) 800x480 Alternative Init 124 #define CTE32HR 21 // ILI9481 (16bit) 125 #define CTE28 22 // ILI9325D (16bit) Alternative Init 126 #define TFT01_28 22 // ILI9325D (16bit) Alternative Init 127 #define CTE22 23 // S6D0164 (8bit) 128 #define TFT01_22 23 // S6D0164 (8bit) 129 #define DMTFT22102 23 // S6D0164 (8bit) 130 #define TFT01_18SP 24 // ST7735S (Serial 5Pin) 131 #define TFT01_22SP 25 // ILI9341 (Serial 5Pin) 132 #define TFT01_24SP 25 // ILI9341 (Serial 5Pin) 133 #define TFT22SHLD 25 // ILI9341 (Serial 5Pin) 134 #define DMTFT28105 25 // ILI9341 (Serial 5Pin) 135 #define MI0283QT9 26 // ILI9341 (Serial 4Pin) 136 #define CTE35IPS 27 // R61581 (16bit) 137 #define CTE40 28 // ILI9486 (16bit) 138 #define EHOUSE50CPLD 29 // CPLD (16bit) 139 #define CTE50CPLD 29 // CPLD (16bit) 140 #define CTE70CPLD 29 // CPLD (16bit) 141 #define DMTFT18101 30 // HX8353C (Serial 5Pin) 142 #define TFT18SHLD 31 // ST7735 (Serial 5Pin) Alternative Init 144 #define SERIAL_4PIN 4 145 #define SERIAL_5PIN 5 146 #define LATCHED_16 17 154 #define VGA_BLACK 0x0000 155 #define VGA_WHITE 0xFFFF 156 #define VGA_RED 0xF800 157 #define VGA_GREEN 0x0400 158 #define VGA_BLUE 0x001F 159 #define VGA_SILVER 0xC618 160 #define VGA_GRAY 0x8410 161 #define VGA_MAROON 0x8000 162 #define VGA_YELLOW 0xFFE0 163 #define VGA_OLIVE 0x8400 164 #define VGA_LIME 0x07E0 165 #define VGA_AQUA 0x07FF 166 #define VGA_TEAL 0x0410 167 #define VGA_NAVY 0x0010 168 #define VGA_FUCHSIA 0xF81F 169 #define VGA_PURPLE 0x8010 170 #define VGA_TRANSPARENT 0xFFFFFFFF 174 #include "hardware/avr/HW_AVR_defines.h" 175 #elif defined(__PIC32MX__) 176 #include "WProgram.h" 177 #include "hardware/pic32/HW_PIC32_defines.h" 178 #elif defined(__arm__) 180 #include "hardware/arm/HW_ARM_defines.h" 196 UTFT(byte model,
int RS,
int WR,
int CS,
int RST,
int SER=0);
197 void InitLCD(byte orientation=LANDSCAPE);
199 void drawPixel(
int x,
int y);
200 void drawLine(
int x1,
int y1,
int x2,
int y2);
201 void fillScr(byte r, byte g, byte b);
202 void fillScr(word color);
203 void drawRect(
int x1,
int y1,
int x2,
int y2);
204 void drawRoundRect(
int x1,
int y1,
int x2,
int y2);
205 void fillRect(
int x1,
int y1,
int x2,
int y2);
206 void fillRoundRect(
int x1,
int y1,
int x2,
int y2);
207 void drawCircle(
int x,
int y,
int radius);
208 void fillCircle(
int x,
int y,
int radius);
209 void setColor(byte r, byte g, byte b);
210 void setColor(word color);
212 void setBackColor(byte r, byte g, byte b);
213 void setBackColor(uint32_t color);
215 void print(
char *st,
int x,
int y,
int deg=0);
216 void print(String st,
int x,
int y,
int deg=0);
217 void printNumI(
long num,
int x,
int y,
int length=0,
char filler=
' ');
218 void printNumF(
double num, byte dec,
int x,
int y,
char divider=
'.',
int length=0,
char filler=
' ');
219 void setFont(uint8_t* font);
221 uint8_t getFontXsize();
222 uint8_t getFontYsize();
223 void drawBitmap(
int x,
int y,
int sx,
int sy, bitmapdatatype data,
int scale=1);
224 void drawBitmap(
int x,
int y,
int sx,
int sy, bitmapdatatype data,
int deg,
int rox,
int roy);
227 void setContrast(
char c);
228 int getDisplayXSize();
229 int getDisplayYSize();
230 void setBrightness(byte br);
231 void setDisplayPage(byte page);
232 void setWritePage(byte page);
242 byte fch, fcl, bch, bcl;
244 long disp_x_size, disp_y_size;
245 byte display_model, display_transfer_mode, display_serial_mode;
246 regtype *P_RS, *P_WR, *P_CS, *P_RST, *P_SDA, *P_SCL, *P_ALE;
247 regsize B_RS, B_WR, B_CS, B_RST, B_SDA, B_SCL, B_ALE;
248 byte __p1, __p2, __p3, __p4, __p5;
250 boolean _transparent;
252 void LCD_Writ_Bus(
char VH,
char VL, byte mode);
253 void LCD_Write_COM(
char VL);
254 void LCD_Write_DATA(
char VH,
char VL);
255 void LCD_Write_DATA(
char VL);
256 void LCD_Write_COM_DATA(
char com1,
int dat1);
257 void _hw_special_init();
258 void setPixel(word color);
259 void drawHLine(
int x,
int y,
int l);
260 void drawVLine(
int x,
int y,
int l);
261 void printChar(byte c,
int x,
int y);
262 void setXY(word x1, word y1, word x2, word y2);
264 void rotateChar(byte c,
int x,
int y,
int pos,
int deg);
265 void _set_direction_registers(byte mode);
266 void _fast_fill_16(
int ch,
int cl,
long pix);
267 void _fast_fill_8(
int ch,
long pix);
268 void _convert_float(
char *buf,
double num,
int width, byte prec);
271 volatile uint32_t* portOutputRegister(
int value);