-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathusb_desc.h.diff
More file actions
75 lines (71 loc) · 3.03 KB
/
usb_desc.h.diff
File metadata and controls
75 lines (71 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
--- packages/framework-arduinoteensy/cores/teensy4/usb_desc.h 2023-12-11 17:38:41.575512487 +0800
+++ packages/framework-arduinoteensy/cores/teensy4/usb_desc.h 2023-12-11 17:51:01.544054165 +0800
@@ -111,7 +111,8 @@
*/
-#if defined(USB_SERIAL)
+#if defined(USB_SERIAL) && FALSE
+OMG!!!
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0483
#define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
@@ -949,6 +950,62 @@
#define ENDPOINT14_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT15_CONFIG ENDPOINT_TRANSMIT_ONLY
+#elif defined(USB_RAWHID_TRIPLESERIAL)
+ #define VENDOR_ID 0x16C0
+ #define PRODUCT_ID 0x048C
+ #define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
+ #define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
+ #define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
+ #define MANUFACTURER_NAME_LEN 11
+ #define PRODUCT_NAME {'T','r','i','p','l','e',' ','S','e','r','i','a','l'}
+ #define PRODUCT_NAME_LEN 13
+ #define EP0_SIZE 64
+ #define NUM_ENDPOINTS 9
+ #define NUM_INTERFACE 7
+
+ #define CDC_IAD_DESCRIPTOR 1 // Serial
+ #define CDC_STATUS_INTERFACE 0
+ #define CDC_DATA_INTERFACE 1
+ #define CDC_ACM_ENDPOINT 2
+ #define CDC_RX_ENDPOINT 3
+ #define CDC_TX_ENDPOINT 3
+ #define CDC_ACM_SIZE 16
+ #define CDC_RX_SIZE_480 512
+ #define CDC_TX_SIZE_480 512
+ #define CDC_RX_SIZE_12 64
+ #define CDC_TX_SIZE_12 64
+ #define SEREMU_TX_SIZE 64
+
+ #define CDC2_STATUS_INTERFACE 2 // SerialUSB1
+ #define CDC2_DATA_INTERFACE 3
+ #define CDC2_ACM_ENDPOINT 4
+ #define CDC2_RX_ENDPOINT 5
+ #define CDC2_TX_ENDPOINT 5
+
+ #define CDC3_STATUS_INTERFACE 4 // SerialUSB2
+ #define CDC3_DATA_INTERFACE 5
+ #define CDC3_ACM_ENDPOINT 6
+ #define CDC3_RX_ENDPOINT 7
+ #define CDC3_TX_ENDPOINT 7
+
+ #define RAWHID_INTERFACE 6 // RawHID
+ #define RAWHID_TX_ENDPOINT 8
+ #define RAWHID_TX_SIZE 64
+ #define RAWHID_TX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
+ #define RAWHID_RX_ENDPOINT 9
+ #define RAWHID_RX_SIZE 64
+ #define RAWHID_RX_INTERVAL 1 // TODO: is this ok for 480 Mbit speed
+
+ #define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
+ #define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
+ #define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
+ #define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
+ #define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
+ #define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
+/* for raw hid */
+ #define ENDPOINT8_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
+ #define ENDPOINT9_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_UNUSED
+
#endif
#ifdef USB_DESC_LIST_DEFINE