新手入门
- 积分
- 15
- 金钱
- 15
- 注册时间
- 2017-5-28
- 在线时间
- 7 小时
|
楼主 |
发表于 2017-6-1 17:12:27
|
显示全部楼层
窗口创建任务:
void MainTask(void)
{
GUI_Init();
WM_SetDesktopColor(GUI_WHITE); /* Automacally update desktop window */
WM_SetCreateFlags(WM_CF_MEMDEV); /* Use memory devices on all windows to avoid flicker */
//PROGBAR_SetDefaultSkin(PROGBAR_SKIN_FLEX);
//FRAMEWIN_SetDefaultSkin(FRAMEWIN_SKIN_FLEX);
//PROGBAR_SetDefaultSkin(PROGBAR_SKIN_FLEX);
//BUTTON_SetDefaultSkin(BUTTON_SKIN_FLEX);
//CHECKBOX_SetDefaultSkin(CHECKBOX_SKIN_FLEX);
//DROPDOWN_SetDefaultSkin(DROPDOWN_SKIN_FLEX);
//SCROLLBAR_SetDefaultSkin(SCROLLBAR_SKIN_FLEX);
//SLIDER_SetDefaultSkin(SLIDER_SKIN_FLEX);
//HEADER_SetDefaultSkin(HEADER_SKIN_FLEX);
//RADIO_SetDefaultSkin(RADIO_SKIN_FLEX);
while(1)
{
GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbCallback, 0, 0, 0);
}
}
Emwin任务:
static void CONTROL_LCD(void const *argument){
uint32_t PreviousWakeTime = osKernelSysTick();
CALIBRATION_Check();
GUI_SetBkColor(GUI_WHITE);
GUI_SetColor(GUI_BLUE);
GUI_Clear();
for(;;){
MainTask();
}
}
主函数:
int main(void)
{
/* Enable the CPU Cache */
CPU_CACHE_Enable();
/* STM32F7xx HAL library initialization:
- Configure the Flash ART accelerator on ITCM interface
- Configure the Systick to generate an interrupt each 1 msec
- Set NVIC Group Priority to 4
- Low Level Initialization
*/
HAL_Init();
/* Configure the system clock to 200 Mhz */
SystemClock_Config();
/* Initialize LEDs */
BSP_LED_Init(LED1);
/* Initialize UART */
Uart_init();
/* Initialize LCD */
LCD_Init();
//CALIBRATION_Check();
/* Thread 1 definition */
osThreadDef(Communication,CONTROL_SIM8000, osPriorityNormal, 0,128);
osThreadDef(LcdControl,CONTROL_LCD, osPriorityNormal ,0,512);
osThreadDef(Update,Update_TS,osPriorityNormal,0,128);
/* Start thread 1 */
CommunicationHandle = osThreadCreate(osThread(Communication), NULL);
/* Start thread 2 */
LCD_CONTROLHandle=osThreadCreate(osThread(LcdControl),NULL);
/* Start thread 3 */
UpdateHandle=osThreadCreate(osThread(Update),NULL);
/* Start scheduler */
osKernelStart();
/* We should never get here as control is now taken by the scheduler */
for(;;);
}
求大神指教
|
|