请教下,红牛板移植emWin海豚游动时出现黑影,3.5寸SSD1963屏

2019-12-29 18:26发布

本帖最后由 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 上传


  1. /********************************************************************
  2. *
  3. *       LcdWriteReg
  4. *
  5. * Function description:
  6. *   Sets display register
  7. */
  8. static void LcdWriteReg(U16 Data) {
  9.   // ... TBD by user
  10.         LCD_REG        = Data;
  11. }

  12. /********************************************************************
  13. *
  14. *       LcdWriteData
  15. *
  16. * Function description:
  17. *   Writes a value to a display register
  18. */
  19. static void LcdWriteData(U16 Data) {
  20.   // ... TBD by user
  21.         LCD_RAM        = Data;
  22. }

  23. /********************************************************************
  24. *
  25. *       LcdWriteDataMultiple
  26. *
  27. * Function description:
  28. *   Writes multiple values to a display register.
  29. */
  30. static void LcdWriteDataMultiple(U16 * pData, int NumItems) {
  31.   while (NumItems--) {
  32.     // ... TBD by user
  33.                 LCD_RAM        = * pData++;
  34.   }
  35. }

  36. /********************************************************************
  37. *
  38. *       LcdReadDataMultiple
  39. *
  40. * Function description:
  41. *   Reads multiple values from a display register.
  42. */
  43. static void LcdReadDataMultiple(U16 * pData, int NumItems) {
  44.   while (NumItems--) {
  45.     // ... TBD by user
  46.                 * pData++ = LCD_RAM;
  47.   }
  48. }
  49. /*********************************************************************
  50. *
  51. *       LCD_X_Config
  52. *
  53. * Function description:
  54. *   Called during the initialization process in order to set up the
  55. *   display driver configuration.
  56. *
  57. */
  58. void LCD_X_Config(void) {
  59.   GUI_DEVICE * pDevice;
  60.   CONFIG_FLEXCOLOR Config = {0};
  61.   GUI_PORT_API PortAPI = {0};
  62.         unsigned TouchOrientation;
  63.   //
  64.   // Set display driver and color conversion
  65.   //
  66.   pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_FLEXCOLOR, GUICC_M565, 0, 0);
  67.   //
  68.   // Display driver configuration, required for Lin-driver
  69.   //
  70.   LCD_SetSizeEx (0, XSIZE_PHYS , YSIZE_PHYS);
  71.   LCD_SetVSizeEx(0, VXSIZE_PHYS, VYSIZE_PHYS);
  72.         //
  73.         // Set orientation of touch screen (only required when using
  74.         //
  75.         TouchOrientation = GUI_SWAP_XY ;
  76.        
  77.         GUI_TOUCH_SetOrientation(TouchOrientation);
  78.        
  79.         GUI_TOUCH_Calibrate(GUI_COORD_X, 0, 239, GUI_TOUCH_AD_TOP, GUI_TOUCH_AD_BOTTOM);
  80.         GUI_TOUCH_Calibrate(GUI_COORD_Y, 0, 319, GUI_TOUCH_AD_LEFT,GUI_TOUCH_AD_RIGHT);       
  81.   //
  82.   // Orientation
  83.   //
  84.   Config.Orientation = 0;//GUI_SWAP_XY | GUI_MIRROR_Y
  85.         Config.NumDummyReads = 2;         //--读第2次才开始数据的读取
  86.   GUIDRV_FlexColor_Config(pDevice, &Config);
  87.   //
  88.   // Set controller and operation mode
  89.   //
  90.   PortAPI.pfWrite16_A0  = LcdWriteReg;
  91.   PortAPI.pfWrite16_A1  = LcdWriteData;
  92.   PortAPI.pfWriteM16_A1 = LcdWriteDataMultiple;
  93.   PortAPI.pfReadM16_A1  = LcdReadDataMultiple;
  94.         GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66720, GUIDRV_FLEXCOLOR_M16C0B16);
  95. }
复制代码


友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。