初中生
最后登录1970-1-1
在线时间 小时
注册时间2017-7-3
|
芯片型号:STM32H750XBh6
由于Flash只有128K,所有使用了BOOT+APP的方式,APP程序中采用STemWin进行GUI的设计。
- static const GUI_WIDGET_CREATE_INFO _aDialogCreate_Menu[] = {
- { FRAMEWIN_CreateIndirect, "Hello", ID_FRAMEWIN_0, 0, 0, 800, 480, 0, 0x64, 0 },
-
- // { WINDOW_CreateIndirect, "Window", ID_WINDOW_0, 0, 0, 800, 480, 0, 0x0, 0 },
-
- { CHECKBOX_CreateIndirect, "Port0", ID_CHECKBOX_0, 620, 40, 80, 20, 0, 0x0, 0 },
- // USER START (Optionally insert additional widgets)
- // USER END
- #endif
- };
复制代码
运行完以下代码后,屏幕不刷新,出现HardFault_Handler。
hWin = GUI_CreateDialogBox(_aDialogCreate_Menu, GUI_COUNTOF(_aDialogCreate_Menu), _cbDialog, 0, 0, 0);//!!!!! GUI_Delay(1);
将资源列表和回调函数修改为以下形式,屏幕刷新正常。
- static const GUI_WIDGET_CREATE_INFO _aDialogCreate_Menu[] = {
- // { FRAMEWIN_CreateIndirect, "Hello", ID_FRAMEWIN_0, 0, 0, 800, 480, 0, 0x64, 0 },
- { WINDOW_CreateIndirect, "Window", ID_WINDOW_0, 0, 0, 800, 480, 0, 0x0, 0 },
- { CHECKBOX_CreateIndirect, "Port0", ID_CHECKBOX_0, 620, 40, 80, 20, 0, 0x0, 0 },
- // USER START (Optionally insert additional widgets)
- // USER END
- #endif
- };
复制代码
|
|