emWin GUI Main_Task execution Regarding

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

emWin GUI Main_Task execution Regarding

2,627件の閲覧回数
EmbeddedTech
Contributor III

Hi,

I have the iMXRT1052 EVK and using AppWizard to create the screen for GUI.

I would like to know how the below lines of code work in Main_Task in the GUI.

 while (1) {

    while (GUI_Exec1()) {

      APPW_Exec();

    }

    APPW_Exec();

    PRINTF("GUI task ...\r\n");

    GUI_Delay(50);   

 

  }

 

why should we call  APPW_Exec();​ twice?

Will the PRINTF call which I have placed, be printed everytime?

I sometimes see that the serial messages are not printed and it looks like its still in GUI_EXEC1(). When will such situation occur?

Your help on this is highly appreciated.

Thanks.

0 件の賞賛
返信
1 返信

2,603件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello

Hope you are well.
The function of these lines is to keep the screen running.  It is executed twice to keep it running. This assure us that the screen is alive while executing one job in the GUI.
GUI_EXEC1() returns 0 when no job is done and the task goes to execute the second APPW_Exec() to enter in the second while.
In this post there is an example where APPW_Exec() is executed once, you can see the results: https://community.nxp.com/t5/MCUXpresso-General/AppWizard-APPW-SetVarData-doesn-t-trigger-WM-NOTIFIC...

Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar