Merge 2 working report descriptors?
Posted: Fri Sep 23, 2011 3:38 am
I'm making a device with a LED matrix and a volume control potentiometer. For the volume i used USAGE volume up and volume down, because I couldn't figure out how to increase volume with the Volume USAGE (everything i tried always decreased the volume). If anyone knows how to do this with only the VOLUME usage, it will help too. But to my problem:
I have 2 working report descriptors, if I use only 1 of them, they work. But when I tried to combine them (just join them and update the USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH appropriately), Windows will say the device cannot start (error 10). I've seen this error come up whenever Windows won't accept the report descriptor for some reason. I am using the free VID and PID for generic HID devices (0x16c0 and 0x05df).
The descriptor for volume (working):
The descriptor for display (working):
So my problem is joining these 2 working descriptors so I can use both features at the same time. Any help is appreciated!
Thanks,
Jan
I have 2 working report descriptors, if I use only 1 of them, they work. But when I tried to combine them (just join them and update the USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH appropriately), Windows will say the device cannot start (error 10). I've seen this error come up whenever Windows won't accept the report descriptor for some reason. I am using the free VID and PID for generic HID devices (0x16c0 and 0x05df).
The descriptor for volume (working):
Code: Select all
0x05, 0x0c, // USAGE_PAGE (Consumer Devices)
0x09, 0x01, // USAGE (Consumer Control)
0xa1, 0x01, // COLLECTION (Application)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x09, 0xe9, // USAGE (Volume Up)
0x09, 0xea, // USAGE (Volume Down)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x02, // REPORT_COUNT (2)
0x81, 0x06, // INPUT (Data,Var,Rel)
0x09, 0xe2, // USAGE (Mute)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x06, // INPUT (Data,Var,Rel)
0x95, 0x05, // REPORT_COUNT (5)
0x81, 0x07, // INPUT (Cnst,Var,Rel)
0xc0, // END_COLLECTION
The descriptor for display (working):
Code: Select all
0x05, 0x14, // USAGE_PAGE (Alphnumeric Display)
0x09, 0x01, // USAGE (Alphanumeric Display)
0xa1, 0x02, // COLLECTION (Logical)
0x09, 0x2c, // USAGE (Display Data)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x80, // REPORT_COUNT (128)
0x91, 0x02, // OUTPUT (Data,Var,Abs)
0xc0, // END_COLLECTION
So my problem is joining these 2 working descriptors so I can use both features at the same time. Any help is appreciated!
Thanks,
Jan