summary refs log tree commit diff stats
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:25 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2020-06-26 10:13:51 +0100
commit969ca2f7a1a41123f08ce67d7a51075c3ee2fd6e (patch)
treebaf557b5644f040ad6d0a364d4fa43ee0231d69c /include/hw/input/adb.h
parentf3d61457e86cf43eb5322b57e3f9fcd1bb087591 (diff)
downloadfocaccia-qemu-969ca2f7a1a41123f08ce67d7a51075c3ee2fd6e.tar.gz
focaccia-qemu-969ca2f7a1a41123f08ce67d7a51075c3ee2fd6e.zip
adb: introduce new ADBDeviceHasData method to ADBDeviceClass
This is required later to allow devices to assert a service request (SRQ)
signal to indicate that it has data to send, without having to consume it.

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-12-mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'include/hw/input/adb.h')
-rw-r--r--include/hw/input/adb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/input/adb.h b/include/hw/input/adb.h
index 15b1874a3d..9b80204e43 100644
--- a/include/hw/input/adb.h
+++ b/include/hw/input/adb.h
@@ -39,6 +39,8 @@ typedef struct ADBDevice ADBDevice;
 typedef int ADBDeviceRequest(ADBDevice *d, uint8_t *buf_out,
                               const uint8_t *buf, int len);
 
+typedef bool ADBDeviceHasData(ADBDevice *d);
+
 #define TYPE_ADB_DEVICE "adb-device"
 #define ADB_DEVICE(obj) OBJECT_CHECK(ADBDevice, (obj), TYPE_ADB_DEVICE)
 
@@ -62,6 +64,7 @@ typedef struct ADBDeviceClass {
     /*< public >*/
 
     ADBDeviceRequest *devreq;
+    ADBDeviceHasData *devhasdata;
 } ADBDeviceClass;
 
 #define TYPE_ADB_BUS "apple-desktop-bus"