summaryrefslogtreecommitdiff
path: root/hw/usb/hid-logitech-hidpp20.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-08-17 23:12:01 +0200
committerPeter Wu <peter@lekensteyn.nl>2014-08-17 23:12:01 +0200
commitde29db4632a64cc7c20eb626a1b17e41e50adb26 (patch)
treeb09a92c303180556c83db1d64d65c2a1ea5b04b4 /hw/usb/hid-logitech-hidpp20.c
parent505280bd9af458c712ec6d19afacdc192c6e02ab (diff)
downloadqemu-logitech-unifying.tar.gz
WIP firmware reverse engineeringlogitech-unifying
Not touched since 7 April 2014.
Diffstat (limited to 'hw/usb/hid-logitech-hidpp20.c')
-rw-r--r--hw/usb/hid-logitech-hidpp20.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/usb/hid-logitech-hidpp20.c b/hw/usb/hid-logitech-hidpp20.c
index 51e9596151..e3d451a1ef 100644
--- a/hw/usb/hid-logitech-hidpp20.c
+++ b/hw/usb/hid-logitech-hidpp20.c
@@ -271,8 +271,13 @@ static HIDPP20_FEATURE(feat_featureinfo)
static HIDPP20_FEATURE(feat_dfucontrol)
{
- return -HIDPP20_ERR_CODE_UNSUPPORTED; /* TODO: figure out */
switch (fn) {
+ case 0:
+ if (!memcmp(params, "DFU", 3)) {
+ hd->dfu.active = true;
+ return 0;
+ }
+ return -HIDPP20_ERR_CODE_INVALIDARGUMENT;
default:
return -HIDPP20_ERR_CODE_INVALID_FUNCTION_ID;
}