summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/usb/hid-logitech-dj.c18
-rw-r--r--hw/usb/hid-logitech-dj.h4
2 files changed, 20 insertions, 2 deletions
diff --git a/hw/usb/hid-logitech-dj.c b/hw/usb/hid-logitech-dj.c
index a1dfeb9534..62a15ea802 100644
--- a/hw/usb/hid-logitech-dj.c
+++ b/hw/usb/hid-logitech-dj.c
@@ -305,12 +305,27 @@ static void hidpp_init_device(USBLtunifyState *s, int device_index, int devtype)
case DEVTYPE_KEYBOARD:
hd->hid = &s->hid[IFACE_KBD];
hd->info.report_types = 0x1a; /* Keyboard, Consumer Control, System Control */
+ hd->info.wireless_pid = 0x2010;
+ hd->info.serial = 0x4b657973;
+ memcpy(hd->info.name, "K800", 4);
break;
case DEVTYPE_MOUSE:
hd->hid = &s->hid[IFACE_MSE];
hd->info.report_types = 4; /* HID Collection: Mouse */
+ hd->info.wireless_pid = 0x4013;
+ hd->info.serial = 0x52617473;
+ memcpy(hd->info.name, "M525", 4);
+ break;
+ case DEVTYPE_TOUCHPAD:
+ /* TODO: perhaps "unpair" mouse and use this touchpad instead? */
+ hd->hid = &s->hid[IFACE_MSE];
+ hd->info.report_types = 0x0e; /* Keyboard, Mouse, Consumer Ctrl */
+ hd->info.wireless_pid = 0x4026;
+ hd->info.serial = 0x4f4f4f48;
+ memcpy(hd->info.name, "T650", 4);
break;
}
+ hd->info.protocol_version = 0x0200; /* HID++ 2.0 */
hd->mode = LTUNIFY_MODE_HID;
hd->powered_on = true;
}
@@ -329,6 +344,9 @@ void hidpp_reset(USBLtunifyState *s)
void hidpp_init(USBLtunifyState *s)
{
+ LHidReceiver *r = &s->receiver;
+ r->info.serial = 0x4c4f5354;
+
hidpp_init_device(s, 1, DEVTYPE_KEYBOARD);
hidpp_init_device(s, 2, DEVTYPE_MOUSE);
}
diff --git a/hw/usb/hid-logitech-dj.h b/hw/usb/hid-logitech-dj.h
index bcfe17cc7e..5e0ba2efe8 100644
--- a/hw/usb/hid-logitech-dj.h
+++ b/hw/usb/hid-logitech-dj.h
@@ -122,7 +122,7 @@ struct firmware_version {
};
typedef struct {
- const struct {
+ struct {
uint32_t serial;
struct firmware_version version;
} info; /* static information */
@@ -155,7 +155,7 @@ typedef struct {
uint16_t protocol_version; /* HID++ protocol version */
uint16_t wireless_pid;
uint32_t serial;
- const char name[15];
+ char name[15];
uint8_t usability_info; /* bits 0..3 power switch location */
uint32_t report_types; /* supported report types (e.g. mouse) */
/* TODO: feature set */