GUIX - GX_SIGNAL event generation and working of pixelmap button select/deselct

I have been working with GUIX for Renesas Synergy platform. In many applications and demo codes provided by Renesas, they have used a touch driver with its framework from SSP. In every case of touch events they have used a macro named GX_SIGNAL, which is called when the touch panel is contacted at a point. In demo code, they have neither compared touch co-ordinates touched with actual pixelmap co-ordinates, nor have they generated and events.

My question is that how does the system know that the button at the exact point is touched and is selected? How is the GX_SIGNAL generated by system and how does it compare the touch coordinates with that particular pixelmap and selects it accordingly?

I am using a Resistive Touch Panel without touch driver. I am reading raw ADC counts to get my X/Y co-ordinates and scale it according to my display. I want that whenever any coordinate within a pixelmap area is touched, it generates GX_SIGNAL for that pixelmap widget id and pixelmap should change to its selected state while its is being touched and it should go back to its normal state when released.

Can anyone help me with this?

Thank you

  • Good day, Nirav!

    How are things going for you? Do you have any progress on this? I thought you might to refer to GUIX Synergy Port Framework Module Guide. It elaborates the event notification, as well as the GX_EVENT data type and gx_signal macro. See page 8-10 of the document.

    I hope that will help you.

    Best regards,
    Sai
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    en-us.knowledgebase.renesas.com/

  • In reply to Sai:

    Thank you Sai for your response.

    I have read this guide before but it does not answer my question. In case of using a touch driver and its SSP framework, it will generate an interrupt whenever touch panel is contacted. After contacting, the framework will get payload data and generate event named SF_TOUCH_PANEL_EVENT_DOWN. Now it is the user who assigns GX_EVENT_PEN_DOWN to gx_event_type whenever this SF_TOUCH_PANEL_EVENT_DOWN is generated.

    In my case, I am not using any touch driver. I am using all 4 wires of RTP, connected directly to ADC pins of MCU to read raw counts and mapping it to my LCD resolution.

    if(isTouching()) //This will return true when the touch screen is contacted
    {
    new_event.gx_event_type = GX_EVENT_PEN_DOWN;
    ret=gx_system_event_send(&new_event);
    }

    else
    {
    new_event.gx_event_type = GX_EVENT_PEN_UP;
    ret=gx_system_event_send(&new_event);
    }

    case GX_EVENT_PEN_DOWN:
    if(getTouch(2,2,31,31)) //This will return true if touch panel is contacted between given X/Y areas
    gx_button_select((GX_BUTTON *)&menupage.menupage_pixelmap_button);
    break;

    case GX_EVENT_PEN_UP:
    if(menupage.menupage_pixelmap_button.gx_widget_style == (GX_STYLE_ENABLED|GX_STYLE_BUTTON_PUSHED))
    {
    gx_button_deselect((GX_BUTTON *)&menupage.menupage_pixelmap_button, 0);
    /*Change the window or any user code*/
    }
    break;

    Now here I am manually selecting and deselecting buttons that too in GX_EVENT_PEN_DOWN case. But in the other demo codes, they have used case GX_SIGNAL(ID_HOME, GX_EVENT_CLICKED) and directly implemented functionality in it. They do not need to manually select and deselect buttons.

    So my question is that how is the GX_SIGNAL event generated. I have also read the touch driver code but there is no mention of sending GX_SIGNAL type events.

    Regards,
    Dwij
  • In reply to Nirav:

    Hi Dwij,

    Seems no one has yet responded to your new question. Were you able to solve this by now?

    Herald
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    en-us.knowledgebase.renesas.com/