I need to change data in eeprom in my "mouse" by "hid data requests".
In vusb-20090822\examples\hid-data\firmware\main.c I change
Code: Select all
PROGMEM char usbHidReportDescriptor[22] = {
0x06, 0x00, 0xff, // USAGE_PAGE (Generic Desktop)
0x09, 0x01, // USAGE (Vendor Usage 1)
0xa1, 0x01, // COLLECTION (Application)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x80, // REPORT_COUNT (128)
0x09, 0x00, // USAGE (Undefined)
0xb2, 0x02, 0x01, // FEATURE (Data,Var,Abs,Buf)
0xc0 // END_COLLECTION
};
to
Code: Select all
PROGMEM char usbHidReportDescriptor[52] = {
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x02, // USAGE (Mouse)
0xa1, 0x01, // COLLECTION (Application)
// 0x85, 0x02, //MouseID, // REPORT_ID (77)
0x09, 0x01, // USAGE (Pointer)
0xA1, 0x00, // COLLECTION (Physical)
0x05, 0x09, // USAGE_PAGE (Button)
0x19, 0x01, // USAGE_MINIMUM
0x29, 0x03, // USAGE_MAXIMUM
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x95, 0x03, // REPORT_COUNT (3)
0x75, 0x01, // REPORT_SIZE (1)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x05, // REPORT_SIZE (5)
0x81, 0x03, // INPUT (Const,Var,Abs)
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x30, // USAGE (X)
0x09, 0x31, // USAGE (Y)
0x09, 0x38, // USAGE (Wheel)
0x15, 0x81, // LOGICAL_MINIMUM (-127)
0x25, 0x7F, // LOGICAL_MAXIMUM (127)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x03, // REPORT_COUNT (3)
0x81, 0x06, // INPUT (Data,Var,Rel)
0xC0, // END_COLLECTION
0xC0, // END COLLECTION
};
Mouse successfully found in system:
Code: Select all
Bus Type: USB
Device Type: Human Interface Device
Power Drawn: 20 milliamps @ 5.0 volts
Endpoint 0: Type=CTL Class=03 SubClass=00 Protocol=00 MaxPacket=8
Endpoint 1 IN: Type=INT Class=03 SubClass=00 Protocol=00 MaxPacket=8
Hardware ID: USB\Vid_16c0&Pid_05df&Rev_0100
and
Code: Select all
Device Type: Mouse
Hardware ID: HID\Vid_16c0&Pid_05df&Rev_0100
But
Code: Select all
hidtool.exe read
error finding DataStore: The specified device was not found
what I do wrong?