@@ -67,12 +67,32 @@ const u8 STRING_MANUFACTURER[] PROGMEM = USB_MANUFACTURER;
67
67
68
68
#define DEVICE_CLASS 0x02
69
69
70
+ // edit by NicoHood
71
+ // added new definitions for correct USB descriptors
72
+ // there are even more, these are the ones we need
73
+ #define USB_DEVICE_CLASS_IAD 0xEF
74
+ #define USB_DEVICE_SUB_CLASS_IAD 0x02
75
+ #define USB_DEVICE_PROTOCOL_IAD 0x01
76
+
77
+ #define USB_DEVICE_CDC_CLASS 0x02
78
+ #define USB_DEVICE_CDC_SUB_CLASS 0x00
79
+ #define USB_DEVICE_CDC_PROTOCOL 0x00 // NoSpecific Protocol
80
+
81
+ #define USB_DEVICE_NO_CLASS 0x00
82
+ #define USB_DEVICE_NO_SUB_CLASS 0x00
83
+ #define USB_DEVICE_NO_PROTOCOL 0x00
84
+
85
+ #define USB_CONFIG_POWERED_MASK 0x40
86
+ #define USB_CONFIG_BUS_POWERED 0x80
87
+ #define USB_CONFIG_SELF_POWERED 0xC0
88
+ #define USB_CONFIG_REMOTE_WAKEUP 0x20
89
+
70
90
// DEVICE DESCRIPTOR
71
91
const DeviceDescriptor USB_DeviceDescriptor =
72
- D_DEVICE (0x00 , 0x00 , 0x00 ,64 ,USB_VID,USB_PID,0x100 ,IMANUFACTURER,IPRODUCT,0 ,1 );
92
+ D_DEVICE (USB_DEVICE_CLASS_IAD, USB_DEVICE_SUB_CLASS_IAD, USB_DEVICE_PROTOCOL_IAD ,64 ,USB_VID,USB_PID,0x100 ,IMANUFACTURER,IPRODUCT,0 ,1 );
73
93
74
94
const DeviceDescriptor USB_DeviceDescriptorB =
75
- D_DEVICE (0xEF , 0x02 , 0x01 ,64 ,USB_VID,USB_PID,0x100 ,IMANUFACTURER,IPRODUCT,0 ,1 );
95
+ D_DEVICE (USB_DEVICE_NO_CLASS, USB_DEVICE_NO_SUB_CLASS, USB_DEVICE_NO_PROTOCOL ,64 ,USB_VID,USB_PID,0x100 ,IMANUFACTURER,IPRODUCT,0 ,1 );
76
96
77
97
// ==================================================================
78
98
// ==================================================================
0 commit comments