53 #define d4dlcd_ls020_ID 1
58 #if (D4D_MK_STR(D4D_LLD_LCD) == d4dlcd_ls020_ID)
67 #if D4D_COLOR_SYSTEM != D4D_COLOR_SYSTEM_RGB565
68 #error The eGUI low level driver "d4dlcd_ls020" not supported selected type of D4D_COLOR_SYSTEM. To run this driver just select D4D_COLOR_SYSTEM_RGB565.
75 static unsigned char D4DLCD_Init_LS020(
void);
76 static unsigned char D4DLCD_SetWindow_LS020(
unsigned short x1,
unsigned short y1,
unsigned short x2,
unsigned short y2);
78 static void D4DLCD_Send_PixelColor_LS020(
D4D_COLOR value) ;
79 static D4D_COLOR D4DLCD_Get_PixelColor_LS020(
void);
81 static unsigned char D4DLCD_DeInit_LS020(
void);
83 static void D4DLCD_Command_Data(
const unsigned short data[],
unsigned int count);
97 D4DLCD_SetWindow_LS020,
98 D4DLCD_SetOrientation_LS020,
99 D4DLCD_Send_PixelColor_LS020,
100 D4DLCD_Get_PixelColor_LS020,
119 static void D4DLCD_Command_Data(
const unsigned short data[],
unsigned int count)
123 for (i=0; i<count; i++)
125 (void)
D4D_LLD_LCD_HW.D4DLCDHW_SendCmdWord((
unsigned short)data[i]);
139 static unsigned char D4DLCD_Init_LS020(
void)
141 static const unsigned short init_data[] =
145 0xEF00, 0xEE04, 0x1B04, 0xFEFE, 0xFEFE,
146 0xEF90, 0x4A04, 0x7F3F, 0xEE04, 0x4306,
148 0xEF90, 0x0983, 0x0800, 0x0BAF, 0x0A00,
149 0x0500, 0x0600, 0x0700, 0xEF00, 0xEE0C,
150 0xEF90, 0x0080, 0xEFB0, 0x4902, 0xEF00,
151 0x7F01, 0xE181, 0xE202, 0xE276, 0xE183,
152 0x8001, 0xEF90, 0x0000
188 D4DLCD_Command_Data(&init_data[12], 23);
203 static unsigned char D4DLCD_DeInit_LS020(
void)
221 static unsigned char D4DLCD_SetWindow_LS020(
unsigned short x1,
unsigned short y1,
unsigned short x2,
unsigned short y2)
223 unsigned char data[] =
234 switch (d4dlcd_orientation)
240 data[5]= (
unsigned char) x1;
241 data[7]= (
unsigned char) x2;
242 data[9]= (
unsigned char) y1;
243 data[11]= (
unsigned char) y2;
256 data[9] = (
unsigned char) x1;
257 data[11] = (
unsigned char) x2;
264 data[5] = (
unsigned char) y1;
265 data[7] = (
unsigned char) y2;
271 D4DLCD_Command_Data((
unsigned short*)data, 6);
288 d4dlcd_orientation = new_orientation;
289 return D4DLCD_SetWindow_LS020(0, 0, 1, 1);
301 static void D4DLCD_Send_PixelColor_LS020(
D4D_COLOR value)
316 static D4D_COLOR D4DLCD_Get_PixelColor_LS020(
void)
337 #endif //(D4D_MK_STR(D4D_LLD_LCD) == d4dlcd_ls020_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...
D4D driver - ls020 lcd driver function header file.
Set pin output register to logic 0.
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.