qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [RFC v3] qapi: command category to stimulate high-level m


From: Gerd Hoffmann
Subject: Re: [Qemu-arm] [RFC v3] qapi: command category to stimulate high-level machine devices
Date: Mon, 4 Jun 2018 11:56:12 +0200
User-agent: NeoMutt/20180512

  Hi,

> > One aim of our efforts is to create a user interface that models the
> > look and feel of the physical microbit board and lets the user interact
> > with its inputs and provide feedback on its outsputs.
> > 
> > For this it is necessary to transmit user inputs such as the pressing of a
> > button to the machine.
> > In return, when the state of an output is changed on the machine, this
> > change needs to be reflected in the user interface.
> > At the moment, there are only a few QMP commands that provide user input to 
> > the
> > machine, eg. send-keys, input-button. These commands require very
> 
> QMP command names (from qapi/ui.json): send-key and input-send-event.
> 
> > high-level concepts, which are not really suitable for applications that
> > microcontrollers are typically used in in.
> 
> I agree that existing commands aren't suitable.  They are tied to
> QemuConsole, which makes sense for graphics + keyboard/mouse input
> devices but doesn't exist for microcontrollers.

Binding to a QemuConsole is optional, so that isn't an blocker.  Button
presses can be integrated without too much trouble I think.  One option
would be to just map them to keyboard keys.  As the buttons are named
'A' and 'B' using Q_KEY_CODE_{A,B} would be an obvious choice.

GPIO and other sensors can't be handled that easily.  The input layer
could be extended to handle them too, but maybe it is better to design
something else for them.

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]