本帖最后由 zhuisuoji 于 2015-6-15 17:36 编辑
请教下,红牛板移植emWin海豚游动时出现黑影,使用鼠标也是一样出现黑影,3.5寸SSD1963屏,目前还不知道该如何解决.
读点程序设2次后读取也都试过,但都一样,反而设第3次后时效果好一点,海豚游动时出现的不是黑影,而是不规则颜 {MOD}的影子,
这是读2次的
海豚1.jpg (642.46 KB, 下载次数: 0)
下载附件
2015-6-15 17:27 上传
- /********************************************************************
- *
- * LcdWriteReg
- *
- * Function description:
- * Sets display register
- */
- static void LcdWriteReg(U16 Data) {
- // ... TBD by user
- LCD_REG = Data;
- }
- /********************************************************************
- *
- * LcdWriteData
- *
- * Function description:
- * Writes a value to a display register
- */
- static void LcdWriteData(U16 Data) {
- // ... TBD by user
- LCD_RAM = Data;
- }
- /********************************************************************
- *
- * LcdWriteDataMultiple
- *
- * Function description:
- * Writes multiple values to a display register.
- */
- static void LcdWriteDataMultiple(U16 * pData, int NumItems) {
- while (NumItems--) {
- // ... TBD by user
- LCD_RAM = * pData++;
- }
- }
- /********************************************************************
- *
- * LcdReadDataMultiple
- *
- * Function description:
- * Reads multiple values from a display register.
- */
- static void LcdReadDataMultiple(U16 * pData, int NumItems) {
- while (NumItems--) {
- // ... TBD by user
- * pData++ = LCD_RAM;
- }
- }
- /*********************************************************************
- *
- * LCD_X_Config
- *
- * Function description:
- * Called during the initialization process in order to set up the
- * display driver configuration.
- *
- */
- void LCD_X_Config(void) {
- GUI_DEVICE * pDevice;
- CONFIG_FLEXCOLOR Config = {0};
- GUI_PORT_API PortAPI = {0};
- unsigned TouchOrientation;
- //
- // Set display driver and color conversion
- //
- pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_M565, 0, 0);
- //
- // Display driver configuration, required for Lin-driver
- //
- LCD_SetSizeEx (0, XSIZE_PHYS , YSIZE_PHYS);
- LCD_SetVSizeEx(0, VXSIZE_PHYS, VYSIZE_PHYS);
- //
- // Set orientation of touch screen (only required when using
- //
- TouchOrientation = GUI_SWAP_XY ;
-
- GUI_TOUCH_SetOrientation(TouchOrientation);
-
- GUI_TOUCH_Calibrate(GUI_COORD_X, 0, 239, GUI_TOUCH_AD_TOP, GUI_TOUCH_AD_BOTTOM);
- GUI_TOUCH_Calibrate(GUI_COORD_Y, 0, 319, GUI_TOUCH_AD_LEFT,GUI_TOUCH_AD_RIGHT);
- //
- // Orientation
- //
- Config.Orientation = 0;//GUI_SWAP_XY | GUI_MIRROR_Y
- Config.NumDummyReads = 2; //--读第2次才开始数据的读取
- 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;
- GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66720, GUIDRV_FLEXCOLOR_M16C0B16);
- }
复制代码
一周热门 更多>