1 /*----------------------------------------------------------------------------
3 *----------------------------------------------------------------------------
5 * Purpose: USB Custom Configuration
7 *----------------------------------------------------------------------------
8 * This software is supplied "AS IS" without any warranties, express,
9 * implied or statutory, including but not limited to the implied
10 * warranties of fitness for purpose, satisfactory quality and
11 * noninfringement. Keil extends you a royalty-free right to reproduce
12 * and distribute executable files created using this software for use
13 * on NXP Semiconductors LPC family microcontroller devices only. Nothing
14 * else gives you the right to use this software.
16 * Copyright (c) 2009 Keil - An ARM Company. All rights reserved.
17 *----------------------------------------------------------------------------
19 * V1.20 Added vendor specific support
20 * V1.00 Initial Version
21 *---------------------------------------------------------------------------*/
27 //*** <<< Use Configuration Wizard in Context Menu >>> ***
31 // <h> USB Configuration
33 // <i> Default Power Setting
36 // <o1> Max Number of Interfaces <1-256>
37 // <o2> Max Number of Endpoints <1-32>
38 // <o3> Max Endpoint 0 Packet Size
39 // <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes
41 // <i> Use DMA for selected Endpoints
42 // <o5.0> Endpoint 0 Out
43 // <o5.1> Endpoint 0 In
44 // <o5.2> Endpoint 1 Out
45 // <o5.3> Endpoint 1 In
46 // <o5.4> Endpoint 2 Out
47 // <o5.5> Endpoint 2 In
48 // <o5.6> Endpoint 3 Out
49 // <o5.7> Endpoint 3 In
50 // <o5.8> Endpoint 4 Out
51 // <o5.9> Endpoint 4 In
52 // <o5.10> Endpoint 5 Out
53 // <o5.11> Endpoint 5 In
54 // <o5.12> Endpoint 6 Out
55 // <o5.13> Endpoint 6 In
56 // <o5.14> Endpoint 7 Out
57 // <o5.15> Endpoint 7 In
58 // <o5.16> Endpoint 8 Out
59 // <o5.17> Endpoint 8 In
60 // <o5.18> Endpoint 9 Out
61 // <o5.19> Endpoint 9 In
62 // <o5.20> Endpoint 10 Out
63 // <o5.21> Endpoint 10 In
64 // <o5.22> Endpoint 11 Out
65 // <o5.23> Endpoint 11 In
66 // <o5.24> Endpoint 12 Out
67 // <o5.25> Endpoint 12 In
68 // <o5.26> Endpoint 13 Out
69 // <o5.27> Endpoint 13 In
70 // <o5.28> Endpoint 14 Out
71 // <o5.29> Endpoint 14 In
72 // <o5.30> Endpoint 15 Out
73 // <o5.31> Endpoint 15 In
81 #define USB_MAX_PACKET0 8
83 #define USB_DMA_EP 0x00000000
87 // <h> USB Event Handlers
91 // <o2.0> Suspend Event
92 // <o3.0> Resume Event
93 // <o4.0> Remote Wakeup Event
94 // <o5.0> Start of Frame Event
97 // <h> Endpoint Events
98 // <o7.0> Endpoint 0 Event
99 // <o7.1> Endpoint 1 Event
100 // <o7.2> Endpoint 2 Event
101 // <o7.3> Endpoint 3 Event
102 // <o7.4> Endpoint 4 Event
103 // <o7.5> Endpoint 5 Event
104 // <o7.6> Endpoint 6 Event
105 // <o7.7> Endpoint 7 Event
106 // <o7.8> Endpoint 8 Event
107 // <o7.9> Endpoint 9 Event
108 // <o7.10> Endpoint 10 Event
109 // <o7.11> Endpoint 11 Event
110 // <o7.12> Endpoint 12 Event
111 // <o7.13> Endpoint 13 Event
112 // <o7.14> Endpoint 14 Event
113 // <o7.15> Endpoint 15 Event
115 // <h> USB Core Events
116 // <o8.0> Set Configuration Event
117 // <o9.0> Set Interface Event
118 // <o10.0> Set/Clear Feature Event
123 #define USB_POWER_EVENT 0
124 #define USB_RESET_EVENT 1
125 #define USB_SUSPEND_EVENT 0
126 #define USB_RESUME_EVENT 0
127 #define USB_WAKEUP_EVENT 0
128 #define USB_SOF_EVENT 0
129 #define USB_ERROR_EVENT 0
130 #define USB_EP_EVENT 0x0007
131 #define USB_CONFIGURE_EVENT 1
132 #define USB_INTERFACE_EVENT 0
133 #define USB_FEATURE_EVENT 0
137 // <e0> USB Class Support
138 // <i> enables USB Class specific Requests
139 // <e1> Human Interface Device (HID)
140 // <o2> Interface Number <0-255>
143 // <o4> Interface Number <0-255>
146 // <o6> Control Interface Number <0-255>
147 // <o7> Streaming Interface 1 Number <0-255>
148 // <o8> Streaming Interface 2 Number <0-255>
150 // <e9> Communication Device
151 // <o10> Control Interface Number <0-255>
152 // <o11> Bulk Interface Number <0-255>
153 // <o12> Max Communication Device Buffer Size
154 // <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes
161 #define USB_HID_IF_NUM 0
163 #define USB_MSC_IF_NUM 0
165 #define USB_ADC_CIF_NUM 0
166 #define USB_ADC_SIF1_NUM 1
167 #define USB_ADC_SIF2_NUM 2
169 #define USB_CDC_CIF_NUM 0
170 #define USB_CDC_DIF_NUM 1
171 #define USB_CDC_BUFSIZE 64
174 // <e0> USB Vendor Support
175 // <i> enables USB Vendor specific Requests
181 #endif /* __USBCFG_H__ */