Hi,
I've been working with Arduino and it's simple graphics libraries for many years, and I'm finally moving up to proper hardware (STM32), and proper graphics (emWin!).
Apologies if my question is dumb and perhaps highlights my lack of C knowledge.
Working with an STM32F469-Discovery board.
I have generated a STM32CubeMX project as a starting point and all the MCU stuff is working great, I'm receiving UART data coming in to an array and flashing some LEDs.
I then generated a dialog using the emWin GUI designer, copied the generated files into my project (WindowDLG.c, GUI.h/c, GUI_App.h/c and all the core files).
My main.c just has
GRAPHICS_HW_Init();
GRAPHICS_Init();
TouchTimer_Init();
GRAPHICS_MainTask();
And I call GUI_Delay(25); from the while(1) loop in main.c
The emWin graphics are all working, live and I have touch stuff happening.
My aim at the moment is to simply update a text field based on latest UART data.
I'm trying to update the text field from the UART interrupt handler function in my main.c with the following. I know it's bad form to do this from an ISR but just trying to get it working:
But obviously it fails to compile because the emWin objects are undeclared in my main.c
Then I #include WindowDLG.c into my main.c, but then hItem is undeclared. If i declare "WM_HWIN hItem;", I get loads of multiple definition compile errors presumably because I shouldn't have #included WindowDLG.c.
What is the proper procedure to get this working in my scenario?
Thanks for any help
I've been working with Arduino and it's simple graphics libraries for many years, and I'm finally moving up to proper hardware (STM32), and proper graphics (emWin!).
Apologies if my question is dumb and perhaps highlights my lack of C knowledge.
Working with an STM32F469-Discovery board.
I have generated a STM32CubeMX project as a starting point and all the MCU stuff is working great, I'm receiving UART data coming in to an array and flashing some LEDs.
I then generated a dialog using the emWin GUI designer, copied the generated files into my project (WindowDLG.c, GUI.h/c, GUI_App.h/c and all the core files).
My main.c just has
GRAPHICS_HW_Init();
GRAPHICS_Init();
TouchTimer_Init();
GRAPHICS_MainTask();
And I call GUI_Delay(25); from the while(1) loop in main.c
The emWin graphics are all working, live and I have touch stuff happening.
My aim at the moment is to simply update a text field based on latest UART data.
I'm trying to update the text field from the UART interrupt handler function in my main.c with the following. I know it's bad form to do this from an ISR but just trying to get it working:
But obviously it fails to compile because the emWin objects are undeclared in my main.c
Then I #include WindowDLG.c into my main.c, but then hItem is undeclared. If i declare "WM_HWIN hItem;", I get loads of multiple definition compile errors presumably because I shouldn't have #included WindowDLG.c.
What is the proper procedure to get this working in my scenario?
Thanks for any help
The post was edited 2 times, last by loopyengineeringco: extra detail ().