[mw_shl_code=c,true] [/mw_shl_code]
[mw_shl_code=c,true]void LCD_X_Config(void) {
GUI_DEVICE * pDevice;
CONFIG_FLEXCOLOR Config = {0};
GUI_PORT_API PortAPI = {0};
//
// Set display driver and color conversion
//
pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_565, 0, 0); //modify by fire
//
// Display driver configuration, required for Lin-driver
//
LCD_SetSizeEx (0, XSIZE_PHYS , YSIZE_PHYS);
LCD_SetVSizeEx(0, VXSIZE_PHYS, VYSIZE_PHYS);
//
// Orientation
//????????????·??ò
Config.FirstCOM = 0; //modify by fire
Config.FirstSEG = 0; //modify by fire
//Config.Orientation = GUI_MIRROR_Y|GUI_MIRROR_X; //modify by fire ?ú??
//Config.Orientation = GUI_SWAP_XY | GUI_MIRROR_Y; //modify by fire ?á??
//Config.Orientation = GUI_MIRROR_X|GUI_MIRROR_Y;// GUI_SWAP_XY | GUI_MIRROR_Y;
Config.NumDummyReads = 2; //modify by fire ?????????????????????????? //????×????????°???á???????°
GUIDRV_FlexColor_Config(pDevice, &Config);
//
// Set controller and operation mode
//
PortAPI.pfWrite16_A0 = LcdWriteReg;
PortAPI.pfWrite16_A1 = LcdWriteData;
PortAPI.pfWriteM16_A1 = LcdWriteDataMultiple;
PortAPI.pfReadM16_A1 = LcdReadDataMultiple;
//????×???,????,?????????ò 5.22???á991?????ê???????ù?§?????????÷
GUIDRV_FlexColor_SetFunc(pDevice, & ortAPI, GUIDRV_FLEXCOLOR_F66709,
GUIDRV_FLEXCOLOR_M16C0B16);
//modify by fire ? GUIDRV_FLEXCOLOR_F66708
/* modify by fire ?è????????? */
// GUI_TOUCH_SetOrientation( (GUI_MIRROR_X * LCD_GetMirrorXEx(0)) |
// (GUI_MIRROR_Y * LCD_GetMirrorYEx(0)) |
// (GUI_SWAP_XY * LCD_GetSwapXYEx (0)));
/* modify by fire ?è????????×? */
GUI_TOUCH_Calibrate(GUI_COORD_X, 0, 320-1,
TOUCH_AD_TOP , TOUCH_AD_BOTTOM);
GUI_TOUCH_Calibrate(GUI_COORD_Y, 0, 480-1,
TOUCH_AD_LEFT , TOUCH_AD_RIGHT);
}[/mw_shl_code]
|