root/Examples_CP-JR_ARM7_LPC2368/ETT_LPC2368_Examples/USB_DEMO/USBCDC/usbcfg.h

Revision 8, 5.0 kB (checked in by phil, 16 years ago)

Added Examples etc. from CD

Line 
1 /*----------------------------------------------------------------------------
2  *      U S B  -  K e r n e l
3  *----------------------------------------------------------------------------
4  *      Name:    USBCFG.H
5  *      Purpose: USB Custom Configuration
6  *      Version: V1.10
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 LPC microcontroller devices only. Nothing else gives you
14  * the right to use this software.
15  *
16  * Copyright (c) 2005-2007 Keil Software.
17  *---------------------------------------------------------------------------*/
18
19 #ifndef __USBCFG_H__
20 #define __USBCFG_H__
21
22
23 //*** <<< Use Configuration Wizard in Context Menu >>> ***
24
25
26 /*
27 // <h> USB Configuration
28 //   <o0> USB Power
29 //        <i> Default Power Setting
30 //        <0=> Bus-powered
31 //        <1=> Self-powered
32 //   <o1> Max Number of Interfaces <1-256>
33 //   <o2> Max Number of Endpoints  <1-32>
34 //   <o3> Max Endpoint 0 Packet Size
35 //        <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes
36 //   <e4> DMA Transfer
37 //     <i> Use DMA for selected Endpoints
38 //     <o5.0>  Endpoint 0 Out
39 //     <o5.1>  Endpoint 0 In
40 //     <o5.2>  Endpoint 1 Out
41 //     <o5.3>  Endpoint 1 In
42 //     <o5.4>  Endpoint 2 Out
43 //     <o5.5>  Endpoint 2 In
44 //     <o5.6>  Endpoint 3 Out
45 //     <o5.7>  Endpoint 3 In
46 //     <o5.8>  Endpoint 4 Out
47 //     <o5.9>  Endpoint 4 In
48 //     <o5.10> Endpoint 5 Out
49 //     <o5.11> Endpoint 5 In
50 //     <o5.12> Endpoint 6 Out
51 //     <o5.13> Endpoint 6 In
52 //     <o5.14> Endpoint 7 Out
53 //     <o5.15> Endpoint 7 In
54 //     <o5.16> Endpoint 8 Out
55 //     <o5.17> Endpoint 8 In
56 //     <o5.18> Endpoint 9 Out
57 //     <o5.19> Endpoint 9 In
58 //     <o5.20> Endpoint 10 Out
59 //     <o5.21> Endpoint 10 In
60 //     <o5.22> Endpoint 11 Out
61 //     <o5.23> Endpoint 11 In
62 //     <o5.24> Endpoint 12 Out
63 //     <o5.25> Endpoint 12 In
64 //     <o5.26> Endpoint 13 Out
65 //     <o5.27> Endpoint 13 In
66 //     <o5.28> Endpoint 14 Out
67 //     <o5.29> Endpoint 14 In
68 //     <o5.30> Endpoint 15 Out
69 //     <o5.31> Endpoint 15 In
70 //   </e>
71 // </h>
72 */
73
74 #define USB_POWER           0
75 #define USB_IF_NUM          4
76 #define USB_EP_NUM          32
77 #define USB_MAX_PACKET0     64
78 #define USB_DMA             0
79 #define USB_DMA_EP          0x00000000
80
81
82 /*
83 // <h> USB Event Handlers
84 //   <h> Device Events
85 //     <o0.0> Power Event
86 //     <o1.0> Reset Event
87 //     <o2.0> Suspend Event
88 //     <o3.0> Resume Event
89 //     <o4.0> Remote Wakeup Event
90 //     <o5.0> Start of Frame Event
91 //     <o6.0> Error Event
92 //   </h>
93 //   <h> Endpoint Events
94 //     <o7.0>  Endpoint 0 Event
95 //     <o7.1>  Endpoint 1 Event
96 //     <o7.2>  Endpoint 2 Event
97 //     <o7.3>  Endpoint 3 Event
98 //     <o7.4>  Endpoint 4 Event
99 //     <o7.5>  Endpoint 5 Event
100 //     <o7.6>  Endpoint 6 Event
101 //     <o7.7>  Endpoint 7 Event
102 //     <o7.8>  Endpoint 8 Event
103 //     <o7.9>  Endpoint 9 Event
104 //     <o7.10> Endpoint 10 Event
105 //     <o7.11> Endpoint 11 Event
106 //     <o7.12> Endpoint 12 Event
107 //     <o7.13> Endpoint 13 Event
108 //     <o7.14> Endpoint 14 Event
109 //     <o7.15> Endpoint 15 Event
110 //   </h>
111 //   <h> USB Core Events
112 //     <o8.0>  Set Configuration Event
113 //     <o9.0>  Set Interface Event
114 //     <o10.0> Set/Clear Feature Event
115 //   </h>
116 // </h>
117 */
118
119 #define USB_POWER_EVENT     0
120 #define USB_RESET_EVENT     1
121 #define USB_SUSPEND_EVENT   0
122 #define USB_RESUME_EVENT    0
123 #define USB_WAKEUP_EVENT    0
124 #define USB_SOF_EVENT       0
125 #define USB_ERROR_EVENT     0
126 #define USB_EP_EVENT        0x0007
127 #define USB_CONFIGURE_EVENT 1
128 #define USB_INTERFACE_EVENT 0
129 #define USB_FEATURE_EVENT   0
130
131
132 /*
133 // <e0> USB Class Support
134 //   <e1> Human Interface Device (HID)
135 //     <o2> Interface Number <0-255>
136 //   </e>
137 //   <e3> Mass Storage
138 //     <o4> Interface Number <0-255>
139 //   </e>
140 //   <e5> Audio Device
141 //     <o6> Control Interface Number <0-255>
142 //     <o7> Streaming Interface 1 Number <0-255>
143 //     <o8> Streaming Interface 2 Number <0-255>
144 //   </e>
145 //   <e9> Communication Device
146 //     <o10> Control Interface Number <0-255>
147 //     <o11> Bulk Interface Number <0-255>
148 //     <o12> Max Communication Device Buffer Size
149 //        <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes
150 //   </e>
151 // </e>
152 */
153
154 #define USB_CLASS           1
155 #define USB_HID             0
156 #define USB_HID_IF_NUM      0
157 #define USB_MSC             0
158 #define USB_MSC_IF_NUM      0
159 #define USB_AUDIO           0
160 #define USB_ADC_CIF_NUM     0
161 #define USB_ADC_SIF1_NUM    1
162 #define USB_ADC_SIF2_NUM    2
163 #define USB_CDC                         1
164 #define USB_CDC_CIF_NUM     0
165 #define USB_CDC_DIF_NUM     1
166 #define USB_CDC_BUFSIZE     64
167
168 #endif  /* __USBCFG_H__ */
Note: See TracBrowser for help on using the browser.