hw/misc: add a toy i2c echo device
commitb14037f37f913a21eddadb1e4b53a2f7adf720ad
authorKlaus Jensen <k.jensen@samsung.com>
Thu, 2 Mar 2023 12:57:50 +0000 (2 13:57 +0100)
committerCédric Le Goater <clg@kaod.org>
Thu, 2 Mar 2023 12:57:50 +0000 (2 13:57 +0100)
tree9d2854fb48c58625307789b36747d7e5cfe91774
parent791cb95f23045f2d69364786edf61d289889199d
hw/misc: add a toy i2c echo device

Add an example I2C device to demonstrate how a slave may master the bus
and send data asynchronously to another slave.

The device will echo whatever it is sent to the device identified by the
first byte received.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
[ clg: integrated fixes :
  https://lore.kernel.org/qemu-devel/Y3yMKAhOkYGtnkOp@cormorant.local/ ]
Message-Id: <20220601210831.67259-7-its@irrelevant.dk>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/misc/i2c-echo.c [new file with mode: 0644]
hw/misc/meson.build