On 17 November 2016 at 12:41, Liviu Ionescu <i...@livius.net> wrote: > I added graphical buttons to GNU ARM Eclipse QEMU, and I can already trigger > actions when a button is pushed/released, so currently I can reset the > STM32F4DISCOVERY board clicking the reset button on the board picture. > > Now I want to implement the user button, which on this board is connected to > a GPIO pin. > > > Can you suggest an existing board that somehow implements a GPIO > input, so I can a use a similar mechanism?
Stellaris has a bunch of things with GPIO inputs (eg the ADC has a GPIO input which we wire up to the GPTM device). Basically the device implement some input GPIO lines, and then the board code can call qdev_get_gpio_in() to get the qemu_irq so it can signal it when appropriate (or wire it up to some other device which signals it). You might prefer to use the named-gpios rather than the old-style numbered GPIOs; either will work. thanks -- PMM