Skip to main content
Andreea
Associate
February 4, 2020
Question

How to interface physical buttons through the editor?

  • February 4, 2020
  • 8 replies
  • 1889 views

Hello. I am currently trying to interface physical buttons with my UI, by using interactions directly from the designer, like so:

When hardware button is clicked > BUTTON KEY > Change screen

I am brand new in this software and embedded software in general, thus my question is, for BUTTON KEY, what do the numbers mean? How do I access specific digital pins on my board?

Any help is greatly appreciated.

P.S. I'm working on a STM32F746G-DISCOVERY board.

This topic has been closed for replies.

8 replies

Martin KJELDSEN
Principal III
February 5, 2020

Maybe i should do a writeup on this. All the way from CubeMX to Designer.

In a nutshell, you tell your .touchgfx file what the different keys "mean", which values they'll have. These values are received through your implementation of ButtonController which you'll configure on a TouchGFX HAL. That ButtonController will then sample some GPIO port and return the value, for a key, that you defined in your .touchgfx file - Creating a link between hardware and designer interaction (which translates to a handleKeyEvent() ).

I'll try to get more concrete when i have time.

/Martin

Andreea
AndreeaAuthor
Associate
February 5, 2020

Hi Martin,

Thanks a lot, it's getting closer to what I need. Do you think it could be possible to include some kind of demo of it in the next webinar?

Martin KJELDSEN
Principal III
February 5, 2020

Potentially! I'm not sure what the webinar plan is :)

Martin KJELDSEN
Principal III
February 5, 2020

Maybe i'll do a video guide once i get some "free" time.

/Martin

Andreea
AndreeaAuthor
Associate
February 11, 2020

That would be Great !!!

Martin KJELDSEN
Principal III
February 17, 2020

Since we don't be going to Embedded World, i'll make an effort to do a video on this i think.

/Martin

Andreea
AndreeaAuthor
Associate
February 17, 2020

Sounds good. Do you have any idea when we can expect this video to air? :smiling_face_with_smiling_eyes:

Martin KJELDSEN
Principal III
February 17, 2020

When EW was supposed to end for us, is my guess :D End of this month. I won't start until EW starts.

/Martin