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>
This commit is contained in:
Mark Cave-Ayland 2020-06-23 21:49:27 +01:00
parent 244a0ee965
commit 3fe02cc8b3
2 changed files with 15 additions and 3 deletions

View file

@ -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;