Browse Source

DUE USB composite device field corrections (#14185)

Bob Kuhn 5 years ago
parent
commit
688b54d66a

+ 6
- 6
Marlin/src/HAL/HAL_DUE/usb/udi_composite_desc.c View File

@@ -67,9 +67,9 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
67 67
   .bLength                   = sizeof(usb_dev_desc_t),
68 68
   .bDescriptorType           = USB_DT_DEVICE,
69 69
   .bcdUSB                    = LE16(USB_V2_0),
70
-  .bDeviceClass              = 0,
71
-  .bDeviceSubClass           = 0,
72
-  .bDeviceProtocol           = 0,
70
+  .bDeviceClass              = CDC_CLASS_MULTI,
71
+  .bDeviceSubClass           = CDC_SUBCLASS_ACM,
72
+  .bDeviceProtocol           = CDC_PROTOCOL_V25TER,
73 73
   .bMaxPacketSize0           = USB_DEVICE_EP_CTRL_SIZE,
74 74
   .idVendor                  = LE16(USB_DEVICE_VENDOR_ID),
75 75
   .idProduct                 = LE16(USB_DEVICE_PRODUCT_ID),
@@ -101,9 +101,9 @@ UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual = {
101 101
   .bLength                   = sizeof(usb_dev_qual_desc_t),
102 102
   .bDescriptorType           = USB_DT_DEVICE_QUALIFIER,
103 103
   .bcdUSB                    = LE16(USB_V2_0),
104
-  .bDeviceClass              = 0,
105
-  .bDeviceSubClass           = 0,
106
-  .bDeviceProtocol           = 0,
104
+  .bDeviceClass              = CDC_CLASS_MULTI,
105
+  .bDeviceSubClass           = CDC_SUBCLASS_ACM,
106
+  .bDeviceProtocol           = CDC_PROTOCOL_V25TER,
107 107
   .bMaxPacketSize0           = USB_DEVICE_EP_CTRL_SIZE,
108 108
   .bNumConfigurations        = 1
109 109
 };

+ 2
- 0
Marlin/src/HAL/HAL_DUE/usb/usb_protocol_cdc.h View File

@@ -61,6 +61,8 @@
61 61
 #define  CDC_CLASS_DEVICE     0x02	//!< USB Communication Device Class
62 62
 #define  CDC_CLASS_COMM       0x02	//!< CDC Communication Class Interface
63 63
 #define  CDC_CLASS_DATA       0x0A	//!< CDC Data Class Interface
64
+#define  CDC_CLASS_MULTI      0xEF      //!< CDC Multi-interface Function
65
+
64 66
 //@}
65 67
 
66 68
 //! \name USB CDC Subclass IDs

Loading…
Cancel
Save