From 3fe02cc8b3a5b50fad6d5e7cc3a65fd52d1fad36 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Tue, 23 Jun 2020 21:49:27 +0100 Subject: adb: add status field for holding information about the last ADB request Currently only 2 bits are defined: one to indicate if the request timed out (no reply) and another to indicate whether the request was the result of an autopoll operation. Signed-off-by: Mark Cave-Ayland Tested-by: Finn Thain Acked-by: Laurent Vivier Message-Id: <20200623204936.24064-14-mark.cave-ayland@ilande.co.uk> --- include/hw/input/adb.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw/input') diff --git a/include/hw/input/adb.h b/include/hw/input/adb.h index f1bc358d8e..cff264739c 100644 --- a/include/hw/input/adb.h +++ b/include/hw/input/adb.h @@ -70,6 +70,9 @@ typedef struct ADBDeviceClass { #define TYPE_ADB_BUS "apple-desktop-bus" #define ADB_BUS(obj) OBJECT_CHECK(ADBBusState, (obj), TYPE_ADB_BUS) +#define ADB_STATUS_BUSTIMEOUT 0x1 +#define ADB_STATUS_POLLREPLY 0x2 + struct ADBBusState { /*< private >*/ BusState parent_obj; @@ -79,6 +82,7 @@ struct ADBBusState { uint16_t pending; int nb_devices; int poll_index; + uint8_t status; QEMUTimer *autopoll_timer; bool autopoll_enabled; -- cgit v1.2.3-55-g7522