发 帖  
原厂入驻New
请问裸机+stemwin怎么不能画竖线?
36 STEMWIN
分享
MiniSTM32 V3.3 裸机程序+STemWin 5.28, 2.0寸 ILI9225G 176*220液晶屏,显示方向:横屏(220*176)。
lcd驱动直接画线,画矩形,位图,都正常。
但是emwin不能画圆,不能画矩形,也不能画竖线,画出来只显示成水平线,显示BMP位图也是乱的,呈撕裂模样看不清。但是显示中英文字符是正常的,画水平线也是正常的。
请问这是怎么回事?
GUI驱动只添加了打点函数:
static void LcdWriteReg(U16 Data) {
  // ... TBD by user
  LCD_WR_REG(Data);
}
static void LcdWriteData(U16 Data) {
  // ... TBD by user
  LCD_WR_DATAX(Data);
}
static void LcdWriteDataMultiple(U16 * pData, int NumItems) {
  while (NumItems--) {
    // ... TBD by user
LCD_WR_DATAX(*pData++);
  }
}
static void LcdReadDataMultiple(U16 * pData, int NumItems) {
  while (NumItems--) {
    // ... TBD by user
*pData++ = LCD_RD_DATA();
  }
}
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);
  //
  // 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
  //
  PortAPI.pfWrite16_A0  = LcdWriteReg;
  PortAPI.pfWrite16_A1  = LcdWriteData;
  PortAPI.pfWriteM16_A1 = LcdWriteDataMultiple;
  PortAPI.pfReadM16_A1  = LcdReadDataMultiple;
  GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66708, GUIDRV_FLEXCOLOR_M16C0B16);
}
int LCD_X_DisplayDriver(unsigned LayerIndex, unsigned Cmd, void * pData) {
  int r;
  (void) LayerIndex;
  (void) pData;
  
  switch (Cmd) {
  case LCD_X_INITCONTROLLER: {
    //
    // CalLED during the initialization process in order to set up the
    // display controller and put it into operation. IF the display
    // controller is not initialized by any external routine this needs
    // to be adapted by the customer...
    //
    // ...
   
LCD_Init();
    return 0;
  }
  default:
    r = -1;
  }
  return r;
}
0
2020-8-28 08:02:28   评论 分享淘帖 邀请回答
1个回答
2020-8-28 08:57:44 评论

举报

只有小组成员才能发言,加入小组>>

293个成员聚集在这个小组

加入小组

创建小组步骤

关闭

站长推荐 上一条 /8 下一条

快速回复 返回顶部 返回列表