emWin with KeilOS

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

  • emWin with KeilOS

    Hi,

    I am running the emWin in a Multitasking system and it is working well. But there is one Problem. In the User Manual is a discription of GUI_X_WAIT_EVENT and GUI_X_SIGNAL_EVENT. I defined the Macros with the folloing code:

    static OS_TID os_evt_id;

    void GUI_X_WaitEvent(void)
    {
    os_evt_id = os_tsk_self();
    os_evt_wait_or(1,0xFFF0);
    }
    void GUI_X_SignalEvent(void)
    {
    if (os_evt_id)
    {
    os_evt_set(1, os_evt_id);
    }
    }


    While the SignalEven funktion ist called automatic within the emWin, the wait funktion isn't.
    Should I call the wait funktion by my self? I don't realy understand the use of the Macros.
  • Hi Raffa,

    no, you just have to implement these functions and nothing more.
    emWin itsself will call these functions. Pleae be aware that you have to configure emWin
    for multitasking (but I guess you did it already).

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

    per default these functions are not used. As you can see in the documentation in chapter '13.5 GUI configuration macros for multitasking support' the default behaviour is using the function GUI_X_ExecIdle(). You have to add the following lines to GUIConf.h:

    #define GUI_X_WAIT_EVENT() GUI_X_WaitEvent()
    #define GUI_X_SIGNAL_EVENT() GUI_X_SignalEvent()

    After this the functions should be used.

    Regards,

    F.Berkel