Bläddra i källkod

DUE USB composite device field corrections (#14185)

Bob Kuhn 6 år sedan
förälder
incheckning
688b54d66a

+ 6
- 6
Marlin/src/HAL/HAL_DUE/usb/udi_composite_desc.c Visa fil

67
   .bLength                   = sizeof(usb_dev_desc_t),
67
   .bLength                   = sizeof(usb_dev_desc_t),
68
   .bDescriptorType           = USB_DT_DEVICE,
68
   .bDescriptorType           = USB_DT_DEVICE,
69
   .bcdUSB                    = LE16(USB_V2_0),
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
   .bMaxPacketSize0           = USB_DEVICE_EP_CTRL_SIZE,
73
   .bMaxPacketSize0           = USB_DEVICE_EP_CTRL_SIZE,
74
   .idVendor                  = LE16(USB_DEVICE_VENDOR_ID),
74
   .idVendor                  = LE16(USB_DEVICE_VENDOR_ID),
75
   .idProduct                 = LE16(USB_DEVICE_PRODUCT_ID),
75
   .idProduct                 = LE16(USB_DEVICE_PRODUCT_ID),
101
   .bLength                   = sizeof(usb_dev_qual_desc_t),
101
   .bLength                   = sizeof(usb_dev_qual_desc_t),
102
   .bDescriptorType           = USB_DT_DEVICE_QUALIFIER,
102
   .bDescriptorType           = USB_DT_DEVICE_QUALIFIER,
103
   .bcdUSB                    = LE16(USB_V2_0),
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
   .bMaxPacketSize0           = USB_DEVICE_EP_CTRL_SIZE,
107
   .bMaxPacketSize0           = USB_DEVICE_EP_CTRL_SIZE,
108
   .bNumConfigurations        = 1
108
   .bNumConfigurations        = 1
109
 };
109
 };

+ 2
- 0
Marlin/src/HAL/HAL_DUE/usb/usb_protocol_cdc.h Visa fil

61
 #define  CDC_CLASS_DEVICE     0x02	//!< USB Communication Device Class
61
 #define  CDC_CLASS_DEVICE     0x02	//!< USB Communication Device Class
62
 #define  CDC_CLASS_COMM       0x02	//!< CDC Communication Class Interface
62
 #define  CDC_CLASS_COMM       0x02	//!< CDC Communication Class Interface
63
 #define  CDC_CLASS_DATA       0x0A	//!< CDC Data Class Interface
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
 //! \name USB CDC Subclass IDs
68
 //! \name USB CDC Subclass IDs

Laddar…
Avbryt
Spara