0x75, 0x08, /* Report Size (8) */\r
0x95, 0x02, /* Report Count (2) */\r
0x81, 0x82, /* Input (Data, Variable, Absolute, Volatile) */\r
- 0x05, 0x09, /* Usage Page (Button) */\r
- 0x09, 0x02, /* Usage (Button 2) */\r
- 0x09, 0x01, /* Usage (Button 1) */\r
- 0x15, 0x00, /* Logical Minimum (0) */\r
- 0x25, 0x01, /* Logical Maximum (1) */\r
- 0x75, 0x01, /* Report Size (1) */\r
- 0x95, 0x02, /* Report Count (2) */\r
- 0x81, 0x02, /* Input (Data, Variable, Absolute) */\r
- 0x75, 0x06, /* Report Size (6) */\r
- 0x95, 0x01, /* Report Count (1) */\r
- 0x81, 0x01, /* Input (Constant) */\r
0xc0, /* End Collection */\r
+ 0x05, 0x09, /* Usage Page (Button) */\r
+ 0x09, 0x02, /* Usage (Button 2) */\r
+ 0x09, 0x01, /* Usage (Button 1) */\r
+ 0x15, 0x00, /* Logical Minimum (0) */\r
+ 0x25, 0x01, /* Logical Maximum (1) */\r
+ 0x75, 0x01, /* Report Size (1) */\r
+ 0x95, 0x02, /* Report Count (2) */\r
+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */\r
+ 0x75, 0x06, /* Report Size (6) */\r
+ 0x95, 0x01, /* Report Count (1) */\r
+ 0x81, 0x01, /* Input (Constant) */\r
0xc0 /* End Collection */\r
};\r
\r
.Class = 0x00,\r
.SubClass = 0x00,\r
.Protocol = 0x00,\r
- \r
+ \r
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,\r
\r
.VendorID = 0x03EB,\r
.ProductStrIndex = 0x02,\r
.SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- .NumberOfConfigurations = 1\r
+ .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
\r
.Class = 0x03,\r
.SubClass = 0x00,\r
- .Protocol = 0x00,\r
+ .Protocol = HID_NON_BOOT_PROTOCOL,\r
\r
.InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
.JoystickHID = \r
{\r
- .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
- \r
+ .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
+ \r
.HIDSpec = VERSION_BCD(01.11),\r
.CountryCode = 0x00,\r
.TotalReportDescriptors = 1,\r
.JoystickEndpoint = \r
{\r
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
- \r
+ \r
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | JOYSTICK_EPNUM),\r
- .Attributes = EP_TYPE_INTERRUPT,\r
+ .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
.EndpointSize = JOYSTICK_EPSIZE,\r
- .PollingIntervalMS = 0x02\r
+ .PollingIntervalMS = 0x0A\r
} \r
};\r
\r
break;\r
case DTYPE_HID: \r
Address = (void*)&ConfigurationDescriptor.JoystickHID;\r
- Size = sizeof(USB_Descriptor_HID_t);\r
+ Size = sizeof(USB_HID_Descriptor_t);\r
break;\r
case DTYPE_Report: \r
Address = (void*)&JoystickReport;\r