53 #define d4dlcd_ssd1289_ID 1
58 #if (D4D_MK_STR(D4D_LLD_LCD) == d4dlcd_ssd1289_ID)
72 static unsigned char D4DLCD_Init_SSD1289(
void);
73 static unsigned char D4DLCD_SetWindow_SSD1289(
unsigned short x1,
unsigned short y1,
unsigned short x2,
unsigned short y2);
74 static unsigned char D4DLCD_SetOrientation_SSD1289(
D4DLCD_ORIENTATION new_orientation);
75 static void D4DLCD_Send_PixelColor_SSD1289(
D4D_COLOR value) ;
76 static D4D_COLOR D4DLCD_Get_PixelColor_SSD1289(
void);
78 static unsigned char D4DLCD_DeInit_SSD1289(
void);
92 D4DLCD_SetWindow_SSD1289,
93 D4DLCD_SetOrientation_SSD1289,
94 D4DLCD_Send_PixelColor_SSD1289,
95 D4DLCD_Get_PixelColor_SSD1289,
98 D4DLCD_DeInit_SSD1289,
113 static void D4DLCD_Command_Data(
const unsigned short data[],
unsigned short count)
117 for (i=0; i<count; i+=2)
134 static unsigned char D4DLCD_Init_SSD1289(
void)
136 const unsigned short init_data[] =
140 0x0003, 0xAEAC, 0x000C, 0x0007, 0x000D, 0x000F, 0x000E, 0x2900, 0x001E, 0x00B3,
142 0x0001, 0x2B3F, 0x0002, 0x0600, 0x0010, 0x0000, 0x0011, 0x60B0,
144 0x0005, 0x0000, 0x0006, 0x0000, 0x0016, 0xEF1C, 0x0017, 0x0003, 0x0007, 0x0233,
145 0x000B, 0x5312, 0x000F, 0x0000,
147 0x0041, 0x0000, 0x0042, 0x0000, 0x0048, 0x0000, 0x0049, 0x013F, 0x0044, 0xEF00,
148 0x0045, 0x0000, 0x0046, 0x013F, 0x004A, 0x0000, 0x004B, 0x0000,
150 0x0030, 0x0707, 0x0031, 0x0704, 0x0032, 0x0204, 0x0033, 0x0201, 0x0034, 0x0203,
151 0x0035, 0x0204, 0x0036, 0x0204, 0x0037, 0x0502, 0x003A, 0x0302, 0x003B, 0x0500,
152 0x0023 , 0x0000, 0x0024 , 0x0000
208 static unsigned char D4DLCD_DeInit_SSD1289(
void)
226 static unsigned char D4DLCD_SetWindow_SSD1289(
unsigned short x1,
unsigned short y1,
unsigned short x2,
unsigned short y2)
228 unsigned short x1_x2;
229 unsigned short Addr1, Addr2;
231 switch (d4dlcd_orientation)
238 x1_x2 = (
unsigned short)((x2<<8) + x1);
260 x1_x2 = (
unsigned short)((y2<<8) + y1);
268 (void)
D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((
unsigned short)x1_x2);
279 (void)
D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((
unsigned short)Addr1);
282 (void)
D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((
unsigned short)Addr2);
302 static unsigned char D4DLCD_SetOrientation_SSD1289(
D4DLCD_ORIENTATION new_orientation)
304 unsigned short LCD_EntryMode = 0;
306 d4dlcd_orientation = new_orientation;
308 switch (d4dlcd_orientation)
312 LCD_EntryMode = 0x60b0;
break;
314 LCD_EntryMode = 0x6080;
break;
316 LCD_EntryMode = 0x60a8;
break;
318 LCD_EntryMode = 0x6098;
break;
323 (void)D4DLCD_SetWindow_SSD1289(0, 0, 1, 1);
337 static void D4DLCD_Send_PixelColor_SSD1289(
D4D_COLOR value)
340 #ifdef D4D_COLOR_TRANSPARENT
341 if(value == D4D_COLOR_TRANSPARENT)
346 #if D4D_COLOR_SYSTEM != D4D_COLOR_SYSTEM_RGB565
366 static D4D_COLOR D4DLCD_Get_PixelColor_SSD1289(
void)
368 #if D4D_COLOR_SYSTEM != D4D_COLOR_SYSTEM_RGB565
392 #endif //(D4D_MK_STR(D4D_LLD_LCD) == d4dlcd_ssd1289_ID)
#define D4D_COLOR_RGB565(R, G, B)
The macro create the color from the color component Red/Green/Blue to 16-bit RGB565 format (the input...
#define D4D_COLOR_GET_B(color)
D4D low level standard LCD interface API structure.
#define D4D_SCREEN_SIZE_LONGER_SIDE
This macro is used to define the size of longer side of LCD. If not defined, the longer side is set t...
#define D4D_COLOR_RGB(R, G, B)
Orientation LandScape up side down.
#define D4D_COLOR565_GET_B(color)
The macro gets the Blue component from 16-bit standard format to 8-bit component format.
D4D Driver main header file.
D4DLCD_FLUSH_MODE
D4D low level eGUI flush screen types enumeration.
D4D Driver private header file.
Orientation Portrait up side down.
D4DLCD_ORIENTATION
D4D low level screen orientation enumeration type.
Switch pin to output mode.
#define NULL
Type definition of null pointer.
Set pin output register to logic 1.
D4D driver SSD1289 hardware level LCD header file.
LCD device backlight enable signal.
#define D4D_SCREEN_SIZE_SHORTER_SIDE
This macro is used to define the size of shorter side of LCD. If not defined, the shorter side is set...
#define D4D_COLOR565_GET_R(color)
The macro gets the Red component from 16-bit standard format to 8-bit component format.
#define D4D_COLOR_GET_G(color)
Set pin output register to logic 0.
#define D4D_COLOR565_GET_G(color)
The macro gets the Green component from 16-bit standard format to 8-bit component format...
D4D driver - common low level driver header file.
void D4DLCD_Delay_ms_Common(unsigned short period)
D4D driver - resistive touch screen driver function header file.
LWord D4D_COLOR
Type definition of eGUI color variables.
unsigned short Word
Type definition of Word (unsigned 16-bit).
#define D4D_COLOR_GET_R(color)