udi_cdc_conf.h
Go to the documentation of this file.
1 
33 /*
34  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
35  */
36 
37 #ifndef _UDI_CDC_CONF_H_
38 #define _UDI_CDC_CONF_H_
39 
40 #include "usb_protocol_cdc.h"
41 #include "conf_usb.h"
42 
43 #ifndef UDI_CDC_PORT_NB
44 # define UDI_CDC_PORT_NB 1
45 #endif
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
56 #define USB_DEVICE_EP_CTRL_SIZE 64
58 
59 #if XMEGA
60 
66 #define UDI_CDC_DATA_EP_IN_0 ( 1 | USB_EP_DIR_IN) // TX
67 #define UDI_CDC_DATA_EP_OUT_0 ( 2 | USB_EP_DIR_OUT) // RX
68 #define UDI_CDC_COMM_EP_0 ( 2 | USB_EP_DIR_IN) // Notify endpoint
69 #define UDI_CDC_DATA_EP_IN_1 ( 3 | USB_EP_DIR_IN) // TX
70 #define UDI_CDC_DATA_EP_OUT_1 ( 4 | USB_EP_DIR_OUT) // RX
71 #define UDI_CDC_COMM_EP_1 ( 4 | USB_EP_DIR_IN) // Notify endpoint
72 #define UDI_CDC_DATA_EP_IN_2 ( 5 | USB_EP_DIR_IN) // TX
73 #define UDI_CDC_DATA_EP_OUT_2 ( 6 | USB_EP_DIR_OUT) // RX
74 #define UDI_CDC_COMM_EP_2 ( 6 | USB_EP_DIR_IN) // Notify endpoint
75 #define UDI_CDC_DATA_EP_IN_3 ( 7 | USB_EP_DIR_IN) // TX
76 #define UDI_CDC_DATA_EP_OUT_3 ( 8 | USB_EP_DIR_OUT) // RX
77 #define UDI_CDC_COMM_EP_3 ( 8 | USB_EP_DIR_IN) // Notify endpoint
78 #define UDI_CDC_DATA_EP_IN_4 ( 9 | USB_EP_DIR_IN) // TX
79 #define UDI_CDC_DATA_EP_OUT_4 (10 | USB_EP_DIR_OUT) // RX
80 #define UDI_CDC_COMM_EP_4 (10 | USB_EP_DIR_IN) // Notify endpoint
81 #define UDI_CDC_DATA_EP_IN_5 (11 | USB_EP_DIR_IN) // TX
82 #define UDI_CDC_DATA_EP_OUT_5 (12 | USB_EP_DIR_OUT) // RX
83 #define UDI_CDC_COMM_EP_5 (12 | USB_EP_DIR_IN) // Notify endpoint
84 #define UDI_CDC_DATA_EP_IN_6 (13 | USB_EP_DIR_IN) // TX
85 #define UDI_CDC_DATA_EP_OUT_6 (14 | USB_EP_DIR_OUT) // RX
86 #define UDI_CDC_COMM_EP_6 (14 | USB_EP_DIR_IN) // Notify endpoint
87 #define USB_DEVICE_MAX_EP (2*UDI_CDC_PORT_NB)
89 
90 
91 #else
92 
98 # if UDI_CDC_PORT_NB > 2
99 # error USBB, UDP, UDPHS and UOTGHS interfaces have not enought endpoints.
100 # endif
101 #define UDI_CDC_DATA_EP_IN_0 (1 | USB_EP_DIR_IN) // TX
102 #define UDI_CDC_DATA_EP_OUT_0 (2 | USB_EP_DIR_OUT) // RX
103 #define UDI_CDC_COMM_EP_0 (3 | USB_EP_DIR_IN) // Notify endpoint
104 # if SAM3U
105  /* For 3U max endpoint size of 4 is 64, use 5 and 6 as bulk tx and rx */
106 # define UDI_CDC_DATA_EP_IN_1 (6 | USB_EP_DIR_IN) // TX
107 # define UDI_CDC_DATA_EP_OUT_1 (5 | USB_EP_DIR_OUT) // RX
108 # define UDI_CDC_COMM_EP_1 (4 | USB_EP_DIR_IN) // Notify
109 # else
110 # define UDI_CDC_DATA_EP_IN_1 (4 | USB_EP_DIR_IN) // TX
111 # define UDI_CDC_DATA_EP_OUT_1 (5 | USB_EP_DIR_OUT) // RX
112 # define UDI_CDC_COMM_EP_1 (6 | USB_EP_DIR_IN) // Notify
113 # endif
114 #undef USB_DEVICE_MAX_EP // undefine this definition in header file
116 #define USB_DEVICE_MAX_EP (3*UDI_CDC_PORT_NB)
117 
118 
119 #endif
120 
125 #define UDI_CDC_COMM_IFACE_NUMBER_0 0
126 #define UDI_CDC_DATA_IFACE_NUMBER_0 1
127 #define UDI_CDC_COMM_IFACE_NUMBER_1 2
128 #define UDI_CDC_DATA_IFACE_NUMBER_1 3
129 #define UDI_CDC_COMM_IFACE_NUMBER_2 4
130 #define UDI_CDC_DATA_IFACE_NUMBER_2 5
131 #define UDI_CDC_COMM_IFACE_NUMBER_3 6
132 #define UDI_CDC_DATA_IFACE_NUMBER_3 7
133 #define UDI_CDC_COMM_IFACE_NUMBER_4 8
134 #define UDI_CDC_DATA_IFACE_NUMBER_4 9
135 #define UDI_CDC_COMM_IFACE_NUMBER_5 10
136 #define UDI_CDC_DATA_IFACE_NUMBER_5 11
137 #define UDI_CDC_COMM_IFACE_NUMBER_6 12
138 #define UDI_CDC_DATA_IFACE_NUMBER_6 13
139 
140 
142 
143 #ifdef __cplusplus
144 }
145 #endif
146 #endif // _UDI_CDC_CONF_H_
USB configuration file for CDC application.
USB Communication Device Class (CDC) protocol definitions.


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:05