Just asking a few hypothetical questions about using GUI_Exec() or GUI_Exec1() calls because I sometimes experience HardFaults when GUI_Exec() was called.
The below snippet is from emWin Manual (section 6.1.8.7.1):
static void _DemoTimer(void)
{
WM_HWIN hWin;
WM_HTIMER hTimer;
hWin = WM_CreateWindow(10, 10, 100, 100, WM_CF_SHOW, _cbWin, 0);
hTimer = WM_CreateTimer(hWin, 0, 1000, 0);
while (1)
{
GUI_Exec();
}
}
If WM_CreateWindow() and WM_CreateTimer() and others like GUI_FillRectEx() and GUI_DrawGradientV() were called 1000 times prior to next GUI_Exec() call will the job queues get compromised (overflow) or does that depend on my program settings like heap size or some other emWin setting?
Will GUI_Exec1() call process entire WM_CreateWIndow() action or part of action? [See below]
hWin = WM_CreateWindow(10, 10, 100, 100, WM_CF_SHOW, _cbWin, 0);
GUI_Exec1();
hTimer = WM_CreateTimer(hWin, 0, 1000, 0);
GUI_Exec1();
Is there a way to tell how many jobs need to be performed by GUI_Exec()?
Lastly, what approaches do you recommend to avoid hardfaults when GUI_Exec() or GUI_Exec1() is called?