From 969ca2f7a1a41123f08ce67d7a51075c3ee2fd6e Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Tue, 23 Jun 2020 21:49:25 +0100 Subject: 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 Tested-by: Finn Thain Acked-by: Laurent Vivier Message-Id: <20200623204936.24064-12-mark.cave-ayland@ilande.co.uk> --- include/hw/input/adb.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/hw/input/adb.h b/include/hw/input/adb.h index 15b1874..9b80204 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" -- cgit v1.1