Кнопка эмуляции в qemu-stm32 - PullRequest
       28

Кнопка эмуляции в qemu-stm32

1 голос
/ 09 февраля 2020

Я запускаю button демо из https://github.com/beckus/stm32_p103_demos на qemu-stm32 https://github.com/beckus/qemu_stm32

Я вижу, как светодиод мигает в led_blink демо как текст "Led ON" в консоли, но как мне эмулировать нажатие кнопки?

1 Ответ

1 голос
/ 12 февраля 2020

Попробуйте использовать button_int демо .

С https://github.com/beckus/stm32_p103_demos/blob/master/README:

button_int -
    Example of external interrupts.  Toggles the LED every time the
    button is pressed.  Note that in QEMU, the button press is simulated
    by pressing the b key.  You will need to do this from the QEMU monitor,
    by typing the command "sendkey b".

Согласно readme, button демо не всегда работает:

button -
    Example of using the button in non-interrupt mode.  Continuously polls
    the button and toggles the LED when the button is pressed.  Note that this
    example does not seem to work well in QEMU.  When using "sendkey b"
    (see the button_int demo below), the LED does not toggle.  Perhaps
    this is a timing issue?
...