Update tmk_core/protocol/usb_descriptor.c

Co-Authored-By: Ryan <fauxpark@gmail.com>
This commit is contained in:
a-chol 2020-03-22 11:09:21 +01:00 committed by a-chol
parent a8a2825bd4
commit 86853a4110

View File

@ -874,42 +874,40 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = {
* Joystick * Joystick
*/ */
#ifdef JOYSTICK_ENABLE #ifdef JOYSTICK_ENABLE
.Joystick_Interface = .Joystick_Interface = {
{ .Header = {
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, .Size = sizeof(USB_Descriptor_Interface_t),
.Type = DTYPE_Interface
.InterfaceNumber = JOYSTICK_INTERFACE,
.AlternateSetting = 0x00,
.TotalEndpoints = 1,
.Class = HID_CSCP_HIDClass,
.SubClass = HID_CSCP_NonBootSubclass,
.Protocol = HID_CSCP_NonBootProtocol,
.InterfaceStrIndex = NO_DESCRIPTOR
}, },
.InterfaceNumber = JOYSTICK_INTERFACE,
.Joystick_HID = .AlternateSetting = 0x00,
{ .TotalEndpoints = 1,
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .Class = HID_CSCP_HIDClass,
.SubClass = HID_CSCP_NonBootSubclass,
.HIDSpec = VERSION_BCD(1,1,1), .Protocol = HID_CSCP_NonBootProtocol,
.CountryCode = 0x00, .InterfaceStrIndex = NO_DESCRIPTOR
.TotalReportDescriptors = 1, },
.HIDReportType = HID_DTYPE_Report, .Joystick_HID = {
.HIDReportLength = sizeof(JoystickReport) .Header = {
.Size = sizeof(USB_HID_Descriptor_HID_t),
.Type = HID_DTYPE_HID
}, },
.HIDSpec = VERSION_BCD(1, 1, 1),
.Joystick_INEndpoint = .CountryCode = 0x00,
{ .TotalReportDescriptors = 1,
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, .HIDReportType = HID_DTYPE_Report,
.HIDReportLength = sizeof(JoystickReport)
.EndpointAddress = (ENDPOINT_DIR_IN | JOYSTICK_IN_EPNUM), },
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .Joystick_INEndpoint = {
.EndpointSize = JOYSTICK_EPSIZE, .Header = {
.PollingIntervalMS = USB_POLLING_INTERVAL_MS .Size = sizeof(USB_Descriptor_Endpoint_t),
.Type = DTYPE_Endpoint
}, },
.EndpointAddress = (ENDPOINT_DIR_IN | JOYSTICK_IN_EPNUM),
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = JOYSTICK_EPSIZE,
.PollingIntervalMS = USB_POLLING_INTERVAL_MS
}
#endif #endif
}; };