File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 37
37
// so define these before #include'ing that file.
38
38
#define USB_CDC_EP_NUM_NOTIFICATION (3)
39
39
#define USB_CDC_EP_NUM_DATA_OUT (2)
40
- #define USB_CDC_EP_NUM_DATA_IN (2 )
40
+ #define USB_CDC_EP_NUM_DATA_IN (1 )
41
41
#define USB_MSC_EP_NUM_OUT (5)
42
42
#define USB_MSC_EP_NUM_IN (4)
43
43
Original file line number Diff line number Diff line change @@ -63,7 +63,11 @@ static const uint8_t usb_msc_descriptor_template[] = {
63
63
0xFF , // 11 bEndpointAddress (IN/D2H) [SET AT RUNTIME: 0x80 | number]
64
64
#define MSC_IN_ENDPOINT_INDEX (11 )
65
65
0x02 , // 12 bmAttributes (Bulk)
66
+ #if USB_HIGHSPEED
67
+ 0x00 , 0x02 , // 13,14 wMaxPacketSize 512
68
+ #else
66
69
0x40 , 0x00 , // 13,14 wMaxPacketSize 64
70
+ #endif
67
71
0x00 , // 15 bInterval 0 (unit depends on device speed)
68
72
69
73
// MSC Endpoint OUT Descriptor
@@ -72,7 +76,11 @@ static const uint8_t usb_msc_descriptor_template[] = {
72
76
0xFF , // 18 bEndpointAddress (OUT/H2D) [SET AT RUNTIME]
73
77
#define MSC_OUT_ENDPOINT_INDEX (18 )
74
78
0x02 , // 19 bmAttributes (Bulk)
79
+ #if USB_HIGHSPEED
80
+ 0x00 , 0x02 , // 20,21 wMaxPacketSize 512
81
+ #else
75
82
0x40 , 0x00 , // 20,21 wMaxPacketSize 64
83
+ #endif
76
84
0x00 , // 22 bInterval 0 (unit depends on device speed)
77
85
};
78
86
Original file line number Diff line number Diff line change @@ -121,7 +121,11 @@ static const uint8_t usb_cdc_descriptor_template[] = {
121
121
0xFF , // 54 bEndpointAddress (OUT/H2D) [SET AT RUNTIME]
122
122
#define CDC_DATA_OUT_ENDPOINT_INDEX 54
123
123
0x02 , // 55 bmAttributes (Bulk)
124
+ #if USB_HIGHSPEED
125
+ 0x00 , 0x02 , // 56,57 wMaxPacketSize 512
126
+ #else
124
127
0x40 , 0x00 , // 56,57 wMaxPacketSize 64
128
+ #endif
125
129
0x00 , // 58 bInterval 0 (unit depends on device speed)
126
130
127
131
// CDC Data IN Endpoint Descriptor
@@ -130,7 +134,11 @@ static const uint8_t usb_cdc_descriptor_template[] = {
130
134
0xFF , // 61 bEndpointAddress (IN/D2H) [SET AT RUNTIME: 0x80 | number]
131
135
#define CDC_DATA_IN_ENDPOINT_INDEX 61
132
136
0x02 , // 62 bmAttributes (Bulk)
137
+ #if USB_HIGHSPEED
138
+ 0x00 , 0x02 , // 63,64 wMaxPacketSize 512
139
+ #else
133
140
0x40 , 0x00 , // 63,64 wMaxPacketSize 64
141
+ #endif
134
142
0x00 , // 65 bInterval 0 (unit depends on device speed)
135
143
};
136
144
You can’t perform that action at this time.
0 commit comments