adb: fix read reg 3 byte ordering
According to the Apple ADB documentation, register 3 is a 2-byte register with the device address in the first byte, and the handler ID in the second byte. This is currently the opposite away to which QEMU returns them so switch the order around. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
8f55ac1304
commit
fb6649f172
|
@ -290,8 +290,8 @@ static int adb_kbd_request(ADBDevice *d, uint8_t *obuf,
|
||||||
olen = 2;
|
olen = 2;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
obuf[0] = d->handler;
|
obuf[0] = d->devaddr;
|
||||||
obuf[1] = d->devaddr;
|
obuf[1] = d->handler;
|
||||||
olen = 2;
|
olen = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,8 +172,8 @@ static int adb_mouse_request(ADBDevice *d, uint8_t *obuf,
|
||||||
case 1:
|
case 1:
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
obuf[0] = d->handler;
|
obuf[0] = d->devaddr;
|
||||||
obuf[1] = d->devaddr;
|
obuf[1] = d->handler;
|
||||||
olen = 2;
|
olen = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue