diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-03-24 17:16:24 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2014-03-24 17:16:24 +0100 |
commit | 3615170bd1ed6f09f878a8b538321044efddd8e0 (patch) | |
tree | 67f457ba2eb226a302c309845662e4e2d6276d8d /hw/usb/hid-logitech-dj.h | |
parent | d26faef5d3e70ab8072f6387dd97b2527b8f0e39 (diff) | |
download | qemu-3615170bd1ed6f09f878a8b538321044efddd8e0.tar.gz |
unifying: fix mouse report format, DRY
Introduce new function to retrieve HID data for a given HIDState (if
any) and fix the incompatibility between the HID format for mice as
used by QEMU and the format described by the report (it contains an
extra field for buttons).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'hw/usb/hid-logitech-dj.h')
-rw-r--r-- | hw/usb/hid-logitech-dj.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/usb/hid-logitech-dj.h b/hw/usb/hid-logitech-dj.h index 785f0d5b56..33c6d4404a 100644 --- a/hw/usb/hid-logitech-dj.h +++ b/hw/usb/hid-logitech-dj.h @@ -275,6 +275,10 @@ typedef struct USBLtunifyState { } USBLtunifyState; +/* poll a HID device for data, returning HID data in buf if any (returns 0 + * if there is no data available) */ +int usb_ltunify_poll_hid(HIDState *hs, uint8_t *buf, size_t bufsz); + /* handle control packets for interface 3 (HID++ / DJ) */ void usb_ltunify_handle_control_hidpp(USBDevice *dev, USBPacket *p, int request, int value, int index, int length, uint8_t *data); |