53 #define d4dlcd_lgdp4531_ID 1
58 #if (D4D_MK_STR(D4D_LLD_LCD) == d4dlcd_lgdp4531_ID)
67 #if D4D_COLOR_SYSTEM != D4D_COLOR_SYSTEM_RGB565
68 #error The eGUI low level driver "d4dlcd_lgdp4531" not supported selected type of D4D_COLOR_SYSTEM. To run this driver just select D4D_COLOR_SYSTEM_RGB565.
74 static unsigned char D4DLCD_Init_LGDP4531(
void);
75 static unsigned char D4DLCD_SetWindow_LGDP4531(
unsigned short x1,
unsigned short y1,
unsigned short x2,
unsigned short y2);
76 static unsigned char D4DLCD_SetOrientation_LGDP4531(
D4DLCD_ORIENTATION new_orientation);
77 static void D4DLCD_Send_PixelColor_LGDP4531(
D4D_COLOR value) ;
78 static D4D_COLOR D4DLCD_Get_PixelColor_LGDP4531(
void);
80 static unsigned char D4DLCD_DeInit_LGDP4531(
void);
94 D4DLCD_SetWindow_LGDP4531,
95 D4DLCD_SetOrientation_LGDP4531,
96 D4DLCD_Send_PixelColor_LGDP4531,
97 D4DLCD_Get_PixelColor_LGDP4531,
98 D4DLCD_Flush_LGDP4531,
100 D4DLCD_DeInit_LGDP4531,
109 const unsigned int init_data1[] =
111 0x0010, 0x0628, 0x0012, 0x0006, 0x0013, 0x0A32, 0x0011, 0x0040, 0x0015, 0x0050,
115 const unsigned int init_data2[] =
120 const unsigned int init_data3[] =
122 0x0013, 0x2A4E, 0x0001, 0x0100, 0x0002, 0x0300, 0x0003, 0x1038, 0x0008, 0x0202,
123 0x000A, 0x0000, 0x0030, 0x0000, 0x0031, 0x0402, 0x0032, 0x0106, 0x0033, 0x0700,
124 0x0034, 0x0104, 0x0035, 0x0301, 0x0036, 0x0707, 0x0037, 0x0305, 0x0038, 0x0208,
128 const unsigned int init_data4[] =
130 0x0041, 0x0002, 0x0060, 0x2700, 0x0061, 0x0001, 0x0090, 0x0119, 0x0092, 0x010A,
131 0x0093, 0x0004, 0x00A0, 0x0100, 0x0007, 0x0001,
134 const unsigned int init_data5[] =
139 const unsigned int init_data6[] =
144 const unsigned int init_data7[] =
149 const unsigned int init_data8[] =
154 const unsigned int init_data9[] =
168 static void D4DLCD_Index_Data(
const unsigned int data[],
unsigned int count)
172 for (i=0; i<count; i+=2)
174 (void)
D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord((
unsigned short)data[i]);
175 (void)
D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((
unsigned short)data[i+1]);
190 static unsigned char D4DLCD_Init_LGDP4531(
void)
254 static unsigned char D4DLCD_DeInit_LGDP4531(
void)
272 static unsigned char D4DLCD_SetWindow_LGDP4531(
unsigned short x1,
unsigned short y1,
unsigned short x2,
unsigned short y2)
274 unsigned short Addr1, Addr2;
276 switch (d4dlcd_orientation)
330 (void)
D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((
unsigned short)Addr1);
333 (void)
D4D_LLD_LCD_HW.D4DLCDHW_SendDataWord((
unsigned short)Addr2);
350 static unsigned char D4DLCD_SetOrientation_LGDP4531(
D4DLCD_ORIENTATION new_orientation)
352 unsigned short LCD_EntryMode;
354 d4dlcd_orientation = new_orientation;
356 switch (d4dlcd_orientation)
360 LCD_EntryMode = 0x1030;
break;
362 LCD_EntryMode = 0x1000;
break;
364 LCD_EntryMode = 0x1028;
break;
366 LCD_EntryMode = 0x1018;
break;
371 (void)D4DLCD_SetWindow_LGDP4531(0, 0, 1, 1);
385 static void D4DLCD_Send_PixelColor_LGDP4531(
D4D_COLOR value)
400 static D4D_COLOR D4DLCD_Get_PixelColor_LGDP4531(
void)
422 #endif //(D4D_MK_STR(D4D_LLD_LCD) == d4dlcd_lgdp4531_ID)
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...
Orientation LandScape up side down.
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.
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...
Set pin output register to logic 0.
D4D driver - common low level driver header file.
D4D driver - lgdp4531 lcd driver function 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.