Main_Task for GUI in APPwizard

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Main_Task for GUI in APPwizard


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

      while (1) {
      while (GUI_Exec1()) {
      PRINTF("GUI task ...\r\n");


      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.
    • Hi,

      Every time GUI_Exec1() has done something it returns 1. If there is nothing left to do it returns with 0 but has done something. Therefore a second call of APPW_Exec() is required.

      TechGUI wrote:

      When will such situation occur?
      As long as there is something to do you will stay in the loop. This can be keeping the touch screen pressed or constantly redrawing something.

      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system:

      Or you can contact us via e-mail.