Update tmk_core/protocol/usb_descriptor.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
This commit is contained in:
		
							parent
							
								
									a8a2825bd4
								
							
						
					
					
						commit
						86853a4110
					
				
					 1 changed files with 31 additions and 33 deletions
				
			
		| 
						 | 
					@ -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,
 | 
					        .InterfaceNumber        = JOYSTICK_INTERFACE,
 | 
				
			||||||
        .AlternateSetting       = 0x00,
 | 
					        .AlternateSetting       = 0x00,
 | 
				
			||||||
 | 
					 | 
				
			||||||
        .TotalEndpoints         = 1,
 | 
					        .TotalEndpoints         = 1,
 | 
				
			||||||
 | 
					 | 
				
			||||||
        .Class                  = HID_CSCP_HIDClass,
 | 
					        .Class                  = HID_CSCP_HIDClass,
 | 
				
			||||||
        .SubClass               = HID_CSCP_NonBootSubclass,
 | 
					        .SubClass               = HID_CSCP_NonBootSubclass,
 | 
				
			||||||
        .Protocol               = HID_CSCP_NonBootProtocol,
 | 
					        .Protocol               = HID_CSCP_NonBootProtocol,
 | 
				
			||||||
 | 
					 | 
				
			||||||
        .InterfaceStrIndex      = NO_DESCRIPTOR
 | 
					        .InterfaceStrIndex      = NO_DESCRIPTOR
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    .Joystick_HID = {
 | 
				
			||||||
    .Joystick_HID =
 | 
					        .Header = {
 | 
				
			||||||
        {
 | 
					            .Size               = sizeof(USB_HID_Descriptor_HID_t),
 | 
				
			||||||
            .Header                 = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID},
 | 
					            .Type               = HID_DTYPE_HID
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
            .HIDSpec                = VERSION_BCD(1,1,1),
 | 
					        .HIDSpec                = VERSION_BCD(1, 1, 1),
 | 
				
			||||||
        .CountryCode            = 0x00,
 | 
					        .CountryCode            = 0x00,
 | 
				
			||||||
        .TotalReportDescriptors = 1,
 | 
					        .TotalReportDescriptors = 1,
 | 
				
			||||||
        .HIDReportType          = HID_DTYPE_Report,
 | 
					        .HIDReportType          = HID_DTYPE_Report,
 | 
				
			||||||
        .HIDReportLength        = sizeof(JoystickReport)
 | 
					        .HIDReportLength        = sizeof(JoystickReport)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    .Joystick_INEndpoint = {
 | 
				
			||||||
    .Joystick_INEndpoint =
 | 
					        .Header = {
 | 
				
			||||||
        {
 | 
					            .Size               = sizeof(USB_Descriptor_Endpoint_t),
 | 
				
			||||||
            .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
 | 
					            .Type               = DTYPE_Endpoint
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        .EndpointAddress        = (ENDPOINT_DIR_IN | JOYSTICK_IN_EPNUM),
 | 
					        .EndpointAddress        = (ENDPOINT_DIR_IN | JOYSTICK_IN_EPNUM),
 | 
				
			||||||
        .Attributes             = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
 | 
					        .Attributes             = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
 | 
				
			||||||
        .EndpointSize           = JOYSTICK_EPSIZE,
 | 
					        .EndpointSize           = JOYSTICK_EPSIZE,
 | 
				
			||||||
        .PollingIntervalMS      = USB_POLLING_INTERVAL_MS
 | 
					        .PollingIntervalMS      = USB_POLLING_INTERVAL_MS
 | 
				
			||||||
        },
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue