GUI_Init

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

  • Hello,

    Is there a way to deinit GUI so we can reinit using GUI_Init. For battery powered applications, we need to kill display task and shut down LCD. Upon keypress, we need to restart LCD and emwin stack. As we can kill display task in the middle of doing something, resuming might be harmful for the emwin stack internal states. As it will looses sync with LCD

    In fact, there is a function available in emwin. Tried it. It does not seem to work.

    Thanks

    Kerem
  • Hello Kerem,

    we have added the function GUI_Exit() to the latest emWin version (V5.34).
    This function de-initializes emWin and the task can be killed or restarted.

    Regards,
    Sven
    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: segger.com/ticket/

    Or you can contact us via e-mail.
  • I have 5.28 version of emWin library.
    In its manual I already see description of GUI_Exit() function.
    And i have such function prototype in 'GUI.h' file.
    I want to use it for re-initialization process after emWin runs out of memory (another bug in ...Ex() functions):
    This is my code:

    if (GUI_ALLOC_GetNumFreeBytes() < 2 * 1024) {
    taskENTER_CRITICAL();
    GUI_Exit();
    LCD_reset();
    GUI_Init(); //hardfault here, somewhere in hidden part after LCD_X_Config()
    taskEXIT_CRITICAL();
    }

    But when I try to use it i catch hardfault error.
    Could you comment such behaviour?
    My full project you can take here:
    yadi.sk/d/B0ewihUcvqFac