Skip to content

Commit 6b47af0

Browse files
committed
fl16: add interface association
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent d15f44a commit 6b47af0

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

tmk_core/protocol/usb_descriptor.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = {
462462
.SubClass = USB_CSCP_IADDeviceSubclass,
463463
.Protocol = USB_CSCP_IADDeviceProtocol,
464464
#else
465-
.Class = USB_CSCP_NoDeviceClass,
466-
.SubClass = USB_CSCP_NoDeviceSubclass,
467-
.Protocol = USB_CSCP_NoDeviceProtocol,
465+
.Class = 0xEF, // Miscellaneous // USB_CSCP_NoDeviceClass,
466+
.SubClass = 0x02, // USB_CSCP_NoDeviceSubclass,
467+
.Protocol = 0x01, // USB_CSCP_NoDeviceProtocol,
468468
#endif
469469

470470
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@@ -639,6 +639,18 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = {
639639
.ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_REMOTEWAKEUP),
640640
.MaxPowerConsumption = USB_CONFIG_POWER_MA(USB_MAX_POWER_CONSUMPTION)
641641
},
642+
.Keyboard_Interface_Association = {
643+
.Header = {
644+
.Size = sizeof(USB_Descriptor_Interface_Association_t),
645+
.Type = DTYPE_InterfaceAssociation
646+
},
647+
.FirstInterfaceIndex = KEYBOARD_INTERFACE,
648+
.TotalInterfaces = 4,
649+
.Class = HID_CSCP_HIDClass,
650+
.SubClass = HID_CSCP_BootSubclass,
651+
.Protocol = HID_CSCP_KeyboardBootProtocol,
652+
.IADStrIndex = NO_DESCRIPTOR,
653+
},
642654
#ifndef KEYBOARD_SHARED_EP
643655
/*
644656
* Keyboard

tmk_core/protocol/usb_descriptor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
*/
5858
typedef struct {
5959
USB_Descriptor_Configuration_Header_t Config;
60+
USB_Descriptor_Interface_Association_t Keyboard_Interface_Association;
6061

6162
#ifndef KEYBOARD_SHARED_EP
6263
// Keyboard HID Interface

0 commit comments

Comments
 (0)