Skip to content

Commit 669d603

Browse files
committed
[USB] CDC Desc update Class/SubClass to 02
See https://www.usb.org/defined-class-codes Well documented for Win10: https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-driver-installation-based-on-compatible-ids * If you want to load Usbser.sys automatically, set the class code to 02 and subclass code to 02 in the Device Descriptor. For more information, see USB communications device class (or USB CDC) Specification found on the USB DWG website. With this approach, you are not required to distribute INF files for your device because the system uses Usbser.inf. * If your device specifies class code 02 but a subclass code value other than 02, Usbser.sys does not load automatically. Pnp Manager tries to find a driver. If a suitable driver is not found, the device might not have a driver loaded. In this case, you might have to load your own driver or write an INF that references another in-box driver. * If your device specifies class and subclass codes to 02, and you want to load another driver instead of Usbser.sys, you have to write an INF that specifies the hardware ID of the device and the driver to install. For examples, look through the INF files included with sample drivers and find devices similar to your device. For information about INF sections, see Overview of INF Files. Signed-off-by: Frederic.Pillon <[email protected]>
1 parent b417ed0 commit 669d603

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/arduino/stm32/usb/usbd_desc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ __ALIGN_BEGIN uint8_t USBD_CDC_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END = {
136136
USB_DESC_TYPE_DEVICE, /* bDescriptorType */
137137
0x00, /* bcdUSB */
138138
0x02,
139-
0x00, /* bDeviceClass */
140-
0x00, /* bDeviceSubClass */
139+
0x02, /* bDeviceClass */
140+
0x02, /* bDeviceSubClass */
141141
0x00, /* bDeviceProtocol */
142142
USB_MAX_EP0_SIZE, /* bMaxPacketSize */
143143
LOBYTE(USBD_VID), /* idVendor */

0 commit comments

Comments
 (0)