Hi to all,
I'm using STEMWIN (a precompiled library for ST product) on STM32F103.
the use of the lines indicated in the manual give the expected output
Display All
But when I use GUIUILDER and call CreateWindow(), nothing appear on sreen. CreateWindows() execute and rturn de handler, but there is no call to function read/write.
What I must configure before call CreateWindows() ?
some code.
main:
LCD_init:
Display All
Output of Guibuilder:
Display All
Whats wrong with GUIBuilder ?
I know that now exist app builder, but the license issued by ST cover only GIBulder
I'm using STEMWIN (a precompiled library for ST product) on STM32F103.
the use of the lines indicated in the manual give the expected output
C Source Code
- 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);
But when I use GUIUILDER and call CreateWindow(), nothing appear on sreen. CreateWindows() execute and rturn de handler, but there is no call to function read/write.
What I must configure before call CreateWindows() ?
some code.
main:
LCD_init:
C Source Code
- 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);//16bit color flexcolor driver
- //
- // 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;
- GUIDRV_FlexColor_Config(pDevice, &Config);
- //
- // Set controller and operation mode
- //
- PortAPI.pfWrite8_A0 = LcdWriteReg;
- PortAPI.pfWrite8_A1 = LcdWriteData;
- PortAPI.pfWriteM8_A1 = LcdWriteDataMultiple;
- PortAPI.pfRead8_A1 = LcdReadReg;
- PortAPI.pfReadM8_A1 = LcdReadDataMultiple;
- /*
- PortAPI.pfWrite16_A0 = LcdWriteReg;
- PortAPI.pfWrite16_A1 = LcdWriteData;
- PortAPI.pfWriteM16_A1 = LcdWriteDataMultiple;
- PortAPI.pfReadM16_A1 = LcdReadDataMultiple;
- */
- //GUIDRV_FLEXCOLOR_F66709 -> Driver for ili9341
- //GUIDRV_FLEXCOLOR_M16C0B8 -> 16bpp, no cache, 8 bitbus
- GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C0B8);//ILI9341, 16bit color, 8 bit bus, no cache
- }
C Source Code
- /*********************************************************************
- * *
- * SEGGER Microcontroller GmbH & Co. KG *
- * Solutions for real time microcontroller applications *
- * *
- **********************************************************************
- * *
- * C-file generated by: *
- * *
- * GUI_Builder for emWin version 5.44 *
- * Compiled Nov 10 2017, 08:53:57 *
- * (c) 2017 Segger Microcontroller GmbH & Co. KG *
- * *
- **********************************************************************
- * *
- * Internet: www.segger.com Support: support@segger.com *
- * *
- **********************************************************************
- */
- // USER START (Optionally insert additional includes)
- // USER END
- #include "DIALOG.h"
- /*********************************************************************
- *
- * Defines
- *
- **********************************************************************
- */
- #define ID_WINDOW_0 (GUI_ID_USER + 0x04)
- #define ID_BUTTON_0 (GUI_ID_USER + 0x05)
- // USER START (Optionally insert additional defines)
- // USER END
- /*********************************************************************
- *
- * Static data
- *
- **********************************************************************
- */
- // USER START (Optionally insert additional static data)
- // USER END
- /*********************************************************************
- *
- * _aDialogCreate
- */
- static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
- { WINDOW_CreateIndirect, "Window", ID_WINDOW_0, 0, 0, 320, 240, 0, 0x0, 0 },
- { BUTTON_CreateIndirect, "Button", ID_BUTTON_0, 118, 93, 80, 20, 0, 0x0, 0 },
- // USER START (Optionally insert additional widgets)
- // USER END
- };
- /*********************************************************************
- *
- * Static code
- *
- **********************************************************************
- */
- // USER START (Optionally insert additional static code)
- // USER END
- /*********************************************************************
- *
- * _cbDialog
- */
- static void _cbDialog(WM_MESSAGE * pMsg) {
- WM_HWIN hItem;
- int NCode;
- int Id;
- // USER START (Optionally insert additional variables)
- // USER END
- switch (pMsg->MsgId) {
- case WM_INIT_DIALOG:
- //
- // Initialization of 'Window'
- //
- hItem = pMsg->hWin;
- WINDOW_SetBkColor(hItem, GUI_MAKE_COLOR(0x0000FF00));
- // USER START (Optionally insert additional code for further widget initialization)
- // USER END
- break;
- case WM_NOTIFY_PARENT:
- Id = WM_GetId(pMsg->hWinSrc);
- NCode = pMsg->Data.v;
- switch(Id) {
- case ID_BUTTON_0: // Notifications sent by 'Button'
- switch(NCode) {
- case WM_NOTIFICATION_CLICKED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- case WM_NOTIFICATION_RELEASED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- // USER START (Optionally insert additional code for further notification handling)
- // USER END
- }
- break;
- // USER START (Optionally insert additional code for further Ids)
- // USER END
- }
- break;
- // USER START (Optionally insert additional message handling)
- // USER END
- default:
- WM_DefaultProc(pMsg);
- break;
- }
- }
- /*********************************************************************
- *
- * Public code
- *
- **********************************************************************
- */
- /*********************************************************************
- *
- * CreateWindow
- */
- WM_HWIN CreateWindow(void);
- WM_HWIN CreateWindow(void) {
- WM_HWIN hWin;
- hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
- return hWin;
- }
- // USER START (Optionally insert additional public code)
- // USER END
- /*************************** End of file ****************************/
I know that now exist app builder, but the license issued by ST cover only GIBulder