2018-10-26 12:40 AM
Hello,
We have facing troubles with STemWin's simulator.
Our embedded project creates the GUI driver like this:
void LCD_X_Config(void) {
GUI_DEVICE_CreateAndLink(GUIDRV_LIN_16, GUICC_M565, 0, 0);
...
}
Our simulator project creates it like this:
Our simulator project creates it like this:
void LCD_X_Config(void) {
GUI_DEVICE_CreateAndLink(GUIDRV_WIN32, GUICC_M565, 0, 0);
...
}
Both project uses the same GUIConf.h:
#ifndef GUICONF_H
#define GUICONF_H
// The following settings are from STewmWin application note
// See https://www.st.com/content/ccc/resource/technical/document/application_note/54/c9/95/42/8c/0b/43/69/DM00089670.pdf/files/DM00089670.pdf/jcr:content/translations/en.DM00089670.pdf
// FAQ question 2 "What is the STemWin Library configuration(during the binary generation) ?"
#define GUI_DEFAULT_FONT &GUI_Font6x8
#define GUI_NUM_LAYERS 2
#define GUI_SUPPORT_TOUCH (1)
#define GUI_SUPPORT_MOUSE (1)
#define GUI_WINSUPPORT (1)
#define GUI_SUPPORT_MEMDEV (1)
#define GUI_SUPPORT_DEVICES (1)
#define BUTTON_REACT_ON_LEVEL (1)
#define GUI_MEMDEV_SUPPORT_CUSTOMDRAW (1)
#define GUI_USE_ARGB (1)
#endif
Projects links against the following libraries:
All colors (bitmaps, texts, drawings) are correct on board while they are inverted on the simulator. On board, using GUICC_565 instead of GUICC_M565 inverts the colors and we get the same results as the simulator. Nevertheless, on the simulator, using GUICC_565 instead of GUICC_M565 has no effect.
At the end of the day, colors are always wrong on the simulator. What can we do to fix this?
Best regards,
Nicolas.