完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
在移植完成后显示错误,使用GUIDEMO演示也有错误。
LCD的写点与读点程序正常。 字符显示测试代码[C] 纯文本查看 复制代码 GUI_SetFont(&GUI_Font8x16);GUI_SetBkColor(GUI_BLUE);GUI_Clear();GUI_SetPenSize(10);GUI_SetColor(GUI_RED);GUI_DrawLine(80, 10, 240, 90);GUI_DrawLine(80, 90, 240, 10);GUI_SetBkColor(GUI_BLACK);GUI_SetColor(GUI_WHITE);GUI_SetTextMode(GUI_TM_NORMAL);GUI_DispStringHCenterAt("GUI_TM_NORMAL" , 160, 10);GUI_SetTextMode(GUI_TM_REV);GUI_DispStringHCenterAt("GUI_TM_REV" , 160, 26);GUI_SetTextMode(GUI_TM_TRANS);GUI_DispStringHCenterAt("GUI_TM_TRANS" , 160, 42);GUI_SetTextMode(GUI_TM_XOR);GUI_DispStringHCenterAt("GUI_TM_XOR" , 160, 58);GUI_SetTextMode(GUI_TM_TRANS | GUI_TM_REV);GUI_DispStringHCenterAt("GUI_TM_TRANS | GUI_TM_REV", 160, 74);正常显示应该是这个 我的程序显示 Alpha测试代码 [C] 纯文本查看 复制代码 GUI_EnableAlpha(1);GUI_SetBkColor(GUI_WHITE);GUI_Clear();GUI_SetColor(GUI_BLACK);GUI_DispStringHCenterAt("Alphablending", 45, 41);GUI_SetColor((0x40uL << 24) | GUI_RED);GUI_FillRect(0, 0, 49, 49);GUI_SetColor((0x80uL << 24) | GUI_GREEN);GUI_FillRect(20, 20, 69, 69);GUI_SetColor((0xC0uL << 24) | GUI_BLUE);GUI_FillRect(40, 40, 89, 89); 多边形测试代码 [C] 纯文本查看 复制代码 const GUI_POINT aPoints[] = {{ 40, 20},{ 0, 20},{ 20, 0}};GUI_POINT aEnlargedPoints[GUI_COUNTOF(aPoints)];void Sample(void) {int i;GUI_Clear();GUI_SetDrawMode(GUI_DM_XOR);GUI_FillPolygon(aPoints, GUI_COUNTOF(aPoints), 140, 110);for (i = 1; i < 10; i++) {GUI_EnlargePolygon(aEnlargedPoints, aPoints, GUI_COUNTOF(aPoints), i * 5);GUI_FillPolygon(aEnlargedPoints, GUI_COUNTOF(aPoints), 140, 110);}} |
|
相关推荐
3个回答
|
|
不要用排线,直接接到开发板上试一下
|
|
|
|
你好, 我也遇到这个问题。我的驱动选择应该是对的啊。下面是的LCD_X_Config函数
GUI_DEVICE * pDevice; CONFIG_FLEXCOLOR Config = {0}; GUI_PORT_API ortAPI = {0}; // // Set display driver and color conversion // pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_565, 0, 0); // // Display driver configuration, required for Lin-driver // LCD_SetSizeEx (0, XSIZE_PHYS , YSIZE_PHYS); LCD_SetVSizeEx(0, VXSIZE_PHYS, VYSIZE_PHYS); // // Orientation Config.Orientation = GUI_SWAP_XY | GUI_MIRROR_Y; GUIDRV_FlexColor_Config(pDevice, &Config); // // Set controller and operation mode //  ortAPI.pfWrite16_A0 = LcdWriteReg;  ortAPI.pfWrite16_A1 = LcdWriteData;  ortAPI.pfWriteM16_A1 = LcdWriteDataMultiple;  ortAPI.pfReadM16_A1 = LcdReadDataMultiple; GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C0B16); |
|
|
|
楼主我的是白屏啊,你是怎么解决的
关于程序: //配置程序,用于创建显示驱动器件,设置颜色转换程序和显示尺寸 void LCD_X_Config(void) { GUI_DEVICE_CreateAndLink(&GUIDRV_Template_API, GUICC_M565, 0, 0); //创建显示驱动器件 LCD_SetSizeEx (0, lcddev.width, lcddev.height); LCD_SetVSizeEx (0, lcddev.width, lcddev.height); if(lcddev.id == 0X5510) //0X5510为4.3寸 800x480的屏 { if(lcddev.dir == 0) //竖屏 // 2001:3520 6352 { // 9147:3832 6288 GUI_TOUCH_Calibrate(GUI_COORD_X,0,480,0,479); GUI_TOUCH_Calibrate(GUI_COORD_Y,0,800,0,799); }else //横屏 { //GUI_TOUCH_SetOrientation(GUI_SWAP_XY|GUI_MIRROR_Y); GUI_TOUCH_Calibrate(GUI_COORD_X,0,480,0,479); GUI_TOUCH_Calibrate(GUI_COORD_Y,0,800,0,799); } }else if(lcddev.id == 0X1963)//1963为7寸屏 800*480 { if(lcddev.dir == 0) //竖屏 {// 6368 3816 //GUI_TOUCH_SetOrientation(GUI_SWAP_XY|GUI_MIRROR_Y); GUI_TOUCH_Calibrate(GUI_COORD_X,0,800,0,799); GUI_TOUCH_Calibrate(GUI_COORD_Y,0,480,0,479); }else //横屏 { GUI_TOUCH_Calibrate(GUI_COORD_X,0,800,0,799); GUI_TOUCH_Calibrate(GUI_COORD_Y,0,480,0,479); } }else if(lcddev.id == 0X5310 || lcddev.id == 0X6804) //0X5510 0X6804为3.5寸 320x480 { if(lcddev.dir == 0) //竖屏 { GUI_TOUCH_Calibrate(GUI_COORD_X,0,320,3931,226); GUI_TOUCH_Calibrate(GUI_COORD_Y,0,480,3812,196); }else //横屏 { GUI_TOUCH_SetOrientation(GUI_SWAP_XY|GUI_MIRROR_Y); GUI_TOUCH_Calibrate(GUI_COORD_X,0,320,3931,226); GUI_TOUCH_Calibrate(GUI_COORD_Y,0,480,3812,196); } } else //其他屏幕全部默认为2.8寸 320X240 { if(lcddev.dir == 0) //竖屏 { GUI_TOUCH_Calibrate(GUI_COORD_X,0,lcddev.width,155,3903); GUI_TOUCH_Calibrate(GUI_COORD_Y,0,lcddev.height,188,3935); }else //横屏 { GUI_TOUCH_SetOrientation(GUI_SWAP_XY|GUI_MIRROR_Y); GUI_TOUCH_Calibrate(GUI_COORD_X,0,240,155,3903); GUI_TOUCH_Calibrate(GUI_COORD_Y,0,320,188,3935); } } } 那需要改哪里?我觉得原子哥这个程序已经很好了。我想问的是我的居然白屏,你具体是怎么解决的?? |
|
|
|
只有小组成员才能发言,加入小组>>
684 浏览 0 评论
1100 浏览 1 评论
2465 浏览 5 评论
2799 浏览 9 评论
移植了freeRTOS到STMf103之后显示没有定义的原因?
2638 浏览 6 评论
使用eim外接fpga可是端口一点反应都没有有没有大哥指点一下啊
648浏览 9评论
642浏览 7评论
请教大神怎样去解决iMX6Q在linux3.0.35内核上做AP失败的问题呢
775浏览 6评论
619浏览 5评论
661浏览 5评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-19 13:21 , Processed in 1.139984 second(s), Total 84, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号