aboutsummaryrefslogtreecommitdiff
path: root/include/hw/input/adb.h
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2020-06-23 21:49:27 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2020-06-26 10:13:51 +0100
commit3fe02cc8b3a5b50fad6d5e7cc3a65fd52d1fad36 (patch)
tree4d5b17d7c237380d9b1fa5c51886415c2289c7fd /include/hw/input/adb.h
parent244a0ee96545e79af7ade39b510e459ef5a1c366 (diff)
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 <mark.cave-ayland@ilande.co.uk> Tested-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200623204936.24064-14-mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'include/hw/input/adb.h')
-rw-r--r--include/hw/input/adb.h4
1 files changed, 4 insertions, 0 deletions
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;