Skip to content

Commit 8313546

Browse files
committed
[USB] Document IAD descriptor values
Using documentation from "USB Class Definitions for Communication Devices" version 1.1 and https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-interface-association-descriptor
1 parent f11c80a commit 8313546

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

teensy4/usb_desc.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -683,12 +683,12 @@ PROGMEM const uint8_t usb_config_descriptor_480[CONFIG_DESC_SIZE] = {
683683
#ifdef CDC_IAD_DESCRIPTOR
684684
// interface association descriptor, USB ECN, Table 9-Z
685685
8, // bLength
686-
11, // bDescriptorType
686+
11, // bDescriptorType (11=IAD)
687687
CDC_STATUS_INTERFACE, // bFirstInterface
688688
2, // bInterfaceCount
689-
0x02, // bFunctionClass
690-
0x02, // bFunctionSubClass
691-
0x01, // bFunctionProtocol
689+
0x02, // bFunctionClass (matches bInterfaceClass below)
690+
0x02, // bFunctionSubClass (matches bInterfaceSubClass below)
691+
0x01, // bFunctionProtocol (matches bFunctionProtocol below)
692692
0, // iFunction
693693
#endif
694694

@@ -700,9 +700,9 @@ PROGMEM const uint8_t usb_config_descriptor_480[CONFIG_DESC_SIZE] = {
700700
CDC_STATUS_INTERFACE, // bInterfaceNumber
701701
0, // bAlternateSetting
702702
1, // bNumEndpoints
703-
0x02, // bInterfaceClass
704-
0x02, // bInterfaceSubClass
705-
0x01, // bInterfaceProtocol
703+
0x02, // bInterfaceClass (2=Communication Device)
704+
0x02, // bInterfaceSubClass (2=Abstract Control Mode)
705+
0x01, // bInterfaceProtocol (1=Common AT commands, Hayes compatible, USB serial device)
706706
0, // iInterface
707707
// CDC Header Functional Descriptor, CDC Spec 5.2.3.1, Table 26
708708
5, // bFunctionLength
@@ -1697,12 +1697,12 @@ PROGMEM const uint8_t usb_config_descriptor_12[CONFIG_DESC_SIZE] = {
16971697
#ifdef CDC_IAD_DESCRIPTOR
16981698
// interface association descriptor, USB ECN, Table 9-Z
16991699
8, // bLength
1700-
11, // bDescriptorType
1700+
11, // bDescriptorType (11=IAD)
17011701
CDC_STATUS_INTERFACE, // bFirstInterface
17021702
2, // bInterfaceCount
1703-
0x02, // bFunctionClass
1704-
0x02, // bFunctionSubClass
1705-
0x01, // bFunctionProtocol
1703+
0x02, // bFunctionClass (matches bInterfaceClass below)
1704+
0x02, // bFunctionSubClass (matches bInterfaceSubClass below)
1705+
0x01, // bFunctionProtocol (matches bFunctionProtocol below)
17061706
0, // iFunction
17071707
#endif
17081708

@@ -1714,9 +1714,9 @@ PROGMEM const uint8_t usb_config_descriptor_12[CONFIG_DESC_SIZE] = {
17141714
CDC_STATUS_INTERFACE, // bInterfaceNumber
17151715
0, // bAlternateSetting
17161716
1, // bNumEndpoints
1717-
0x02, // bInterfaceClass
1718-
0x02, // bInterfaceSubClass
1719-
0x01, // bInterfaceProtocol
1717+
0x02, // bInterfaceClass (2=Communication Device)
1718+
0x02, // bInterfaceSubClass (2=Abstract Control Mode)
1719+
0x01, // bInterfaceProtocol (1=Common AT commands, Hayes compatible, USB serial device)
17201720
0, // iInterface
17211721
// CDC Header Functional Descriptor, CDC Spec 5.2.3.1, Table 26
17221722
5, // bFunctionLength

0 commit comments

Comments
 (0)