remove VIM swap file, and add it to .gitignore
[rapper.git] / new_cmsis / usb / usbcfg.h
1 /*----------------------------------------------------------------------------\r
2  *      U S B  -  K e r n e l\r
3  *----------------------------------------------------------------------------\r
4  * Name:    usbcfg.h\r
5  * Purpose: USB Custom Configuration\r
6  * Version: V1.20\r
7  *----------------------------------------------------------------------------\r
8  *      This software is supplied "AS IS" without any warranties, express,\r
9  *      implied or statutory, including but not limited to the implied\r
10  *      warranties of fitness for purpose, satisfactory quality and\r
11  *      noninfringement. Keil extends you a royalty-free right to reproduce\r
12  *      and distribute executable files created using this software for use\r
13  *      on NXP Semiconductors LPC family microcontroller devices only. Nothing \r
14  *      else gives you the right to use this software.\r
15  *\r
16  * Copyright (c) 2009 Keil - An ARM Company. All rights reserved.\r
17  *----------------------------------------------------------------------------\r
18  * History:\r
19  *          V1.20 Added vendor specific support\r
20  *          V1.00 Initial Version\r
21  *---------------------------------------------------------------------------*/\r
22 \r
23 #ifndef __USBCFG_H__\r
24 #define __USBCFG_H__\r
25 \r
26 \r
27 //*** <<< Use Configuration Wizard in Context Menu >>> ***\r
28 \r
29 \r
30 /*\r
31 // <h> USB Configuration\r
32 //   <o0> USB Power\r
33 //        <i> Default Power Setting\r
34 //        <0=> Bus-powered\r
35 //        <1=> Self-powered\r
36 //   <o1> Max Number of Interfaces <1-256>\r
37 //   <o2> Max Number of Endpoints  <1-32>\r
38 //   <o3> Max Endpoint 0 Packet Size\r
39 //        <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes\r
40 //   <e4> DMA Transfer\r
41 //     <i> Use DMA for selected Endpoints\r
42 //     <o5.0>  Endpoint 0 Out\r
43 //     <o5.1>  Endpoint 0 In\r
44 //     <o5.2>  Endpoint 1 Out\r
45 //     <o5.3>  Endpoint 1 In\r
46 //     <o5.4>  Endpoint 2 Out\r
47 //     <o5.5>  Endpoint 2 In\r
48 //     <o5.6>  Endpoint 3 Out\r
49 //     <o5.7>  Endpoint 3 In\r
50 //     <o5.8>  Endpoint 4 Out\r
51 //     <o5.9>  Endpoint 4 In\r
52 //     <o5.10> Endpoint 5 Out\r
53 //     <o5.11> Endpoint 5 In\r
54 //     <o5.12> Endpoint 6 Out\r
55 //     <o5.13> Endpoint 6 In\r
56 //     <o5.14> Endpoint 7 Out\r
57 //     <o5.15> Endpoint 7 In\r
58 //     <o5.16> Endpoint 8 Out\r
59 //     <o5.17> Endpoint 8 In\r
60 //     <o5.18> Endpoint 9 Out\r
61 //     <o5.19> Endpoint 9 In\r
62 //     <o5.20> Endpoint 10 Out\r
63 //     <o5.21> Endpoint 10 In\r
64 //     <o5.22> Endpoint 11 Out\r
65 //     <o5.23> Endpoint 11 In\r
66 //     <o5.24> Endpoint 12 Out\r
67 //     <o5.25> Endpoint 12 In\r
68 //     <o5.26> Endpoint 13 Out\r
69 //     <o5.27> Endpoint 13 In\r
70 //     <o5.28> Endpoint 14 Out\r
71 //     <o5.29> Endpoint 14 In\r
72 //     <o5.30> Endpoint 15 Out\r
73 //     <o5.31> Endpoint 15 In\r
74 //   </e>\r
75 // </h>\r
76 */\r
77 \r
78 #define USB_POWER           0\r
79 #define USB_IF_NUM          4\r
80 #define USB_EP_NUM          32\r
81 #define USB_MAX_PACKET0     8\r
82 #define USB_DMA             0\r
83 #define USB_DMA_EP          0x00000000\r
84 \r
85 \r
86 /*\r
87 // <h> USB Event Handlers\r
88 //   <h> Device Events\r
89 //     <o0.0> Power Event\r
90 //     <o1.0> Reset Event\r
91 //     <o2.0> Suspend Event\r
92 //     <o3.0> Resume Event\r
93 //     <o4.0> Remote Wakeup Event\r
94 //     <o5.0> Start of Frame Event\r
95 //     <o6.0> Error Event\r
96 //   </h>\r
97 //   <h> Endpoint Events\r
98 //     <o7.0>  Endpoint 0 Event\r
99 //     <o7.1>  Endpoint 1 Event\r
100 //     <o7.2>  Endpoint 2 Event\r
101 //     <o7.3>  Endpoint 3 Event\r
102 //     <o7.4>  Endpoint 4 Event\r
103 //     <o7.5>  Endpoint 5 Event\r
104 //     <o7.6>  Endpoint 6 Event\r
105 //     <o7.7>  Endpoint 7 Event\r
106 //     <o7.8>  Endpoint 8 Event\r
107 //     <o7.9>  Endpoint 9 Event\r
108 //     <o7.10> Endpoint 10 Event\r
109 //     <o7.11> Endpoint 11 Event\r
110 //     <o7.12> Endpoint 12 Event\r
111 //     <o7.13> Endpoint 13 Event\r
112 //     <o7.14> Endpoint 14 Event\r
113 //     <o7.15> Endpoint 15 Event\r
114 //   </h>\r
115 //   <h> USB Core Events\r
116 //     <o8.0>  Set Configuration Event\r
117 //     <o9.0>  Set Interface Event\r
118 //     <o10.0> Set/Clear Feature Event\r
119 //   </h>\r
120 // </h>\r
121 */\r
122 \r
123 #define USB_POWER_EVENT     0\r
124 #define USB_RESET_EVENT     1\r
125 #define USB_SUSPEND_EVENT   0\r
126 #define USB_RESUME_EVENT    0\r
127 #define USB_WAKEUP_EVENT    0\r
128 #define USB_SOF_EVENT       0\r
129 #define USB_ERROR_EVENT     0\r
130 #define USB_EP_EVENT        0x0007\r
131 #define USB_CONFIGURE_EVENT 1\r
132 #define USB_INTERFACE_EVENT 0\r
133 #define USB_FEATURE_EVENT   0\r
134 \r
135 \r
136 /*\r
137 // <e0> USB Class Support\r
138 //   <i> enables USB Class specific Requests\r
139 //   <e1> Human Interface Device (HID)\r
140 //     <o2> Interface Number <0-255>\r
141 //   </e>\r
142 //   <e3> Mass Storage\r
143 //     <o4> Interface Number <0-255>\r
144 //   </e>\r
145 //   <e5> Audio Device\r
146 //     <o6> Control Interface Number <0-255>\r
147 //     <o7> Streaming Interface 1 Number <0-255>\r
148 //     <o8> Streaming Interface 2 Number <0-255>\r
149 //   </e>\r
150 //   <e9> Communication Device\r
151 //     <o10> Control Interface Number <0-255>\r
152 //     <o11> Bulk Interface Number <0-255>\r
153 //     <o12> Max Communication Device Buffer Size\r
154 //        <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes \r
155 //   </e>\r
156 // </e>\r
157 */\r
158 \r
159 #define USB_CLASS           1\r
160 #define USB_HID             0\r
161 #define USB_HID_IF_NUM      0\r
162 #define USB_MSC             0\r
163 #define USB_MSC_IF_NUM      0\r
164 #define USB_AUDIO           0\r
165 #define USB_ADC_CIF_NUM     0\r
166 #define USB_ADC_SIF1_NUM    1\r
167 #define USB_ADC_SIF2_NUM    2\r
168 #define USB_CDC                         1\r
169 #define USB_CDC_CIF_NUM     0\r
170 #define USB_CDC_DIF_NUM     1\r
171 #define USB_CDC_BUFSIZE     64\r
172 \r
173 /*\r
174 // <e0> USB Vendor Support\r
175 //   <i> enables USB Vendor specific Requests\r
176 // </e>\r
177 */\r
178 #define USB_VENDOR          0\r
179 \r
180 \r
181 #endif  /* __USBCFG_H__ */\r