Skip to content

Commit 971514d

Browse files
authored
Update USBCore.h
1 parent 4a71669 commit 971514d

File tree

1 file changed

+0
-107
lines changed

1 file changed

+0
-107
lines changed

cores/arduino/USBCore.h

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,6 @@
5353
#define REQUEST_HOSTTODEVICE_CLASS_INTERFACE (REQUEST_HOSTTODEVICE | REQUEST_CLASS | REQUEST_INTERFACE)
5454
#define REQUEST_DEVICETOHOST_STANDARD_INTERFACE (REQUEST_DEVICETOHOST | REQUEST_STANDARD | REQUEST_INTERFACE)
5555

56-
// Class requests
57-
58-
#define CDC_SET_LINE_CODING 0x20
59-
#define CDC_GET_LINE_CODING 0x21
60-
#define CDC_SET_CONTROL_LINE_STATE 0x22
61-
#define CDC_SEND_BREAK 0x23
62-
63-
#define MSC_RESET 0xFF
64-
#define MSC_GET_MAX_LUN 0xFE
65-
6656
// Descriptors
6757

6858
#define USB_DEVICE_DESC_SIZE 18
@@ -114,21 +104,6 @@
114104

115105
#define TOBYTES(x) ((x) & 0xFF),(((x) >> 8) & 0xFF)
116106

117-
#define CDC_V1_10 0x0110
118-
#define CDC_COMMUNICATION_INTERFACE_CLASS 0x02
119-
120-
#define CDC_CALL_MANAGEMENT 0x01
121-
#define CDC_ABSTRACT_CONTROL_MODEL 0x02
122-
#define CDC_HEADER 0x00
123-
#define CDC_ABSTRACT_CONTROL_MANAGEMENT 0x02
124-
#define CDC_UNION 0x06
125-
#define CDC_CS_INTERFACE 0x24
126-
#define CDC_CS_ENDPOINT 0x25
127-
#define CDC_DATA_INTERFACE_CLASS 0x0A
128-
129-
#define MSC_SUBCLASS_SCSI 0x06
130-
#define MSC_PROTOCOL_BULK_ONLY 0x50
131-
132107
#ifndef USB_VERSION
133108
#define USB_VERSION 0x200
134109
#endif
@@ -190,82 +165,6 @@ typedef struct
190165
u8 interval;
191166
} EndpointDescriptor;
192167

193-
// Interface Association Descriptor
194-
// Used to bind 2 interfaces together in CDC composite device
195-
typedef struct
196-
{
197-
u8 len; // 8
198-
u8 dtype; // 11
199-
u8 firstInterface;
200-
u8 interfaceCount;
201-
u8 functionClass;
202-
u8 funtionSubClass;
203-
u8 functionProtocol;
204-
u8 iInterface;
205-
} IADDescriptor;
206-
207-
// CDC CS interface descriptor
208-
typedef struct
209-
{
210-
u8 len; // 5
211-
u8 dtype; // 0x24
212-
u8 subtype;
213-
u8 d0;
214-
u8 d1;
215-
} CDCCSInterfaceDescriptor;
216-
217-
typedef struct
218-
{
219-
u8 len; // 4
220-
u8 dtype; // 0x24
221-
u8 subtype;
222-
u8 d0;
223-
} CDCCSInterfaceDescriptor4;
224-
225-
typedef struct
226-
{
227-
u8 len;
228-
u8 dtype; // 0x24
229-
u8 subtype; // 1
230-
u8 bmCapabilities;
231-
u8 bDataInterface;
232-
} CMFunctionalDescriptor;
233-
234-
typedef struct
235-
{
236-
u8 len;
237-
u8 dtype; // 0x24
238-
u8 subtype; // 1
239-
u8 bmCapabilities;
240-
} ACMFunctionalDescriptor;
241-
242-
typedef struct
243-
{
244-
// IAD
245-
IADDescriptor iad; // Only needed on compound device
246-
247-
// Control
248-
InterfaceDescriptor cif; //
249-
CDCCSInterfaceDescriptor header;
250-
CMFunctionalDescriptor callManagement; // Call Management
251-
ACMFunctionalDescriptor controlManagement; // ACM
252-
CDCCSInterfaceDescriptor functionalDescriptor; // CDC_UNION
253-
EndpointDescriptor cifin;
254-
255-
// Data
256-
InterfaceDescriptor dif;
257-
EndpointDescriptor in;
258-
EndpointDescriptor out;
259-
} CDCDescriptor;
260-
261-
typedef struct
262-
{
263-
InterfaceDescriptor msc;
264-
EndpointDescriptor in;
265-
EndpointDescriptor out;
266-
} MSCDescriptor;
267-
268-
269168
#define D_DEVICE(_class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs) \
270169
{ 18, 1, USB_VERSION, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
271170

@@ -278,12 +177,6 @@ typedef struct
278177
#define D_ENDPOINT(_addr,_attr,_packetSize, _interval) \
279178
{ 7, 5, _addr,_attr,_packetSize, _interval }
280179

281-
#define D_IAD(_firstInterface, _count, _class, _subClass, _protocol) \
282-
{ 8, 11, _firstInterface, _count, _class, _subClass, _protocol, 0 }
283-
284-
#define D_CDCCS(_subtype,_d0,_d1) { 5, 0x24, _subtype, _d0, _d1 }
285-
#define D_CDCCS4(_subtype,_d0) { 4, 0x24, _subtype, _d0 }
286-
287180
// Bootloader related fields
288181
// Old Caterina bootloader places the MAGIC key into unsafe RAM locations (it can be rewritten
289182
// by the running sketch before to actual reboot).

0 commit comments

Comments
 (0)