结论结论:
通过以上简单的 6 个步骤就可以使用 STemWin 提供的 GUI 库和工具软件来生成一个简单的应
用了,是不是很方便使用呢,而且 STemWin 是免费的哦;-)
处理处理:
另附参考代码 :extern GUI_CONST_STORAGE GUI_BITMAP bmbackground;
extern GUI_CONST_STORAGE GUI_BITMAP bmboy1;
extern GUI_CONST_STORAGE GUI_BITMAP bmboy2;
extern GUI_CONST_STORAGE GUI_BITMAP bm**;
extern GUI_CONST_STORAGE GUI_BITMAP bmsport;
extern GUI_CONST_STORAGE GUI_BITMAP bmwatch;
static void smartwatch_run(void)
{
///draw the background and delay 3s
GUI_DrawBitmap(&bmbackground, 0,0);
GUI_Delay(3*1000);
///draw the stm32 smartwatch ** and delay 3s
GUI_DrawBitmap(&bm**, 0,0);
GUI_Delay(3*1000);
///draw the watch and delay 3s
GUI_DrawBitmap(&bmwatch, 0,0);
GUI_Delay(3*1000);
///The boy running on the playground...
while(1)
{
GUI_DrawBitmap(&bmsport, 0,0);
GUI_DrawBitmap(&bmboy1, 90,60);
GUI_Delay(500);
GUI_DrawBitmap(&bmsport, 0,0);
GUI_DrawBitmap(&bmboy2, 90,60);
GUI_Delay(500);
}
}
/*********************************************************************
*
* MainTask
*/
void MainTask(void) {
GUI_Clear();
GUI_SetFont(&GUI_Font20_1);
#if 0
GUI_DispStringAt("Hello world!", (LCD_GetXSize()-100)/2, (LCD_GetYSize()-
20)/2);
#else
smartwatch_run();
#endif
while(1);
}
|