GPIO state in qemu

Joel Stanley joel at jms.id.au
Sat Sep 7 04:05:46 AEST 2019


At the osfc hackathon today James and I were talking about Qemu's new
support for modelling GPIOs. Here's some documentation on how it can be
used.

To set a pin's state in the monitor:

qom-set gpio gpioA0 true

To do the equivalent in code:

object_property_set_bool(OBJECT(&s->gpio), true, "gpioA0", &error_abort);

Thanks Rashmica for writing the model and Cedric for the tips.

Cheers,

Joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190906/20e853ca/attachment.htm>


More information about the openbmc mailing list