53 #define d4dlcdhw_mqx_mpc5125_diu_ID 1
58 #if (D4D_MK_STR(D4D_LLD_LCD_HW) == d4dlcdhw_mqx_mpc5125_diu_ID)
67 #if D4D_COLOR_SYSTEM != D4D_COLOR_SYSTEM_RGB565
68 #error The eGUI low level driver "d4dlcdhw_mqx_mpc5125_diu" not supported selected type of D4D_COLOR_SYSTEM. To run this driver just select D4D_COLOR_SYSTEM_RGB565.
74 static unsigned char D4DLCDHW_Init_MqxMpc5125_DIU(
void);
75 static unsigned char D4DLCDHW_DeInit_MqxMpc5125_DIU(
void);
76 static void D4DLCDHW_WriteData_MqxMpc5125_DIU(
unsigned long addr,
unsigned short value);
77 static unsigned short D4DLCDHW_ReadData_MqxMpc5125_DIU(
unsigned long addr);
94 D4DLCDHW_Init_MqxMpc5125_DIU,
95 D4DLCDHW_WriteData_MqxMpc5125_DIU,
96 D4DLCDHW_ReadData_MqxMpc5125_DIU,
97 D4DLCDHW_GetFbDescriptor_MqxMpc5125_DIU,
98 D4DLCDHW_PinCtl_MqxMpc5125_DIU,
99 D4DLCD_FlushBuffer_MqxMpc5125_DIU,
100 D4DLCDHW_DeInit_MqxMpc5125_DIU
109 static DISPLAY_CONTEXT_STRUCT_PTR d4dlcdhw_gdc_ptr =
NULL;
110 static DISPLAY_PIXEL_BUFFER_PTR d4dlcdhw_pixbuff_ptr =
NULL;
111 static DISPLAY_VIEW_STRUCT_PTR d4dlcdhw_view_ptr =
NULL;
129 static unsigned char D4DLCDHW_Init_MqxMpc5125_DIU(
void)
134 d4dlcdhw_gdc_ptr = display_initialize(buffer);
135 if(d4dlcdhw_gdc_ptr ==
NULL)
143 d4dlcdhw_mqx_mpc5125_diu_desc.
bpp_byte = d4dlcdhw_pixbuff_ptr->BPP;
144 d4dlcdhw_mqx_mpc5125_diu_desc.
lcd_x_max = d4dlcdhw_pixbuff_ptr->X;
145 d4dlcdhw_mqx_mpc5125_diu_desc.
lcd_y_max = d4dlcdhw_pixbuff_ptr->Y;
146 d4dlcdhw_mqx_mpc5125_diu_desc.
fb_start_addr = (
unsigned long) d4dlcdhw_pixbuff_ptr->FB;
148 d4dlcdhw_view_ptr = display_create_view(d4dlcdhw_gdc_ptr, d4dlcdhw_pixbuff_ptr);
150 if(d4dlcdhw_view_ptr ==
NULL)
152 D4DLCDHW_DeInit_MqxMpc5125_DIU();
156 display_center_view(d4dlcdhw_view_ptr);
157 display_show_view(d4dlcdhw_view_ptr, DIU_PLANE_1);
173 static unsigned char D4DLCDHW_DeInit_MqxMpc5125_DIU(
void)
175 display_destroy_view(d4dlcdhw_view_ptr);
176 display_destroy_pixel_buffer(d4dlcdhw_pixbuff_ptr);
177 display_deinit(d4dlcdhw_gdc_ptr);
191 static void D4DLCDHW_WriteData_MqxMpc5125_DIU(
unsigned long addr,
unsigned short value)
199 *((
unsigned char*)addr) = color;
202 *((
unsigned char*)addr+1) = color;
205 *((
unsigned char*)addr+2) = color;
209 color = *((
unsigned long*)addr);
215 *((
unsigned long*)addr) = color;
230 static unsigned short D4DLCDHW_ReadData_MqxMpc5125_DIU(
unsigned long addr)
235 color = (*((
unsigned long*)addr)) & 0xff000000;
237 ret =
D4D_COLOR_RGB(((color & 0xffffff00)>> 3), ((color & 0xffff00ff)>> (2 + 8)), ((color & 0xff00ffff)>> (3 + 16)));
288 #endif //(D4D_MK_STR(D4D_LLD_LCD_HW) == d4dlcdhw_mqx_mpc5125_diu_ID)
#define D4D_COLOR_GET_B(color)
#define D4D_COLOR_RGB(R, G, B)
D4D Driver main header file.
unsigned short lcd_x_max
The resolution of LCD in axis X.
D4DHW_PIN_STATE
D4D low level MCU pin state enumeration type.
D4DLCD_FLUSH_MODE
D4D low level eGUI flush screen types enumeration.
D4D Driver private header file.
D4DLCDHW_PINS
D4D low level MCU types definition for general LCD screen control signals.
D4D low level frame buffer LCD interface API structure.
#define D4DLCDHWFB_REFRESH
D4D low level frame buffer description structure.
#define NULL
Type definition of null pointer.
unsigned short lcd_y_max
The resolution of LCD in axis Y.
unsigned char bpp_byte
The bytes per pixel.
#define D4D_UNUSED(x)
Macro used just for notify compiler that the input parameter is not used.
#define D4D_COLOR_GET_G(color)
unsigned long fb_start_addr
The address of frame buffer.
D4D driver - mqx_mpc5125_diu hardware lcd driver function header file.
D4D driver - resistive touch screen driver function header file.
#define D4D_COLOR_GET_R(color)