1 |
610 |
jeremybenn |
//*****************************************************************************
|
2 |
|
|
//
|
3 |
|
|
// hw_usb.h - Macros for use in accessing the USB registers.
|
4 |
|
|
//
|
5 |
|
|
// Copyright (c) 2007-2008 Luminary Micro, Inc. All rights reserved.
|
6 |
|
|
//
|
7 |
|
|
// Software License Agreement
|
8 |
|
|
//
|
9 |
|
|
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
|
10 |
|
|
// exclusively on LMI's microcontroller products.
|
11 |
|
|
//
|
12 |
|
|
// The software is owned by LMI and/or its suppliers, and is protected under
|
13 |
|
|
// applicable copyright laws. All rights are reserved. You may not combine
|
14 |
|
|
// this software with "viral" open-source software in order to form a larger
|
15 |
|
|
// program. Any use in violation of the foregoing restrictions may subject
|
16 |
|
|
// the user to criminal sanctions under applicable laws, as well as to civil
|
17 |
|
|
// liability for the breach of the terms and conditions of this license.
|
18 |
|
|
//
|
19 |
|
|
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
20 |
|
|
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
21 |
|
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
22 |
|
|
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
|
23 |
|
|
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
24 |
|
|
//
|
25 |
|
|
// This is part of revision 2523 of the Stellaris Peripheral Driver Library.
|
26 |
|
|
//
|
27 |
|
|
//*****************************************************************************
|
28 |
|
|
|
29 |
|
|
#ifndef __HW_USB_H__
|
30 |
|
|
#define __HW_USB_H__
|
31 |
|
|
|
32 |
|
|
//*****************************************************************************
|
33 |
|
|
//
|
34 |
|
|
// The following are defines for the Univeral Serial Bus (USB) Controller
|
35 |
|
|
// offsets.
|
36 |
|
|
//
|
37 |
|
|
//*****************************************************************************
|
38 |
|
|
#define USB_O_FADDR 0x00000000 // USB Device Functional Address
|
39 |
|
|
#define USB_O_POWER 0x00000001 // USB Power
|
40 |
|
|
#define USB_O_TXIS 0x00000002 // USB Transmit Interrupt Status
|
41 |
|
|
#define USB_O_RXIS 0x00000004 // USB Receive Interrupt Status
|
42 |
|
|
#define USB_O_TXIE 0x00000006 // USB Transmit Interrupt Enable
|
43 |
|
|
#define USB_O_RXIE 0x00000008 // USB Receive Interrupt Enable
|
44 |
|
|
#define USB_O_IS 0x0000000A // USB General Interrupt Status
|
45 |
|
|
#define USB_O_IE 0x0000000B // USB Interrupt Enable
|
46 |
|
|
#define USB_O_FRAME 0x0000000C // USB Frame Value
|
47 |
|
|
#define USB_O_EPIDX 0x0000000E // USB Endpoint Index
|
48 |
|
|
#define USB_O_TEST 0x0000000F // USB Test Mode
|
49 |
|
|
#define USB_O_FIFO0 0x00000020 // USB FIFO Endpoint 0
|
50 |
|
|
#define USB_O_FIFO1 0x00000024 // USB FIFO Endpoint 1
|
51 |
|
|
#define USB_O_FIFO2 0x00000028 // USB FIFO Endpoint 2
|
52 |
|
|
#define USB_O_FIFO3 0x0000002C // USB FIFO Endpoint 3
|
53 |
|
|
#define USB_O_DEVCTL 0x00000060 // USB Device Control
|
54 |
|
|
#define USB_O_TXFIFOSZ 0x00000062 // USB Transmit Dynamic FIFO Sizing
|
55 |
|
|
#define USB_O_RXFIFOSZ 0x00000063 // USB Receive Dynamic FIFO Sizing
|
56 |
|
|
#define USB_O_TXFIFOADD 0x00000064 // USB Transmit FIFO Start Address
|
57 |
|
|
#define USB_O_RXFIFOADD 0x00000066 // USB Receive FIFO Start Address
|
58 |
|
|
#define USB_O_CONTIM 0x0000007A // USB Connect Timing
|
59 |
|
|
#define USB_O_VPLEN 0x0000007B // USB OTG VBus Pulse Timing
|
60 |
|
|
#define USB_O_FSEOF 0x0000007D // USB Full-Speed Last Transaction
|
61 |
|
|
// to End of Frame Timing
|
62 |
|
|
#define USB_O_LSEOF 0x0000007E // USB Low-Speed Last Transaction
|
63 |
|
|
// to End of Frame Timing
|
64 |
|
|
#define USB_O_TXFUNCADDR0 0x00000080 // USB Transmit Functional Address
|
65 |
|
|
// Endpoint 0
|
66 |
|
|
#define USB_O_TXHUBADDR0 0x00000082 // USB Transmit Hub Address
|
67 |
|
|
// Endpoint 0
|
68 |
|
|
#define USB_O_TXHUBPORT0 0x00000083 // USB Transmit Hub Port Endpoint 0
|
69 |
|
|
#define USB_O_TXFUNCADDR1 0x00000088 // USB Transmit Functional Address
|
70 |
|
|
// Endpoint 1
|
71 |
|
|
#define USB_O_TXHUBADDR1 0x0000008A // USB Transmit Hub Address
|
72 |
|
|
// Endpoint 1
|
73 |
|
|
#define USB_O_TXHUBPORT1 0x0000008B // USB Transmit Hub Port Endpoint 1
|
74 |
|
|
#define USB_O_RXFUNCADDR1 0x0000008C // USB Receive Functional Address
|
75 |
|
|
// Endpoint 1
|
76 |
|
|
#define USB_O_RXHUBADDR1 0x0000008E // USB Receive Hub Address Endpoint
|
77 |
|
|
// 1
|
78 |
|
|
#define USB_O_RXHUBPORT1 0x0000008F // USB Receive Hub Port Endpoint 1
|
79 |
|
|
#define USB_O_TXFUNCADDR2 0x00000090 // USB Transmit Functional Address
|
80 |
|
|
// Endpoint 2
|
81 |
|
|
#define USB_O_TXHUBADDR2 0x00000092 // USB Transmit Hub Address
|
82 |
|
|
// Endpoint 2
|
83 |
|
|
#define USB_O_TXHUBPORT2 0x00000093 // USB Transmit Hub Port Endpoint 2
|
84 |
|
|
#define USB_O_RXFUNCADDR2 0x00000094 // USB Receive Functional Address
|
85 |
|
|
// Endpoint 2
|
86 |
|
|
#define USB_O_RXHUBADDR2 0x00000096 // USB Receive Hub Address Endpoint
|
87 |
|
|
// 2
|
88 |
|
|
#define USB_O_RXHUBPORT2 0x00000097 // USB Receive Hub Port Endpoint 2
|
89 |
|
|
#define USB_O_TXFUNCADDR3 0x00000098 // USB Transmit Functional Address
|
90 |
|
|
// Endpoint 3
|
91 |
|
|
#define USB_O_TXHUBADDR3 0x0000009A // USB Transmit Hub Address
|
92 |
|
|
// Endpoint 3
|
93 |
|
|
#define USB_O_TXHUBPORT3 0x0000009B // USB Transmit Hub Port Endpoint 3
|
94 |
|
|
#define USB_O_RXFUNCADDR3 0x0000009C // USB Receive Functional Address
|
95 |
|
|
// Endpoint 3
|
96 |
|
|
#define USB_O_RXHUBADDR3 0x0000009E // USB Receive Hub Address Endpoint
|
97 |
|
|
// 3
|
98 |
|
|
#define USB_O_RXHUBPORT3 0x0000009F // USB Receive Hub Port Endpoint 3
|
99 |
|
|
#define USB_O_CSRL0 0x00000102 // USB Control and Status Endpoint
|
100 |
|
|
// 0 Low
|
101 |
|
|
#define USB_O_CSRH0 0x00000103 // USB Control and Status Endpoint
|
102 |
|
|
// 0 High
|
103 |
|
|
#define USB_O_COUNT0 0x00000108 // USB Receive Byte Count Endpoint
|
104 |
|
|
// 0
|
105 |
|
|
#define USB_O_TYPE0 0x0000010A // USB Type Endpoint 0
|
106 |
|
|
#define USB_O_NAKLMT 0x0000010B // USB NAK Limit
|
107 |
|
|
#define USB_O_TXMAXP1 0x00000110 // USB Maximum Transmit Data
|
108 |
|
|
// Endpoint 1
|
109 |
|
|
#define USB_O_TXCSRL1 0x00000112 // USB Transmit Control and Status
|
110 |
|
|
// Endpoint 1 Low
|
111 |
|
|
#define USB_O_TXCSRH1 0x00000113 // USB Transmit Control and Status
|
112 |
|
|
// Endpoint 1 High
|
113 |
|
|
#define USB_O_RXMAXP1 0x00000114 // USB Maximum Receive Data
|
114 |
|
|
// Endpoint 1
|
115 |
|
|
#define USB_O_RXCSRL1 0x00000116 // USB Receive Control and Status
|
116 |
|
|
// Endpoint 1 Low
|
117 |
|
|
#define USB_O_RXCSRH1 0x00000117 // USB Receive Control and Status
|
118 |
|
|
// Endpoint 1 High
|
119 |
|
|
#define USB_O_RXCOUNT1 0x00000118 // USB Receive Byte Count Endpoint
|
120 |
|
|
// 1
|
121 |
|
|
#define USB_O_TXTYPE1 0x0000011A // USB Host Transmit Configure Type
|
122 |
|
|
// Endpoint 1
|
123 |
|
|
#define USB_O_TXINTERVAL1 0x0000011B // USB Host Transmit Interval
|
124 |
|
|
// Endpoint 1
|
125 |
|
|
#define USB_O_RXTYPE1 0x0000011C // USB Host Configure Receive Type
|
126 |
|
|
// Endpoint 1
|
127 |
|
|
#define USB_O_RXINTERVAL1 0x0000011D // USB Host Receive Polling
|
128 |
|
|
// Interval Endpoint 1
|
129 |
|
|
#define USB_O_TXMAXP2 0x00000120 // USB Maximum Transmit Data
|
130 |
|
|
// Endpoint 2
|
131 |
|
|
#define USB_O_TXCSRL2 0x00000122 // USB Transmit Control and Status
|
132 |
|
|
// Endpoint 2 Low
|
133 |
|
|
#define USB_O_TXCSRH2 0x00000123 // USB Transmit Control and Status
|
134 |
|
|
// Endpoint 2 High
|
135 |
|
|
#define USB_O_RXMAXP2 0x00000124 // USB Maximum Receive Data
|
136 |
|
|
// Endpoint 2
|
137 |
|
|
#define USB_O_RXCSRL2 0x00000126 // USB Receive Control and Status
|
138 |
|
|
// Endpoint 2 Low
|
139 |
|
|
#define USB_O_RXCSRH2 0x00000127 // USB Receive Control and Status
|
140 |
|
|
// Endpoint 2 High
|
141 |
|
|
#define USB_O_RXCOUNT2 0x00000128 // USB Receive Byte Count Endpoint
|
142 |
|
|
// 2
|
143 |
|
|
#define USB_O_TXTYPE2 0x0000012A // USB Host Transmit Configure Type
|
144 |
|
|
// Endpoint 2
|
145 |
|
|
#define USB_O_TXINTERVAL2 0x0000012B // USB Host Transmit Interval
|
146 |
|
|
// Endpoint 2
|
147 |
|
|
#define USB_O_RXTYPE2 0x0000012C // USB Host Configure Receive Type
|
148 |
|
|
// Endpoint 2
|
149 |
|
|
#define USB_O_RXINTERVAL2 0x0000012D // USB Host Receive Polling
|
150 |
|
|
// Interval Endpoint 2
|
151 |
|
|
#define USB_O_TXMAXP3 0x00000130 // USB Maximum Transmit Data
|
152 |
|
|
// Endpoint 3
|
153 |
|
|
#define USB_O_TXCSRL3 0x00000132 // USB Transmit Control and Status
|
154 |
|
|
// Endpoint 3 Low
|
155 |
|
|
#define USB_O_TXCSRH3 0x00000133 // USB Transmit Control and Status
|
156 |
|
|
// Endpoint 3 High
|
157 |
|
|
#define USB_O_RXMAXP3 0x00000134 // USB Maximum Receive Data
|
158 |
|
|
// Endpoint 3
|
159 |
|
|
#define USB_O_RXCSRL3 0x00000136 // USB Receive Control and Status
|
160 |
|
|
// Endpoint 3 Low
|
161 |
|
|
#define USB_O_RXCSRH3 0x00000137 // USB Receive Control and Status
|
162 |
|
|
// Endpoint 3 High
|
163 |
|
|
#define USB_O_RXCOUNT3 0x00000138 // USB Receive Byte Count Endpoint
|
164 |
|
|
// 3
|
165 |
|
|
#define USB_O_TXTYPE3 0x0000013A // USB Host Transmit Configure Type
|
166 |
|
|
// Endpoint 3
|
167 |
|
|
#define USB_O_TXINTERVAL3 0x0000013B // USB Host Transmit Interval
|
168 |
|
|
// Endpoint 3
|
169 |
|
|
#define USB_O_RXTYPE3 0x0000013C // USB Host Configure Receive Type
|
170 |
|
|
// Endpoint 3
|
171 |
|
|
#define USB_O_RXINTERVAL3 0x0000013D // USB Host Receive Polling
|
172 |
|
|
// Interval Endpoint 3
|
173 |
|
|
#define USB_O_RQPKTCOUNT1 0x00000304 // USB Request Packet Count in
|
174 |
|
|
// Block Transfer Endpoint 1
|
175 |
|
|
#define USB_O_RQPKTCOUNT2 0x00000308 // USB Request Packet Count in
|
176 |
|
|
// Block Transfer Endpoint 2
|
177 |
|
|
#define USB_O_RQPKTCOUNT3 0x0000030C // USB Request Packet Count in
|
178 |
|
|
// Block Transfer Endpoint 3
|
179 |
|
|
#define USB_O_RXDPKTBUFDIS 0x00000340 // USB Receive Double Packet Buffer
|
180 |
|
|
// Disable
|
181 |
|
|
#define USB_O_TXDPKTBUFDIS 0x00000342 // USB Transmit Double Packet
|
182 |
|
|
// Buffer Disable
|
183 |
|
|
#define USB_O_EPC 0x00000400 // USB External Power Control
|
184 |
|
|
#define USB_O_EPCRIS 0x00000404 // USB External Power Control Raw
|
185 |
|
|
// Interrupt Status
|
186 |
|
|
#define USB_O_EPCIM 0x00000408 // USB External Power Control
|
187 |
|
|
// Interrupt Mask
|
188 |
|
|
#define USB_O_EPCISC 0x0000040C // USB External Power Control
|
189 |
|
|
// Interrupt Status and Clear
|
190 |
|
|
#define USB_O_DRRIS 0x00000410 // USB Device Resume Raw Interrupt
|
191 |
|
|
// Status
|
192 |
|
|
#define USB_O_DRIM 0x00000414 // USB Device Resume Interrupt Mask
|
193 |
|
|
#define USB_O_DRISC 0x00000418 // USB Device Resume Interrupt
|
194 |
|
|
// Status and Clear
|
195 |
|
|
#define USB_O_GPCS 0x0000041C // USB General-Purpose Control and
|
196 |
|
|
// Status
|
197 |
|
|
|
198 |
|
|
//*****************************************************************************
|
199 |
|
|
//
|
200 |
|
|
// The following are defines for the bit fields in the USB_O_FADDR register.
|
201 |
|
|
//
|
202 |
|
|
//*****************************************************************************
|
203 |
|
|
#define USB_FADDR_M 0x0000007F // Function Address.
|
204 |
|
|
#define USB_FADDR_S 0
|
205 |
|
|
|
206 |
|
|
//*****************************************************************************
|
207 |
|
|
//
|
208 |
|
|
// The following are defines for the bit fields in the USB_O_POWER register.
|
209 |
|
|
//
|
210 |
|
|
//*****************************************************************************
|
211 |
|
|
#define USB_POWER_ISOUP 0x00000080 // ISO Update.
|
212 |
|
|
#define USB_POWER_SOFTCONN 0x00000040 // Soft Connect/Disconnect.
|
213 |
|
|
#define USB_POWER_RESET 0x00000008 // Reset.
|
214 |
|
|
#define USB_POWER_RESUME 0x00000004 // Resume Signaling.
|
215 |
|
|
#define USB_POWER_SUSPEND 0x00000002 // Suspend Mode.
|
216 |
|
|
#define USB_POWER_PWRDNPHY 0x00000001 // Power Down PHY.
|
217 |
|
|
|
218 |
|
|
//*****************************************************************************
|
219 |
|
|
//
|
220 |
|
|
// The following are defines for the bit fields in the USB_O_TXIS register.
|
221 |
|
|
//
|
222 |
|
|
//*****************************************************************************
|
223 |
|
|
#define USB_TXIS_EP3 0x00000008 // TX Endpoint 3 Interrupt.
|
224 |
|
|
#define USB_TXIS_EP2 0x00000004 // TX Endpoint 2 Interrupt.
|
225 |
|
|
#define USB_TXIS_EP1 0x00000002 // TX Endpoint 1 Interrupt.
|
226 |
|
|
#define USB_TXIS_EP0 0x00000001 // TX and RX Endpoint 0 Interrupt.
|
227 |
|
|
|
228 |
|
|
//*****************************************************************************
|
229 |
|
|
//
|
230 |
|
|
// The following are defines for the bit fields in the USB_O_RXIS register.
|
231 |
|
|
//
|
232 |
|
|
//*****************************************************************************
|
233 |
|
|
#define USB_RXIS_EP3 0x00000008 // RX Endpoint 3 Interrupt.
|
234 |
|
|
#define USB_RXIS_EP2 0x00000004 // RX Endpoint 2 Interrupt.
|
235 |
|
|
#define USB_RXIS_EP1 0x00000002 // RX Endpoint 1 Interrupt.
|
236 |
|
|
|
237 |
|
|
//*****************************************************************************
|
238 |
|
|
//
|
239 |
|
|
// The following are defines for the bit fields in the USB_O_TXIE register.
|
240 |
|
|
//
|
241 |
|
|
//*****************************************************************************
|
242 |
|
|
#define USB_TXIE_EP3 0x00000008 // TX Endpoint 3 Interrupt Enable.
|
243 |
|
|
#define USB_TXIE_EP2 0x00000004 // TX Endpoint 2 Interrupt Enable.
|
244 |
|
|
#define USB_TXIE_EP1 0x00000002 // TX Endpoint 1 Interrupt Enable.
|
245 |
|
|
#define USB_TXIE_EP0 0x00000001 // TX and RX Endpoint 0 Interrupt
|
246 |
|
|
// Enable.
|
247 |
|
|
|
248 |
|
|
//*****************************************************************************
|
249 |
|
|
//
|
250 |
|
|
// The following are defines for the bit fields in the USB_O_RXIE register.
|
251 |
|
|
//
|
252 |
|
|
//*****************************************************************************
|
253 |
|
|
#define USB_RXIE_EP3 0x00000008 // RX Endpoint 3 Interrupt Enable.
|
254 |
|
|
#define USB_RXIE_EP2 0x00000004 // RX Endpoint 2 Interrupt Enable.
|
255 |
|
|
#define USB_RXIE_EP1 0x00000002 // RX Endpoint 1 Interrupt Enable.
|
256 |
|
|
|
257 |
|
|
//*****************************************************************************
|
258 |
|
|
//
|
259 |
|
|
// The following are defines for the bit fields in the USB_O_IS register.
|
260 |
|
|
//
|
261 |
|
|
//*****************************************************************************
|
262 |
|
|
#define USB_IS_VBUSERR 0x00000080 // VBus Error.
|
263 |
|
|
#define USB_IS_SESREQ 0x00000040 // Session Request.
|
264 |
|
|
#define USB_IS_DISCON 0x00000020 // Session Disconnect.
|
265 |
|
|
#define USB_IS_CONN 0x00000010 // Session Connect.
|
266 |
|
|
#define USB_IS_SOF 0x00000008 // Start of Frame.
|
267 |
|
|
#define USB_IS_BABBLE 0x00000004 // Babble Detected.
|
268 |
|
|
#define USB_IS_RESET 0x00000004 // Reset Signal Detected.
|
269 |
|
|
#define USB_IS_RESUME 0x00000002 // Resume Signal Detected.
|
270 |
|
|
#define USB_IS_SUSPEND 0x00000001 // Suspend Signal Detected.
|
271 |
|
|
|
272 |
|
|
//*****************************************************************************
|
273 |
|
|
//
|
274 |
|
|
// The following are defines for the bit fields in the USB_O_IE register.
|
275 |
|
|
//
|
276 |
|
|
//*****************************************************************************
|
277 |
|
|
#define USB_IE_VBUSERR 0x00000080 // Enable VBUS Error Interrupt.
|
278 |
|
|
#define USB_IE_SESREQ 0x00000040 // Enable Session Request
|
279 |
|
|
// Interrupt.
|
280 |
|
|
#define USB_IE_DISCON 0x00000020 // Enable Disconnect Interrupt.
|
281 |
|
|
#define USB_IE_CONN 0x00000010 // Enable Connect Interrupt.
|
282 |
|
|
#define USB_IE_SOF 0x00000008 // Enable Start-of-Frame Interrupt.
|
283 |
|
|
#define USB_IE_BABBLE 0x00000004 // Enable Babble Interrupt.
|
284 |
|
|
#define USB_IE_RESET 0x00000004 // Enable Reset Interrupt.
|
285 |
|
|
#define USB_IE_RESUME 0x00000002 // Enable Resume Interrupt.
|
286 |
|
|
#define USB_IE_SUSPND 0x00000001 // Enable Suspend Interrupt.
|
287 |
|
|
|
288 |
|
|
//*****************************************************************************
|
289 |
|
|
//
|
290 |
|
|
// The following are defines for the bit fields in the USB_O_FRAME register.
|
291 |
|
|
//
|
292 |
|
|
//*****************************************************************************
|
293 |
|
|
#define USB_FRAME_M 0x000007FF // Frame Number.
|
294 |
|
|
#define USB_FRAME_S 0
|
295 |
|
|
|
296 |
|
|
//*****************************************************************************
|
297 |
|
|
//
|
298 |
|
|
// The following are defines for the bit fields in the USB_O_EPIDX register.
|
299 |
|
|
//
|
300 |
|
|
//*****************************************************************************
|
301 |
|
|
#define USB_EPIDX_EPIDX_M 0x0000000F // Endpoint Index.
|
302 |
|
|
#define USB_EPIDX_EPIDX_S 0
|
303 |
|
|
|
304 |
|
|
//*****************************************************************************
|
305 |
|
|
//
|
306 |
|
|
// The following are defines for the bit fields in the USB_O_TEST register.
|
307 |
|
|
//
|
308 |
|
|
//*****************************************************************************
|
309 |
|
|
#define USB_TEST_FORCEH 0x00000080 // Force Host Mode.
|
310 |
|
|
#define USB_TEST_FIFOACC 0x00000040 // FIFO Access.
|
311 |
|
|
#define USB_TEST_FORCEFS 0x00000020 // Force Full Speed.
|
312 |
|
|
|
313 |
|
|
//*****************************************************************************
|
314 |
|
|
//
|
315 |
|
|
// The following are defines for the bit fields in the USB_O_FIFO0 register.
|
316 |
|
|
//
|
317 |
|
|
//*****************************************************************************
|
318 |
|
|
#define USB_FIFO0_EPDATA_M 0xFFFFFFFF // Endpoint Data.
|
319 |
|
|
#define USB_FIFO0_EPDATA_S 0
|
320 |
|
|
|
321 |
|
|
//*****************************************************************************
|
322 |
|
|
//
|
323 |
|
|
// The following are defines for the bit fields in the USB_O_FIFO1 register.
|
324 |
|
|
//
|
325 |
|
|
//*****************************************************************************
|
326 |
|
|
#define USB_FIFO1_EPDATA_M 0xFFFFFFFF // Endpoint Data.
|
327 |
|
|
#define USB_FIFO1_EPDATA_S 0
|
328 |
|
|
|
329 |
|
|
//*****************************************************************************
|
330 |
|
|
//
|
331 |
|
|
// The following are defines for the bit fields in the USB_O_FIFO2 register.
|
332 |
|
|
//
|
333 |
|
|
//*****************************************************************************
|
334 |
|
|
#define USB_FIFO2_EPDATA_M 0xFFFFFFFF // Endpoint Data.
|
335 |
|
|
#define USB_FIFO2_EPDATA_S 0
|
336 |
|
|
|
337 |
|
|
//*****************************************************************************
|
338 |
|
|
//
|
339 |
|
|
// The following are defines for the bit fields in the USB_O_FIFO3 register.
|
340 |
|
|
//
|
341 |
|
|
//*****************************************************************************
|
342 |
|
|
#define USB_FIFO3_EPDATA_M 0xFFFFFFFF // Endpoint Data.
|
343 |
|
|
#define USB_FIFO3_EPDATA_S 0
|
344 |
|
|
|
345 |
|
|
//*****************************************************************************
|
346 |
|
|
//
|
347 |
|
|
// The following are defines for the bit fields in the USB_O_DEVCTL register.
|
348 |
|
|
//
|
349 |
|
|
//*****************************************************************************
|
350 |
|
|
#define USB_DEVCTL_DEV 0x00000080 // Device Mode.
|
351 |
|
|
#define USB_DEVCTL_FSDEV 0x00000040 // Full-Speed Device Detected.
|
352 |
|
|
#define USB_DEVCTL_LSDEV 0x00000020 // Low-Speed Device Detected.
|
353 |
|
|
#define USB_DEVCTL_VBUS_M 0x00000018 // VBus Level.
|
354 |
|
|
#define USB_DEVCTL_VBUS_NONE 0x00000000 // Below SessionEnd
|
355 |
|
|
#define USB_DEVCTL_VBUS_SEND 0x00000008 // Above SessionEnd, below AValid
|
356 |
|
|
#define USB_DEVCTL_VBUS_AVALID 0x00000010 // Above AValid, below VBusValid
|
357 |
|
|
#define USB_DEVCTL_VBUS_VALID 0x00000018 // Above VBusValid
|
358 |
|
|
#define USB_DEVCTL_HOST 0x00000004 // Host Mode.
|
359 |
|
|
#define USB_DEVCTL_HOSTREQ 0x00000002 // Host Request.
|
360 |
|
|
#define USB_DEVCTL_SESSION 0x00000001 // Session Start/End.
|
361 |
|
|
|
362 |
|
|
//*****************************************************************************
|
363 |
|
|
//
|
364 |
|
|
// The following are defines for the bit fields in the USB_O_TXFIFOSZ register.
|
365 |
|
|
//
|
366 |
|
|
//*****************************************************************************
|
367 |
|
|
#define USB_TXFIFOSZ_DPB 0x00000010 // Double Packet Buffer Support.
|
368 |
|
|
#define USB_TXFIFOSZ_SIZE_M 0x0000000F // Max Packet Size.
|
369 |
|
|
#define USB_TXFIFOSZ_SIZE_8 0x00000000 // 8
|
370 |
|
|
#define USB_TXFIFOSZ_SIZE_16 0x00000001 // 16
|
371 |
|
|
#define USB_TXFIFOSZ_SIZE_32 0x00000002 // 32
|
372 |
|
|
#define USB_TXFIFOSZ_SIZE_64 0x00000003 // 64
|
373 |
|
|
#define USB_TXFIFOSZ_SIZE_128 0x00000004 // 128
|
374 |
|
|
#define USB_TXFIFOSZ_SIZE_256 0x00000005 // 256
|
375 |
|
|
#define USB_TXFIFOSZ_SIZE_512 0x00000006 // 512
|
376 |
|
|
#define USB_TXFIFOSZ_SIZE_1024 0x00000007 // 1024
|
377 |
|
|
#define USB_TXFIFOSZ_SIZE_2048 0x00000008 // 2048
|
378 |
|
|
|
379 |
|
|
//*****************************************************************************
|
380 |
|
|
//
|
381 |
|
|
// The following are defines for the bit fields in the USB_O_RXFIFOSZ register.
|
382 |
|
|
//
|
383 |
|
|
//*****************************************************************************
|
384 |
|
|
#define USB_RXFIFOSZ_DPB 0x00000010 // Double Packet Buffer Support.
|
385 |
|
|
#define USB_RXFIFOSZ_SIZE_M 0x0000000F // Max Packet Size.
|
386 |
|
|
#define USB_RXFIFOSZ_SIZE_8 0x00000000 // 8
|
387 |
|
|
#define USB_RXFIFOSZ_SIZE_16 0x00000001 // 16
|
388 |
|
|
#define USB_RXFIFOSZ_SIZE_32 0x00000002 // 32
|
389 |
|
|
#define USB_RXFIFOSZ_SIZE_64 0x00000003 // 64
|
390 |
|
|
#define USB_RXFIFOSZ_SIZE_128 0x00000004 // 128
|
391 |
|
|
#define USB_RXFIFOSZ_SIZE_256 0x00000005 // 256
|
392 |
|
|
#define USB_RXFIFOSZ_SIZE_512 0x00000006 // 512
|
393 |
|
|
#define USB_RXFIFOSZ_SIZE_1024 0x00000007 // 1024
|
394 |
|
|
#define USB_RXFIFOSZ_SIZE_2048 0x00000008 // 2048
|
395 |
|
|
|
396 |
|
|
//*****************************************************************************
|
397 |
|
|
//
|
398 |
|
|
// The following are defines for the bit fields in the USB_O_TXFIFOADD
|
399 |
|
|
// register.
|
400 |
|
|
//
|
401 |
|
|
//*****************************************************************************
|
402 |
|
|
#define USB_TXFIFOADD_ADDR_M 0x00001FFF // Transmit/Receive Start Address.
|
403 |
|
|
#define USB_TXFIFOADD_ADDR_0 0x00000000 // 0
|
404 |
|
|
#define USB_TXFIFOADD_ADDR_8 0x00000001 // 8
|
405 |
|
|
#define USB_TXFIFOADD_ADDR_16 0x00000002 // 16
|
406 |
|
|
#define USB_TXFIFOADD_ADDR_32 0x00000003 // 32
|
407 |
|
|
#define USB_TXFIFOADD_ADDR_64 0x00000004 // 64
|
408 |
|
|
#define USB_TXFIFOADD_ADDR_128 0x00000005 // 128
|
409 |
|
|
#define USB_TXFIFOADD_ADDR_256 0x00000006 // 256
|
410 |
|
|
#define USB_TXFIFOADD_ADDR_512 0x00000007 // 512
|
411 |
|
|
#define USB_TXFIFOADD_ADDR_1024 0x00000008 // 1024
|
412 |
|
|
#define USB_TXFIFOADD_ADDR_2048 0x00000009 // 2048
|
413 |
|
|
|
414 |
|
|
//*****************************************************************************
|
415 |
|
|
//
|
416 |
|
|
// The following are defines for the bit fields in the USB_O_RXFIFOADD
|
417 |
|
|
// register.
|
418 |
|
|
//
|
419 |
|
|
//*****************************************************************************
|
420 |
|
|
#define USB_RXFIFOADD_ADDR_M 0x00001FFF // Transmit/Receive Start Address.
|
421 |
|
|
#define USB_RXFIFOADD_ADDR_0 0x00000000 // 0
|
422 |
|
|
#define USB_RXFIFOADD_ADDR_8 0x00000001 // 8
|
423 |
|
|
#define USB_RXFIFOADD_ADDR_16 0x00000002 // 16
|
424 |
|
|
#define USB_RXFIFOADD_ADDR_32 0x00000003 // 32
|
425 |
|
|
#define USB_RXFIFOADD_ADDR_64 0x00000004 // 64
|
426 |
|
|
#define USB_RXFIFOADD_ADDR_128 0x00000005 // 128
|
427 |
|
|
#define USB_RXFIFOADD_ADDR_256 0x00000006 // 256
|
428 |
|
|
#define USB_RXFIFOADD_ADDR_512 0x00000007 // 512
|
429 |
|
|
#define USB_RXFIFOADD_ADDR_1024 0x00000008 // 1024
|
430 |
|
|
#define USB_RXFIFOADD_ADDR_2048 0x00000009 // 2048
|
431 |
|
|
|
432 |
|
|
//*****************************************************************************
|
433 |
|
|
//
|
434 |
|
|
// The following are defines for the bit fields in the USB_O_CONTIM register.
|
435 |
|
|
//
|
436 |
|
|
//*****************************************************************************
|
437 |
|
|
#define USB_CONTIM_WTCON_M 0x000000F0 // Connect Wait.
|
438 |
|
|
#define USB_CONTIM_WTID_M 0x0000000F // Wait ID.
|
439 |
|
|
#define USB_CONTIM_WTCON_S 4
|
440 |
|
|
#define USB_CONTIM_WTID_S 0
|
441 |
|
|
|
442 |
|
|
//*****************************************************************************
|
443 |
|
|
//
|
444 |
|
|
// The following are defines for the bit fields in the USB_O_FSEOF register.
|
445 |
|
|
//
|
446 |
|
|
//*****************************************************************************
|
447 |
|
|
#define USB_FSEOF_FSEOFG_M 0x000000FF // Full-Speed End-of-Frame Gap.
|
448 |
|
|
#define USB_FSEOF_FSEOFG_S 0
|
449 |
|
|
|
450 |
|
|
//*****************************************************************************
|
451 |
|
|
//
|
452 |
|
|
// The following are defines for the bit fields in the USB_O_LSEOF register.
|
453 |
|
|
//
|
454 |
|
|
//*****************************************************************************
|
455 |
|
|
#define USB_LSEOF_LSEOFG_M 0x000000FF // Low-Speed End-of-Frame Gap.
|
456 |
|
|
#define USB_LSEOF_LSEOFG_S 0
|
457 |
|
|
|
458 |
|
|
//*****************************************************************************
|
459 |
|
|
//
|
460 |
|
|
// The following are defines for the bit fields in the USB_O_TXFUNCADDR0
|
461 |
|
|
// register.
|
462 |
|
|
//
|
463 |
|
|
//*****************************************************************************
|
464 |
|
|
#define USB_TXFUNCADDR0_ADDR_M 0x0000007F // Device Address.
|
465 |
|
|
#define USB_TXFUNCADDR0_ADDR_S 0
|
466 |
|
|
|
467 |
|
|
//*****************************************************************************
|
468 |
|
|
//
|
469 |
|
|
// The following are defines for the bit fields in the USB_O_TXHUBADDR0
|
470 |
|
|
// register.
|
471 |
|
|
//
|
472 |
|
|
//*****************************************************************************
|
473 |
|
|
#define USB_TXHUBADDR0_MULTTRAN 0x00000080 // Multiple Translators.
|
474 |
|
|
#define USB_TXHUBADDR0_ADDR_M 0x0000007F // Hub Address.
|
475 |
|
|
#define USB_TXHUBADDR0_ADDR_S 0
|
476 |
|
|
|
477 |
|
|
//*****************************************************************************
|
478 |
|
|
//
|
479 |
|
|
// The following are defines for the bit fields in the USB_O_TXHUBPORT0
|
480 |
|
|
// register.
|
481 |
|
|
//
|
482 |
|
|
//*****************************************************************************
|
483 |
|
|
#define USB_TXHUBPORT0_PORT_M 0x0000007F // Hub Port.
|
484 |
|
|
#define USB_TXHUBPORT0_PORT_S 0
|
485 |
|
|
|
486 |
|
|
//*****************************************************************************
|
487 |
|
|
//
|
488 |
|
|
// The following are defines for the bit fields in the USB_O_TXFUNCADDR1
|
489 |
|
|
// register.
|
490 |
|
|
//
|
491 |
|
|
//*****************************************************************************
|
492 |
|
|
#define USB_TXFUNCADDR1_ADDR_M 0x0000007F // Device Address.
|
493 |
|
|
#define USB_TXFUNCADDR1_ADDR_S 0
|
494 |
|
|
|
495 |
|
|
//*****************************************************************************
|
496 |
|
|
//
|
497 |
|
|
// The following are defines for the bit fields in the USB_O_TXHUBADDR1
|
498 |
|
|
// register.
|
499 |
|
|
//
|
500 |
|
|
//*****************************************************************************
|
501 |
|
|
#define USB_TXHUBADDR1_MULTTRAN 0x00000080 // Multiple Translators.
|
502 |
|
|
#define USB_TXHUBADDR1_ADDR_M 0x0000007F // Hub Address.
|
503 |
|
|
#define USB_TXHUBADDR1_ADDR_S 0
|
504 |
|
|
|
505 |
|
|
//*****************************************************************************
|
506 |
|
|
//
|
507 |
|
|
// The following are defines for the bit fields in the USB_O_TXHUBPORT1
|
508 |
|
|
// register.
|
509 |
|
|
//
|
510 |
|
|
//*****************************************************************************
|
511 |
|
|
#define USB_TXHUBPORT1_PORT_M 0x0000007F // Hub Port.
|
512 |
|
|
#define USB_TXHUBPORT1_PORT_S 0
|
513 |
|
|
|
514 |
|
|
//*****************************************************************************
|
515 |
|
|
//
|
516 |
|
|
// The following are defines for the bit fields in the USB_O_RXFUNCADDR1
|
517 |
|
|
// register.
|
518 |
|
|
//
|
519 |
|
|
//*****************************************************************************
|
520 |
|
|
#define USB_RXFUNCADDR1_ADDR_M 0x0000007F // Device Address.
|
521 |
|
|
#define USB_RXFUNCADDR1_ADDR_S 0
|
522 |
|
|
|
523 |
|
|
//*****************************************************************************
|
524 |
|
|
//
|
525 |
|
|
// The following are defines for the bit fields in the USB_O_RXHUBADDR1
|
526 |
|
|
// register.
|
527 |
|
|
//
|
528 |
|
|
//*****************************************************************************
|
529 |
|
|
#define USB_RXHUBADDR1_MULTTRAN 0x00000080 // Multiple Translators.
|
530 |
|
|
#define USB_RXHUBADDR1_ADDR_M 0x0000007F // Hub Address.
|
531 |
|
|
#define USB_RXHUBADDR1_ADDR_S 0
|
532 |
|
|
|
533 |
|
|
//*****************************************************************************
|
534 |
|
|
//
|
535 |
|
|
// The following are defines for the bit fields in the USB_O_RXHUBPORT1
|
536 |
|
|
// register.
|
537 |
|
|
//
|
538 |
|
|
//*****************************************************************************
|
539 |
|
|
#define USB_RXHUBPORT1_PORT_M 0x0000007F // Hub Port.
|
540 |
|
|
#define USB_RXHUBPORT1_PORT_S 0
|
541 |
|
|
|
542 |
|
|
//*****************************************************************************
|
543 |
|
|
//
|
544 |
|
|
// The following are defines for the bit fields in the USB_O_TXFUNCADDR2
|
545 |
|
|
// register.
|
546 |
|
|
//
|
547 |
|
|
//*****************************************************************************
|
548 |
|
|
#define USB_TXFUNCADDR2_ADDR_M 0x0000007F // Device Address.
|
549 |
|
|
#define USB_TXFUNCADDR2_ADDR_S 0
|
550 |
|
|
|
551 |
|
|
//*****************************************************************************
|
552 |
|
|
//
|
553 |
|
|
// The following are defines for the bit fields in the USB_O_TXHUBADDR2
|
554 |
|
|
// register.
|
555 |
|
|
//
|
556 |
|
|
//*****************************************************************************
|
557 |
|
|
#define USB_TXHUBADDR2_MULTTRAN 0x00000080 // Multiple Translators.
|
558 |
|
|
#define USB_TXHUBADDR2_ADDR_M 0x0000007F // Hub Address.
|
559 |
|
|
#define USB_TXHUBADDR2_ADDR_S 0
|
560 |
|
|
|
561 |
|
|
//*****************************************************************************
|
562 |
|
|
//
|
563 |
|
|
// The following are defines for the bit fields in the USB_O_TXHUBPORT2
|
564 |
|
|
// register.
|
565 |
|
|
//
|
566 |
|
|
//*****************************************************************************
|
567 |
|
|
#define USB_TXHUBPORT2_PORT_M 0x0000007F // Hub Port.
|
568 |
|
|
#define USB_TXHUBPORT2_PORT_S 0
|
569 |
|
|
|
570 |
|
|
//*****************************************************************************
|
571 |
|
|
//
|
572 |
|
|
// The following are defines for the bit fields in the USB_O_RXFUNCADDR2
|
573 |
|
|
// register.
|
574 |
|
|
//
|
575 |
|
|
//*****************************************************************************
|
576 |
|
|
#define USB_RXFUNCADDR2_ADDR_M 0x0000007F // Device Address.
|
577 |
|
|
#define USB_RXFUNCADDR2_ADDR_S 0
|
578 |
|
|
|
579 |
|
|
//*****************************************************************************
|
580 |
|
|
//
|
581 |
|
|
// The following are defines for the bit fields in the USB_O_RXHUBADDR2
|
582 |
|
|
// register.
|
583 |
|
|
//
|
584 |
|
|
//*****************************************************************************
|
585 |
|
|
#define USB_RXHUBADDR2_MULTTRAN 0x00000080 // Multiple Translators.
|
586 |
|
|
#define USB_RXHUBADDR2_ADDR_M 0x0000007F // Hub Address.
|
587 |
|
|
#define USB_RXHUBADDR2_ADDR_S 0
|
588 |
|
|
|
589 |
|
|
//*****************************************************************************
|
590 |
|
|
//
|
591 |
|
|
// The following are defines for the bit fields in the USB_O_RXHUBPORT2
|
592 |
|
|
// register.
|
593 |
|
|
//
|
594 |
|
|
//*****************************************************************************
|
595 |
|
|
#define USB_RXHUBPORT2_PORT_M 0x0000007F // Hub Port.
|
596 |
|
|
#define USB_RXHUBPORT2_PORT_S 0
|
597 |
|
|
|
598 |
|
|
//*****************************************************************************
|
599 |
|
|
//
|
600 |
|
|
// The following are defines for the bit fields in the USB_O_TXFUNCADDR3
|
601 |
|
|
// register.
|
602 |
|
|
//
|
603 |
|
|
//*****************************************************************************
|
604 |
|
|
#define USB_TXFUNCADDR3_ADDR_M 0x0000007F // Device Address.
|
605 |
|
|
#define USB_TXFUNCADDR3_ADDR_S 0
|
606 |
|
|
|
607 |
|
|
//*****************************************************************************
|
608 |
|
|
//
|
609 |
|
|
// The following are defines for the bit fields in the USB_O_TXHUBADDR3
|
610 |
|
|
// register.
|
611 |
|
|
//
|
612 |
|
|
//*****************************************************************************
|
613 |
|
|
#define USB_TXHUBADDR3_MULTTRAN 0x00000080 // Multiple Translators.
|
614 |
|
|
#define USB_TXHUBADDR3_ADDR_M 0x0000007F // Hub Address.
|
615 |
|
|
#define USB_TXHUBADDR3_ADDR_S 0
|
616 |
|
|
|
617 |
|
|
//*****************************************************************************
|
618 |
|
|
//
|
619 |
|
|
// The following are defines for the bit fields in the USB_O_TXHUBPORT3
|
620 |
|
|
// register.
|
621 |
|
|
//
|
622 |
|
|
//*****************************************************************************
|
623 |
|
|
#define USB_TXHUBPORT3_PORT_M 0x0000007F // Hub Port.
|
624 |
|
|
#define USB_TXHUBPORT3_PORT_S 0
|
625 |
|
|
|
626 |
|
|
//*****************************************************************************
|
627 |
|
|
//
|
628 |
|
|
// The following are defines for the bit fields in the USB_O_RXFUNCADDR3
|
629 |
|
|
// register.
|
630 |
|
|
//
|
631 |
|
|
//*****************************************************************************
|
632 |
|
|
#define USB_RXFUNCADDR3_ADDR_M 0x0000007F // Device Address.
|
633 |
|
|
#define USB_RXFUNCADDR3_ADDR_S 0
|
634 |
|
|
|
635 |
|
|
//*****************************************************************************
|
636 |
|
|
//
|
637 |
|
|
// The following are defines for the bit fields in the USB_O_RXHUBADDR3
|
638 |
|
|
// register.
|
639 |
|
|
//
|
640 |
|
|
//*****************************************************************************
|
641 |
|
|
#define USB_RXHUBADDR3_MULTTRAN 0x00000080 // Multiple Translators.
|
642 |
|
|
#define USB_RXHUBADDR3_ADDR_M 0x0000007F // Hub Address.
|
643 |
|
|
#define USB_RXHUBADDR3_ADDR_S 0
|
644 |
|
|
|
645 |
|
|
//*****************************************************************************
|
646 |
|
|
//
|
647 |
|
|
// The following are defines for the bit fields in the USB_O_RXHUBPORT3
|
648 |
|
|
// register.
|
649 |
|
|
//
|
650 |
|
|
//*****************************************************************************
|
651 |
|
|
#define USB_RXHUBPORT3_PORT_M 0x0000007F // Hub Port.
|
652 |
|
|
#define USB_RXHUBPORT3_PORT_S 0
|
653 |
|
|
|
654 |
|
|
//*****************************************************************************
|
655 |
|
|
//
|
656 |
|
|
// The following are defines for the bit fields in the USB_O_CSRL0 register.
|
657 |
|
|
//
|
658 |
|
|
//*****************************************************************************
|
659 |
|
|
#define USB_CSRL0_NAKTO 0x00000080 // NAK Timeout.
|
660 |
|
|
#define USB_CSRL0_SETENDC 0x00000080 // Setup End Clear.
|
661 |
|
|
#define USB_CSRL0_STATUS 0x00000040 // Status Packet.
|
662 |
|
|
#define USB_CSRL0_RXRDYC 0x00000040 // RXRDY Clear.
|
663 |
|
|
#define USB_CSRL0_REQPKT 0x00000020 // Request Packet.
|
664 |
|
|
#define USB_CSRL0_STALL 0x00000020 // Send Stall.
|
665 |
|
|
#define USB_CSRL0_SETEND 0x00000010 // Setup End.
|
666 |
|
|
#define USB_CSRL0_ERROR 0x00000010 // Error.
|
667 |
|
|
#define USB_CSRL0_DATAEND 0x00000008 // Data End.
|
668 |
|
|
#define USB_CSRL0_SETUP 0x00000008 // Setup Packet.
|
669 |
|
|
#define USB_CSRL0_STALLED 0x00000004 // Endpoint Stalled.
|
670 |
|
|
#define USB_CSRL0_TXRDY 0x00000002 // Transmit Packet Ready.
|
671 |
|
|
#define USB_CSRL0_RXRDY 0x00000001 // Receive Packet Ready.
|
672 |
|
|
|
673 |
|
|
//*****************************************************************************
|
674 |
|
|
//
|
675 |
|
|
// The following are defines for the bit fields in the USB_O_CSRH0 register.
|
676 |
|
|
//
|
677 |
|
|
//*****************************************************************************
|
678 |
|
|
#define USB_CSRH0_DTWE 0x00000004 // Data Toggle Write Enable.
|
679 |
|
|
#define USB_CSRH0_DT 0x00000002 // Data Toggle.
|
680 |
|
|
#define USB_CSRH0_FLUSH 0x00000001 // Flush FIFO.
|
681 |
|
|
|
682 |
|
|
//*****************************************************************************
|
683 |
|
|
//
|
684 |
|
|
// The following are defines for the bit fields in the USB_O_COUNT0 register.
|
685 |
|
|
//
|
686 |
|
|
//*****************************************************************************
|
687 |
|
|
#define USB_COUNT0_COUNT_M 0x0000007F // Count.
|
688 |
|
|
#define USB_COUNT0_COUNT_S 0
|
689 |
|
|
|
690 |
|
|
//*****************************************************************************
|
691 |
|
|
//
|
692 |
|
|
// The following are defines for the bit fields in the USB_O_TYPE0 register.
|
693 |
|
|
//
|
694 |
|
|
//*****************************************************************************
|
695 |
|
|
#define USB_TYPE0_SPEED_M 0x000000C0 // Operating Speed.
|
696 |
|
|
#define USB_TYPE0_SPEED_FULL 0x00000080 // Full
|
697 |
|
|
#define USB_TYPE0_SPEED_LOW 0x000000C0 // Low
|
698 |
|
|
|
699 |
|
|
//*****************************************************************************
|
700 |
|
|
//
|
701 |
|
|
// The following are defines for the bit fields in the USB_O_NAKLMT register.
|
702 |
|
|
//
|
703 |
|
|
//*****************************************************************************
|
704 |
|
|
#define USB_NAKLMT_NAKLMT_M 0x0000001F // EP0 NAK Limit.
|
705 |
|
|
#define USB_NAKLMT_NAKLMT_S 0
|
706 |
|
|
|
707 |
|
|
//*****************************************************************************
|
708 |
|
|
//
|
709 |
|
|
// The following are defines for the bit fields in the USB_O_TXMAXP1 register.
|
710 |
|
|
//
|
711 |
|
|
//*****************************************************************************
|
712 |
|
|
#define USB_TXMAXP1_MULT_M 0x0000F800 // Multiplier.
|
713 |
|
|
#define USB_TXMAXP1_MAXLOAD_M 0x000007FF // Maximum Payload.
|
714 |
|
|
#define USB_TXMAXP1_MULT_S 11
|
715 |
|
|
#define USB_TXMAXP1_MAXLOAD_S 0
|
716 |
|
|
|
717 |
|
|
//*****************************************************************************
|
718 |
|
|
//
|
719 |
|
|
// The following are defines for the bit fields in the USB_O_TXCSRL1 register.
|
720 |
|
|
//
|
721 |
|
|
//*****************************************************************************
|
722 |
|
|
#define USB_TXCSRL1_NAKTO 0x00000080 // NAK Timeout
|
723 |
|
|
#define USB_TXCSRL1_INCTX 0x00000080 // Incomplete Transmit.
|
724 |
|
|
#define USB_TXCSRL1_CLRDT 0x00000040 // Clear Data Toggle.
|
725 |
|
|
#define USB_TXCSRL1_STALLED 0x00000020 // Endpoint Stalled.
|
726 |
|
|
#define USB_TXCSRL1_STALL 0x00000010 // Send Stall.
|
727 |
|
|
#define USB_TXCSRL1_SETUP 0x00000010 // Setup Packet.
|
728 |
|
|
#define USB_TXCSRL1_FLUSH 0x00000008 // Flush FIFO.
|
729 |
|
|
#define USB_TXCSRL1_ERROR 0x00000004 // Error.
|
730 |
|
|
#define USB_TXCSRL1_UNDRN 0x00000004 // Underrun.
|
731 |
|
|
#define USB_TXCSRL1_FIFONE 0x00000002 // FIFO Not Empty.
|
732 |
|
|
#define USB_TXCSRL1_TXRDY 0x00000001 // Transmit Packet Ready.
|
733 |
|
|
|
734 |
|
|
//*****************************************************************************
|
735 |
|
|
//
|
736 |
|
|
// The following are defines for the bit fields in the USB_O_TXCSRH1 register.
|
737 |
|
|
//
|
738 |
|
|
//*****************************************************************************
|
739 |
|
|
#define USB_TXCSRH1_AUTOSET 0x00000080 // Auto Set.
|
740 |
|
|
#define USB_TXCSRH1_ISO 0x00000040 // ISO.
|
741 |
|
|
#define USB_TXCSRH1_MODE 0x00000020 // Mode.
|
742 |
|
|
#define USB_TXCSRH1_DMAEN 0x00000010 // DMA Request Enable.
|
743 |
|
|
#define USB_TXCSRH1_FDT 0x00000008 // Force Data Toggle.
|
744 |
|
|
#define USB_TXCSRH1_DMAMOD 0x00000004 // DMA Request Mode.
|
745 |
|
|
#define USB_TXCSRH1_DTWE 0x00000002 // Data Toggle Write Enable.
|
746 |
|
|
#define USB_TXCSRH1_DT 0x00000001 // Data Toggle.
|
747 |
|
|
|
748 |
|
|
//*****************************************************************************
|
749 |
|
|
//
|
750 |
|
|
// The following are defines for the bit fields in the USB_O_RXMAXP1 register.
|
751 |
|
|
//
|
752 |
|
|
//*****************************************************************************
|
753 |
|
|
#define USB_RXMAXP1_MULT_M 0x0000F800 // Multiplier.
|
754 |
|
|
#define USB_RXMAXP1_MAXLOAD_M 0x000007FF // Maximum Payload.
|
755 |
|
|
#define USB_RXMAXP1_MULT_S 11
|
756 |
|
|
#define USB_RXMAXP1_MAXLOAD_S 0
|
757 |
|
|
|
758 |
|
|
//*****************************************************************************
|
759 |
|
|
//
|
760 |
|
|
// The following are defines for the bit fields in the USB_O_RXCSRL1 register.
|
761 |
|
|
//
|
762 |
|
|
//*****************************************************************************
|
763 |
|
|
#define USB_RXCSRL1_CLRDT 0x00000080 // Clear Data Toggle.
|
764 |
|
|
#define USB_RXCSRL1_STALLED 0x00000040 // Endpoint Stalled.
|
765 |
|
|
#define USB_RXCSRL1_STALL 0x00000020 // Send Stall.
|
766 |
|
|
#define USB_RXCSRL1_REQPKT 0x00000020 // Request Packet.
|
767 |
|
|
#define USB_RXCSRL1_FLUSH 0x00000010 // Flush FIFO.
|
768 |
|
|
#define USB_RXCSRL1_DATAERR 0x00000008 // Data Error.
|
769 |
|
|
#define USB_RXCSRL1_NAKTO 0x00000008 // NAK Timeout.
|
770 |
|
|
#define USB_RXCSRL1_OVER 0x00000004 // Overrun.
|
771 |
|
|
#define USB_RXCSRL1_ERROR 0x00000004 // Error.
|
772 |
|
|
#define USB_RXCSRL1_FULL 0x00000002 // FIFO Full.
|
773 |
|
|
#define USB_RXCSRL1_RXRDY 0x00000001 // Receive Packet Ready.
|
774 |
|
|
|
775 |
|
|
//*****************************************************************************
|
776 |
|
|
//
|
777 |
|
|
// The following are defines for the bit fields in the USB_O_RXCSRH1 register.
|
778 |
|
|
//
|
779 |
|
|
//*****************************************************************************
|
780 |
|
|
#define USB_RXCSRH1_AUTOCL 0x00000080 // Auto Clear.
|
781 |
|
|
#define USB_RXCSRH1_AUTORQ 0x00000040 // Auto Request.
|
782 |
|
|
#define USB_RXCSRH1_ISO 0x00000040 // ISO.
|
783 |
|
|
#define USB_RXCSRH1_DMAEN 0x00000020 // DMA Request Enable.
|
784 |
|
|
#define USB_RXCSRH1_DISNYET 0x00000010 // Disable NYET
|
785 |
|
|
#define USB_RXCSRH1_PIDERR 0x00000010 // PID Error.
|
786 |
|
|
#define USB_RXCSRH1_DMAMOD 0x00000008 // DMA Request Mode.
|
787 |
|
|
#define USB_RXCSRH1_DTWE 0x00000004 // Data Toggle Write Enable.
|
788 |
|
|
#define USB_RXCSRH1_DT 0x00000002 // Data Toggle.
|
789 |
|
|
#define USB_RXCSRH1_INCRX 0x00000001 // Incomplete Receive.
|
790 |
|
|
|
791 |
|
|
//*****************************************************************************
|
792 |
|
|
//
|
793 |
|
|
// The following are defines for the bit fields in the USB_O_RXCOUNT1 register.
|
794 |
|
|
//
|
795 |
|
|
//*****************************************************************************
|
796 |
|
|
#define USB_RXCOUNT1_COUNT_M 0x00001FFF // Receive Packet Count.
|
797 |
|
|
#define USB_RXCOUNT1_COUNT_S 0
|
798 |
|
|
|
799 |
|
|
//*****************************************************************************
|
800 |
|
|
//
|
801 |
|
|
// The following are defines for the bit fields in the USB_O_TXTYPE1 register.
|
802 |
|
|
//
|
803 |
|
|
//*****************************************************************************
|
804 |
|
|
#define USB_TXTYPE1_SPEED_M 0x000000C0 // Operating Speed.
|
805 |
|
|
#define USB_TXTYPE1_SPEED_DFLT 0x00000000 // Default
|
806 |
|
|
#define USB_TXTYPE1_SPEED_FULL 0x00000080 // Full
|
807 |
|
|
#define USB_TXTYPE1_SPEED_LOW 0x000000C0 // Low
|
808 |
|
|
#define USB_TXTYPE1_PROTO_M 0x00000030 // Protocol.
|
809 |
|
|
#define USB_TXTYPE1_PROTO_CTRL 0x00000000 // Control
|
810 |
|
|
#define USB_TXTYPE1_PROTO_ISOC 0x00000010 // Isochronous
|
811 |
|
|
#define USB_TXTYPE1_PROTO_BULK 0x00000020 // Bulk
|
812 |
|
|
#define USB_TXTYPE1_PROTO_INT 0x00000030 // Interrupt
|
813 |
|
|
#define USB_TXTYPE1_TEP_M 0x0000000F // Target Endpoint Number.
|
814 |
|
|
#define USB_TXTYPE1_TEP_S 0
|
815 |
|
|
|
816 |
|
|
//*****************************************************************************
|
817 |
|
|
//
|
818 |
|
|
// The following are defines for the bit fields in the USB_O_TXINTERVAL1
|
819 |
|
|
// register.
|
820 |
|
|
//
|
821 |
|
|
//*****************************************************************************
|
822 |
|
|
#define USB_TXINTERVAL1_NAKLMT_M \
|
823 |
|
|
0x000000FF // NAK Limit.
|
824 |
|
|
#define USB_TXINTERVAL1_TXPOLL_M \
|
825 |
|
|
0x000000FF // TX Polling
|
826 |
|
|
#define USB_TXINTERVAL1_TXPOLL_S \
|
827 |
|
|
|
828 |
|
|
#define USB_TXINTERVAL1_NAKLMT_S \
|
829 |
|
|
|
830 |
|
|
|
831 |
|
|
//*****************************************************************************
|
832 |
|
|
//
|
833 |
|
|
// The following are defines for the bit fields in the USB_O_RXTYPE1 register.
|
834 |
|
|
//
|
835 |
|
|
//*****************************************************************************
|
836 |
|
|
#define USB_RXTYPE1_SPEED_M 0x000000C0 // Operating Speed.
|
837 |
|
|
#define USB_RXTYPE1_SPEED_DFLT 0x00000000 // Default
|
838 |
|
|
#define USB_RXTYPE1_SPEED_FULL 0x00000080 // Full
|
839 |
|
|
#define USB_RXTYPE1_SPEED_LOW 0x000000C0 // Low
|
840 |
|
|
#define USB_RXTYPE1_PROTO_M 0x00000030 // Protocol.
|
841 |
|
|
#define USB_RXTYPE1_PROTO_CTRL 0x00000000 // Control
|
842 |
|
|
#define USB_RXTYPE1_PROTO_ISOC 0x00000010 // Isochronous
|
843 |
|
|
#define USB_RXTYPE1_PROTO_BULK 0x00000020 // Bulk
|
844 |
|
|
#define USB_RXTYPE1_PROTO_INT 0x00000030 // Interrupt
|
845 |
|
|
#define USB_RXTYPE1_TEP_M 0x0000000F // Target Endpoint Number.
|
846 |
|
|
#define USB_RXTYPE1_TEP_S 0
|
847 |
|
|
|
848 |
|
|
//*****************************************************************************
|
849 |
|
|
//
|
850 |
|
|
// The following are defines for the bit fields in the USB_O_RXINTERVAL1
|
851 |
|
|
// register.
|
852 |
|
|
//
|
853 |
|
|
//*****************************************************************************
|
854 |
|
|
#define USB_RXINTERVAL1_TXPOLL_M \
|
855 |
|
|
0x000000FF // RX Polling
|
856 |
|
|
#define USB_RXINTERVAL1_NAKLMT_M \
|
857 |
|
|
0x000000FF // NAK Limit.
|
858 |
|
|
#define USB_RXINTERVAL1_TXPOLL_S \
|
859 |
|
|
|
860 |
|
|
#define USB_RXINTERVAL1_NAKLMT_S \
|
861 |
|
|
|
862 |
|
|
|
863 |
|
|
//*****************************************************************************
|
864 |
|
|
//
|
865 |
|
|
// The following are defines for the bit fields in the USB_O_TXMAXP2 register.
|
866 |
|
|
//
|
867 |
|
|
//*****************************************************************************
|
868 |
|
|
#define USB_TXMAXP2_MULT_M 0x0000F800 // Multiplier.
|
869 |
|
|
#define USB_TXMAXP2_MAXLOAD_M 0x000007FF // Maximum Payload.
|
870 |
|
|
#define USB_TXMAXP2_MULT_S 11
|
871 |
|
|
#define USB_TXMAXP2_MAXLOAD_S 0
|
872 |
|
|
|
873 |
|
|
//*****************************************************************************
|
874 |
|
|
//
|
875 |
|
|
// The following are defines for the bit fields in the USB_O_TXCSRL2 register.
|
876 |
|
|
//
|
877 |
|
|
//*****************************************************************************
|
878 |
|
|
#define USB_TXCSRL2_INCTX 0x00000080 // Incomplete Transmit.
|
879 |
|
|
#define USB_TXCSRL2_NAKTO 0x00000080 // NAK Timeout
|
880 |
|
|
#define USB_TXCSRL2_CLRDT 0x00000040 // Clear Data Toggle.
|
881 |
|
|
#define USB_TXCSRL2_STALLED 0x00000020 // Endpoint Stalled.
|
882 |
|
|
#define USB_TXCSRL2_SETUP 0x00000010 // Setup Packet.
|
883 |
|
|
#define USB_TXCSRL2_STALL 0x00000010 // Send Stall.
|
884 |
|
|
#define USB_TXCSRL2_FLUSH 0x00000008 // Flush FIFO.
|
885 |
|
|
#define USB_TXCSRL2_ERROR 0x00000004 // Error.
|
886 |
|
|
#define USB_TXCSRL2_UNDRN 0x00000004 // Underrun.
|
887 |
|
|
#define USB_TXCSRL2_FIFONE 0x00000002 // FIFO Not Empty.
|
888 |
|
|
#define USB_TXCSRL2_TXRDY 0x00000001 // Transmit Packet Ready.
|
889 |
|
|
|
890 |
|
|
//*****************************************************************************
|
891 |
|
|
//
|
892 |
|
|
// The following are defines for the bit fields in the USB_O_TXCSRH2 register.
|
893 |
|
|
//
|
894 |
|
|
//*****************************************************************************
|
895 |
|
|
#define USB_TXCSRH2_AUTOSET 0x00000080 // Auto Set.
|
896 |
|
|
#define USB_TXCSRH2_ISO 0x00000040 // ISO.
|
897 |
|
|
#define USB_TXCSRH2_MODE 0x00000020 // Mode.
|
898 |
|
|
#define USB_TXCSRH2_DMAEN 0x00000010 // DMA Request Enable.
|
899 |
|
|
#define USB_TXCSRH2_FDT 0x00000008 // Force Data Toggle.
|
900 |
|
|
#define USB_TXCSRH2_DMAMOD 0x00000004 // DMA Request Mode.
|
901 |
|
|
#define USB_TXCSRH2_DTWE 0x00000002 // Data Toggle Write Enable.
|
902 |
|
|
#define USB_TXCSRH2_DT 0x00000001 // Data Toggle.
|
903 |
|
|
|
904 |
|
|
//*****************************************************************************
|
905 |
|
|
//
|
906 |
|
|
// The following are defines for the bit fields in the USB_O_RXMAXP2 register.
|
907 |
|
|
//
|
908 |
|
|
//*****************************************************************************
|
909 |
|
|
#define USB_RXMAXP2_MULT_M 0x0000F800 // Multiplier.
|
910 |
|
|
#define USB_RXMAXP2_MAXLOAD_M 0x000007FF // Maximum Payload.
|
911 |
|
|
#define USB_RXMAXP2_MULT_S 11
|
912 |
|
|
#define USB_RXMAXP2_MAXLOAD_S 0
|
913 |
|
|
|
914 |
|
|
//*****************************************************************************
|
915 |
|
|
//
|
916 |
|
|
// The following are defines for the bit fields in the USB_O_RXCSRL2 register.
|
917 |
|
|
//
|
918 |
|
|
//*****************************************************************************
|
919 |
|
|
#define USB_RXCSRL2_CLRDT 0x00000080 // Clear Data Toggle.
|
920 |
|
|
#define USB_RXCSRL2_STALLED 0x00000040 // Endpoint Stalled.
|
921 |
|
|
#define USB_RXCSRL2_REQPKT 0x00000020 // Request Packet.
|
922 |
|
|
#define USB_RXCSRL2_STALL 0x00000020 // Send Stall.
|
923 |
|
|
#define USB_RXCSRL2_FLUSH 0x00000010 // Flush FIFO.
|
924 |
|
|
#define USB_RXCSRL2_DATAERR 0x00000008 // Data Error.
|
925 |
|
|
#define USB_RXCSRL2_NAKTO 0x00000008 // NAK Timeout.
|
926 |
|
|
#define USB_RXCSRL2_ERROR 0x00000004 // Error.
|
927 |
|
|
#define USB_RXCSRL2_OVER 0x00000004 // Overrun.
|
928 |
|
|
#define USB_RXCSRL2_FULL 0x00000002 // FIFO Full.
|
929 |
|
|
#define USB_RXCSRL2_RXRDY 0x00000001 // Receive Packet Ready.
|
930 |
|
|
|
931 |
|
|
//*****************************************************************************
|
932 |
|
|
//
|
933 |
|
|
// The following are defines for the bit fields in the USB_O_RXCSRH2 register.
|
934 |
|
|
//
|
935 |
|
|
//*****************************************************************************
|
936 |
|
|
#define USB_RXCSRH2_AUTOCL 0x00000080 // Auto Clear.
|
937 |
|
|
#define USB_RXCSRH2_AUTORQ 0x00000040 // Auto Request.
|
938 |
|
|
#define USB_RXCSRH2_ISO 0x00000040 // ISO.
|
939 |
|
|
#define USB_RXCSRH2_DMAEN 0x00000020 // DMA Request Enable.
|
940 |
|
|
#define USB_RXCSRH2_DISNYET 0x00000010 // Disable NYET
|
941 |
|
|
#define USB_RXCSRH2_PIDERR 0x00000010 // PID Error.
|
942 |
|
|
#define USB_RXCSRH2_DMAMOD 0x00000008 // DMA Request Mode.
|
943 |
|
|
#define USB_RXCSRH2_DTWE 0x00000004 // Data Toggle Write Enable.
|
944 |
|
|
#define USB_RXCSRH2_DT 0x00000002 // Data Toggle.
|
945 |
|
|
#define USB_RXCSRH2_INCRX 0x00000001 // Incomplete Receive.
|
946 |
|
|
|
947 |
|
|
//*****************************************************************************
|
948 |
|
|
//
|
949 |
|
|
// The following are defines for the bit fields in the USB_O_RXCOUNT2 register.
|
950 |
|
|
//
|
951 |
|
|
//*****************************************************************************
|
952 |
|
|
#define USB_RXCOUNT2_COUNT_M 0x00001FFF // Receive Packet Count.
|
953 |
|
|
#define USB_RXCOUNT2_COUNT_S 0
|
954 |
|
|
|
955 |
|
|
//*****************************************************************************
|
956 |
|
|
//
|
957 |
|
|
// The following are defines for the bit fields in the USB_O_TXTYPE2 register.
|
958 |
|
|
//
|
959 |
|
|
//*****************************************************************************
|
960 |
|
|
#define USB_TXTYPE2_SPEED_M 0x000000C0 // Operating Speed.
|
961 |
|
|
#define USB_TXTYPE2_SPEED_DFLT 0x00000000 // Default
|
962 |
|
|
#define USB_TXTYPE2_SPEED_FULL 0x00000080 // Full
|
963 |
|
|
#define USB_TXTYPE2_SPEED_LOW 0x000000C0 // Low
|
964 |
|
|
#define USB_TXTYPE2_PROTO_M 0x00000030 // Protocol.
|
965 |
|
|
#define USB_TXTYPE2_PROTO_CTRL 0x00000000 // Control
|
966 |
|
|
#define USB_TXTYPE2_PROTO_ISOC 0x00000010 // Isochronous
|
967 |
|
|
#define USB_TXTYPE2_PROTO_BULK 0x00000020 // Bulk
|
968 |
|
|
#define USB_TXTYPE2_PROTO_INT 0x00000030 // Interrupt
|
969 |
|
|
#define USB_TXTYPE2_TEP_M 0x0000000F // Target Endpoint Number.
|
970 |
|
|
#define USB_TXTYPE2_TEP_S 0
|
971 |
|
|
|
972 |
|
|
//*****************************************************************************
|
973 |
|
|
//
|
974 |
|
|
// The following are defines for the bit fields in the USB_O_TXINTERVAL2
|
975 |
|
|
// register.
|
976 |
|
|
//
|
977 |
|
|
//*****************************************************************************
|
978 |
|
|
#define USB_TXINTERVAL2_TXPOLL_M \
|
979 |
|
|
0x000000FF // TX Polling
|
980 |
|
|
#define USB_TXINTERVAL2_NAKLMT_M \
|
981 |
|
|
0x000000FF // NAK Limit.
|
982 |
|
|
#define USB_TXINTERVAL2_NAKLMT_S \
|
983 |
|
|
|
984 |
|
|
#define USB_TXINTERVAL2_TXPOLL_S \
|
985 |
|
|
|
986 |
|
|
|
987 |
|
|
//*****************************************************************************
|
988 |
|
|
//
|
989 |
|
|
// The following are defines for the bit fields in the USB_O_RXTYPE2 register.
|
990 |
|
|
//
|
991 |
|
|
//*****************************************************************************
|
992 |
|
|
#define USB_RXTYPE2_SPEED_M 0x000000C0 // Operating Speed.
|
993 |
|
|
#define USB_RXTYPE2_SPEED_DFLT 0x00000000 // Default
|
994 |
|
|
#define USB_RXTYPE2_SPEED_FULL 0x00000080 // Full
|
995 |
|
|
#define USB_RXTYPE2_SPEED_LOW 0x000000C0 // Low
|
996 |
|
|
#define USB_RXTYPE2_PROTO_M 0x00000030 // Protocol.
|
997 |
|
|
#define USB_RXTYPE2_PROTO_CTRL 0x00000000 // Control
|
998 |
|
|
#define USB_RXTYPE2_PROTO_ISOC 0x00000010 // Isochronous
|
999 |
|
|
#define USB_RXTYPE2_PROTO_BULK 0x00000020 // Bulk
|
1000 |
|
|
#define USB_RXTYPE2_PROTO_INT 0x00000030 // Interrupt
|
1001 |
|
|
#define USB_RXTYPE2_TEP_M 0x0000000F // Target Endpoint Number.
|
1002 |
|
|
#define USB_RXTYPE2_TEP_S 0
|
1003 |
|
|
|
1004 |
|
|
//*****************************************************************************
|
1005 |
|
|
//
|
1006 |
|
|
// The following are defines for the bit fields in the USB_O_RXINTERVAL2
|
1007 |
|
|
// register.
|
1008 |
|
|
//
|
1009 |
|
|
//*****************************************************************************
|
1010 |
|
|
#define USB_RXINTERVAL2_TXPOLL_M \
|
1011 |
|
|
0x000000FF // RX Polling
|
1012 |
|
|
#define USB_RXINTERVAL2_NAKLMT_M \
|
1013 |
|
|
0x000000FF // NAK Limit.
|
1014 |
|
|
#define USB_RXINTERVAL2_TXPOLL_S \
|
1015 |
|
|
|
1016 |
|
|
#define USB_RXINTERVAL2_NAKLMT_S \
|
1017 |
|
|
|
1018 |
|
|
|
1019 |
|
|
//*****************************************************************************
|
1020 |
|
|
//
|
1021 |
|
|
// The following are defines for the bit fields in the USB_O_TXMAXP3 register.
|
1022 |
|
|
//
|
1023 |
|
|
//*****************************************************************************
|
1024 |
|
|
#define USB_TXMAXP3_MULT_M 0x0000F800 // Multiplier.
|
1025 |
|
|
#define USB_TXMAXP3_MAXLOAD_M 0x000007FF // Maximum Payload.
|
1026 |
|
|
#define USB_TXMAXP3_MULT_S 11
|
1027 |
|
|
#define USB_TXMAXP3_MAXLOAD_S 0
|
1028 |
|
|
|
1029 |
|
|
//*****************************************************************************
|
1030 |
|
|
//
|
1031 |
|
|
// The following are defines for the bit fields in the USB_O_TXCSRL3 register.
|
1032 |
|
|
//
|
1033 |
|
|
//*****************************************************************************
|
1034 |
|
|
#define USB_TXCSRL3_INCTX 0x00000080 // Incomplete Transmit.
|
1035 |
|
|
#define USB_TXCSRL3_NAKTO 0x00000080 // NAK Timeout
|
1036 |
|
|
#define USB_TXCSRL3_CLRDT 0x00000040 // Clear Data Toggle.
|
1037 |
|
|
#define USB_TXCSRL3_STALLED 0x00000020 // Endpoint Stalled.
|
1038 |
|
|
#define USB_TXCSRL3_SETUP 0x00000010 // Setup Packet.
|
1039 |
|
|
#define USB_TXCSRL3_STALL 0x00000010 // Send Stall.
|
1040 |
|
|
#define USB_TXCSRL3_FLUSH 0x00000008 // Flush FIFO.
|
1041 |
|
|
#define USB_TXCSRL3_ERROR 0x00000004 // Error.
|
1042 |
|
|
#define USB_TXCSRL3_UNDRN 0x00000004 // Underrun.
|
1043 |
|
|
#define USB_TXCSRL3_FIFONE 0x00000002 // FIFO Not Empty.
|
1044 |
|
|
#define USB_TXCSRL3_TXRDY 0x00000001 // Transmit Packet Ready.
|
1045 |
|
|
|
1046 |
|
|
//*****************************************************************************
|
1047 |
|
|
//
|
1048 |
|
|
// The following are defines for the bit fields in the USB_O_TXCSRH3 register.
|
1049 |
|
|
//
|
1050 |
|
|
//*****************************************************************************
|
1051 |
|
|
#define USB_TXCSRH3_AUTOSET 0x00000080 // Auto Set.
|
1052 |
|
|
#define USB_TXCSRH3_ISO 0x00000040 // ISO.
|
1053 |
|
|
#define USB_TXCSRH3_MODE 0x00000020 // Mode.
|
1054 |
|
|
#define USB_TXCSRH3_DMAEN 0x00000010 // DMA Request Enable.
|
1055 |
|
|
#define USB_TXCSRH3_FDT 0x00000008 // Force Data Toggle.
|
1056 |
|
|
#define USB_TXCSRH3_DMAMOD 0x00000004 // DMA Request Mode.
|
1057 |
|
|
#define USB_TXCSRH3_DTWE 0x00000002 // Data Toggle Write Enable.
|
1058 |
|
|
#define USB_TXCSRH3_DT 0x00000001 // Data Toggle.
|
1059 |
|
|
|
1060 |
|
|
//*****************************************************************************
|
1061 |
|
|
//
|
1062 |
|
|
// The following are defines for the bit fields in the USB_O_RXMAXP3 register.
|
1063 |
|
|
//
|
1064 |
|
|
//*****************************************************************************
|
1065 |
|
|
#define USB_RXMAXP3_MULT_M 0x0000F800 // Multiplier.
|
1066 |
|
|
#define USB_RXMAXP3_MAXLOAD_M 0x000007FF // Maximum Payload.
|
1067 |
|
|
#define USB_RXMAXP3_MULT_S 11
|
1068 |
|
|
#define USB_RXMAXP3_MAXLOAD_S 0
|
1069 |
|
|
|
1070 |
|
|
//*****************************************************************************
|
1071 |
|
|
//
|
1072 |
|
|
// The following are defines for the bit fields in the USB_O_RXCSRL3 register.
|
1073 |
|
|
//
|
1074 |
|
|
//*****************************************************************************
|
1075 |
|
|
#define USB_RXCSRL3_CLRDT 0x00000080 // Clear Data Toggle.
|
1076 |
|
|
#define USB_RXCSRL3_STALLED 0x00000040 // Endpoint Stalled.
|
1077 |
|
|
#define USB_RXCSRL3_STALL 0x00000020 // Send Stall.
|
1078 |
|
|
#define USB_RXCSRL3_REQPKT 0x00000020 // Request Packet.
|
1079 |
|
|
#define USB_RXCSRL3_FLUSH 0x00000010 // Flush FIFO.
|
1080 |
|
|
#define USB_RXCSRL3_DATAERR 0x00000008 // Data Error.
|
1081 |
|
|
#define USB_RXCSRL3_NAKTO 0x00000008 // NAK Timeout.
|
1082 |
|
|
#define USB_RXCSRL3_ERROR 0x00000004 // Error.
|
1083 |
|
|
#define USB_RXCSRL3_OVER 0x00000004 // Overrun.
|
1084 |
|
|
#define USB_RXCSRL3_FULL 0x00000002 // FIFO Full.
|
1085 |
|
|
#define USB_RXCSRL3_RXRDY 0x00000001 // Receive Packet Ready.
|
1086 |
|
|
|
1087 |
|
|
//*****************************************************************************
|
1088 |
|
|
//
|
1089 |
|
|
// The following are defines for the bit fields in the USB_O_RXCSRH3 register.
|
1090 |
|
|
//
|
1091 |
|
|
//*****************************************************************************
|
1092 |
|
|
#define USB_RXCSRH3_AUTOCL 0x00000080 // Auto Clear.
|
1093 |
|
|
#define USB_RXCSRH3_AUTORQ 0x00000040 // Auto Request.
|
1094 |
|
|
#define USB_RXCSRH3_ISO 0x00000040 // ISO.
|
1095 |
|
|
#define USB_RXCSRH3_DMAEN 0x00000020 // DMA Request Enable.
|
1096 |
|
|
#define USB_RXCSRH3_DISNYET 0x00000010 // Disable NYET
|
1097 |
|
|
#define USB_RXCSRH3_PIDERR 0x00000010 // PID Error.
|
1098 |
|
|
#define USB_RXCSRH3_DMAMOD 0x00000008 // DMA Request Mode.
|
1099 |
|
|
#define USB_RXCSRH3_DTWE 0x00000004 // Data Toggle Write Enable.
|
1100 |
|
|
#define USB_RXCSRH3_DT 0x00000002 // Data Toggle.
|
1101 |
|
|
#define USB_RXCSRH3_INCRX 0x00000001 // Incomplete Receive.
|
1102 |
|
|
|
1103 |
|
|
//*****************************************************************************
|
1104 |
|
|
//
|
1105 |
|
|
// The following are defines for the bit fields in the USB_O_RXCOUNT3 register.
|
1106 |
|
|
//
|
1107 |
|
|
//*****************************************************************************
|
1108 |
|
|
#define USB_RXCOUNT3_COUNT_M 0x00001FFF // Receive Packet Count.
|
1109 |
|
|
#define USB_RXCOUNT3_COUNT_S 0
|
1110 |
|
|
|
1111 |
|
|
//*****************************************************************************
|
1112 |
|
|
//
|
1113 |
|
|
// The following are defines for the bit fields in the USB_O_TXTYPE3 register.
|
1114 |
|
|
//
|
1115 |
|
|
//*****************************************************************************
|
1116 |
|
|
#define USB_TXTYPE3_SPEED_M 0x000000C0 // Operating Speed.
|
1117 |
|
|
#define USB_TXTYPE3_SPEED_DFLT 0x00000000 // Default
|
1118 |
|
|
#define USB_TXTYPE3_SPEED_FULL 0x00000080 // Full
|
1119 |
|
|
#define USB_TXTYPE3_SPEED_LOW 0x000000C0 // Low
|
1120 |
|
|
#define USB_TXTYPE3_PROTO_M 0x00000030 // Protocol.
|
1121 |
|
|
#define USB_TXTYPE3_PROTO_CTRL 0x00000000 // Control
|
1122 |
|
|
#define USB_TXTYPE3_PROTO_ISOC 0x00000010 // Isochronous
|
1123 |
|
|
#define USB_TXTYPE3_PROTO_BULK 0x00000020 // Bulk
|
1124 |
|
|
#define USB_TXTYPE3_PROTO_INT 0x00000030 // Interrupt
|
1125 |
|
|
#define USB_TXTYPE3_TEP_M 0x0000000F // Target Endpoint Number.
|
1126 |
|
|
#define USB_TXTYPE3_TEP_S 0
|
1127 |
|
|
|
1128 |
|
|
//*****************************************************************************
|
1129 |
|
|
//
|
1130 |
|
|
// The following are defines for the bit fields in the USB_O_TXINTERVAL3
|
1131 |
|
|
// register.
|
1132 |
|
|
//
|
1133 |
|
|
//*****************************************************************************
|
1134 |
|
|
#define USB_TXINTERVAL3_TXPOLL_M \
|
1135 |
|
|
0x000000FF // TX Polling
|
1136 |
|
|
#define USB_TXINTERVAL3_NAKLMT_M \
|
1137 |
|
|
0x000000FF // NAK Limit.
|
1138 |
|
|
#define USB_TXINTERVAL3_TXPOLL_S \
|
1139 |
|
|
|
1140 |
|
|
#define USB_TXINTERVAL3_NAKLMT_S \
|
1141 |
|
|
|
1142 |
|
|
|
1143 |
|
|
//*****************************************************************************
|
1144 |
|
|
//
|
1145 |
|
|
// The following are defines for the bit fields in the USB_O_RXTYPE3 register.
|
1146 |
|
|
//
|
1147 |
|
|
//*****************************************************************************
|
1148 |
|
|
#define USB_RXTYPE3_SPEED_M 0x000000C0 // Operating Speed.
|
1149 |
|
|
#define USB_RXTYPE3_SPEED_DFLT 0x00000000 // Default
|
1150 |
|
|
#define USB_RXTYPE3_SPEED_FULL 0x00000080 // Full
|
1151 |
|
|
#define USB_RXTYPE3_SPEED_LOW 0x000000C0 // Low
|
1152 |
|
|
#define USB_RXTYPE3_PROTO_M 0x00000030 // Protocol.
|
1153 |
|
|
#define USB_RXTYPE3_PROTO_CTRL 0x00000000 // Control
|
1154 |
|
|
#define USB_RXTYPE3_PROTO_ISOC 0x00000010 // Isochronous
|
1155 |
|
|
#define USB_RXTYPE3_PROTO_BULK 0x00000020 // Bulk
|
1156 |
|
|
#define USB_RXTYPE3_PROTO_INT 0x00000030 // Interrupt
|
1157 |
|
|
#define USB_RXTYPE3_TEP_M 0x0000000F // Target Endpoint Number.
|
1158 |
|
|
#define USB_RXTYPE3_TEP_S 0
|
1159 |
|
|
|
1160 |
|
|
//*****************************************************************************
|
1161 |
|
|
//
|
1162 |
|
|
// The following are defines for the bit fields in the USB_O_RXINTERVAL3
|
1163 |
|
|
// register.
|
1164 |
|
|
//
|
1165 |
|
|
//*****************************************************************************
|
1166 |
|
|
#define USB_RXINTERVAL3_TXPOLL_M \
|
1167 |
|
|
0x000000FF // RX Polling
|
1168 |
|
|
#define USB_RXINTERVAL3_NAKLMT_M \
|
1169 |
|
|
0x000000FF // NAK Limit.
|
1170 |
|
|
#define USB_RXINTERVAL3_TXPOLL_S \
|
1171 |
|
|
|
1172 |
|
|
#define USB_RXINTERVAL3_NAKLMT_S \
|
1173 |
|
|
|
1174 |
|
|
|
1175 |
|
|
//*****************************************************************************
|
1176 |
|
|
//
|
1177 |
|
|
// The following are defines for the bit fields in the USB_O_RQPKTCOUNT1
|
1178 |
|
|
// register.
|
1179 |
|
|
//
|
1180 |
|
|
//*****************************************************************************
|
1181 |
|
|
#define USB_RQPKTCOUNT1_M 0x0000FFFF // Block Transfer Packet Count.
|
1182 |
|
|
#define USB_RQPKTCOUNT1_S 0
|
1183 |
|
|
|
1184 |
|
|
//*****************************************************************************
|
1185 |
|
|
//
|
1186 |
|
|
// The following are defines for the bit fields in the USB_O_RQPKTCOUNT2
|
1187 |
|
|
// register.
|
1188 |
|
|
//
|
1189 |
|
|
//*****************************************************************************
|
1190 |
|
|
#define USB_RQPKTCOUNT2_M 0x0000FFFF // Block Transfer Packet Count.
|
1191 |
|
|
#define USB_RQPKTCOUNT2_S 0
|
1192 |
|
|
|
1193 |
|
|
//*****************************************************************************
|
1194 |
|
|
//
|
1195 |
|
|
// The following are defines for the bit fields in the USB_O_RQPKTCOUNT3
|
1196 |
|
|
// register.
|
1197 |
|
|
//
|
1198 |
|
|
//*****************************************************************************
|
1199 |
|
|
#define USB_RQPKTCOUNT3_M 0x0000FFFF // Block Transfer Packet Count.
|
1200 |
|
|
#define USB_RQPKTCOUNT3_S 0
|
1201 |
|
|
|
1202 |
|
|
//*****************************************************************************
|
1203 |
|
|
//
|
1204 |
|
|
// The following are defines for the bit fields in the USB_O_RXDPKTBUFDIS
|
1205 |
|
|
// register.
|
1206 |
|
|
//
|
1207 |
|
|
//*****************************************************************************
|
1208 |
|
|
#define USB_RXDPKTBUFDIS_EP3 0x00000008 // EP3 RX Double-Packet Buffer
|
1209 |
|
|
// Disable.
|
1210 |
|
|
#define USB_RXDPKTBUFDIS_EP2 0x00000004 // EP2 RX Double-Packet Buffer
|
1211 |
|
|
// Disable.
|
1212 |
|
|
#define USB_RXDPKTBUFDIS_EP1 0x00000002 // EP1 RX Double-Packet Buffer
|
1213 |
|
|
// Disable.
|
1214 |
|
|
|
1215 |
|
|
//*****************************************************************************
|
1216 |
|
|
//
|
1217 |
|
|
// The following are defines for the bit fields in the USB_O_TXDPKTBUFDIS
|
1218 |
|
|
// register.
|
1219 |
|
|
//
|
1220 |
|
|
//*****************************************************************************
|
1221 |
|
|
#define USB_TXDPKTBUFDIS_EP3 0x00000008 // EP3 TX Double-Packet Buffer
|
1222 |
|
|
// Disable.
|
1223 |
|
|
#define USB_TXDPKTBUFDIS_EP2 0x00000004 // EP2 TX Double-Packet Buffer
|
1224 |
|
|
// Disable.
|
1225 |
|
|
#define USB_TXDPKTBUFDIS_EP1 0x00000002 // EP1 TX Double-Packet Buffer
|
1226 |
|
|
// Disable.
|
1227 |
|
|
|
1228 |
|
|
//*****************************************************************************
|
1229 |
|
|
//
|
1230 |
|
|
// The following are defines for the bit fields in the USB_O_EPC register.
|
1231 |
|
|
//
|
1232 |
|
|
//*****************************************************************************
|
1233 |
|
|
#define USB_EPC_PFLTACT_M 0x00000300 // Power Fault Action.
|
1234 |
|
|
#define USB_EPC_PFLTACT_UNCHG 0x00000000 // Unchanged
|
1235 |
|
|
#define USB_EPC_PFLTACT_TRIS 0x00000100 // Tristate
|
1236 |
|
|
#define USB_EPC_PFLTACT_LOW 0x00000200 // Low
|
1237 |
|
|
#define USB_EPC_PFLTACT_HIGH 0x00000300 // High
|
1238 |
|
|
#define USB_EPC_PFLTAEN 0x00000040 // Power Fault Action Enable.
|
1239 |
|
|
#define USB_EPC_PFLTSEN_HIGH 0x00000020 // Power Fault Sense.
|
1240 |
|
|
#define USB_EPC_PFLTEN 0x00000010 // Power Fault Input Enable.
|
1241 |
|
|
#define USB_EPC_EPENDE 0x00000004 // EPEN Drive Enable.
|
1242 |
|
|
#define USB_EPC_EPEN_M 0x00000003 // External Power Supply Enable
|
1243 |
|
|
// Configuration.
|
1244 |
|
|
#define USB_EPC_EPEN_LOW 0x00000000 // Power Enable Active Low
|
1245 |
|
|
#define USB_EPC_EPEN_HIGH 0x00000001 // Power Enable Active High
|
1246 |
|
|
#define USB_EPC_EPEN_VBLOW 0x00000002 // Power Enable High if VBUS Low
|
1247 |
|
|
#define USB_EPC_EPEN_VBHIGH 0x00000003 // Power Enable High if VBUS High
|
1248 |
|
|
|
1249 |
|
|
//*****************************************************************************
|
1250 |
|
|
//
|
1251 |
|
|
// The following are defines for the bit fields in the USB_O_EPCRIS register.
|
1252 |
|
|
//
|
1253 |
|
|
//*****************************************************************************
|
1254 |
|
|
#define USB_EPCRIS_PF 0x00000001 // USB Power Fault Interrupt
|
1255 |
|
|
// Status.
|
1256 |
|
|
|
1257 |
|
|
//*****************************************************************************
|
1258 |
|
|
//
|
1259 |
|
|
// The following are defines for the bit fields in the USB_O_EPCIM register.
|
1260 |
|
|
//
|
1261 |
|
|
//*****************************************************************************
|
1262 |
|
|
#define USB_EPCIM_PF 0x00000001 // USB Power Fault Interrupt Mask.
|
1263 |
|
|
|
1264 |
|
|
//*****************************************************************************
|
1265 |
|
|
//
|
1266 |
|
|
// The following are defines for the bit fields in the USB_O_EPCISC register.
|
1267 |
|
|
//
|
1268 |
|
|
//*****************************************************************************
|
1269 |
|
|
#define USB_EPCISC_PF 0x00000001 // USB Power Fault Interrupt Status
|
1270 |
|
|
// and Clear.
|
1271 |
|
|
|
1272 |
|
|
//*****************************************************************************
|
1273 |
|
|
//
|
1274 |
|
|
// The following are defines for the bit fields in the USB_O_DRRIS register.
|
1275 |
|
|
//
|
1276 |
|
|
//*****************************************************************************
|
1277 |
|
|
#define USB_DRRIS_RESUME 0x00000001 // Resume Interrupt Status.
|
1278 |
|
|
|
1279 |
|
|
//*****************************************************************************
|
1280 |
|
|
//
|
1281 |
|
|
// The following are defines for the bit fields in the USB_O_DRIM register.
|
1282 |
|
|
//
|
1283 |
|
|
//*****************************************************************************
|
1284 |
|
|
#define USB_DRIM_RESUME 0x00000001 // Resume Interrupt Mask.
|
1285 |
|
|
|
1286 |
|
|
//*****************************************************************************
|
1287 |
|
|
//
|
1288 |
|
|
// The following are defines for the bit fields in the USB_O_DRISC register.
|
1289 |
|
|
//
|
1290 |
|
|
//*****************************************************************************
|
1291 |
|
|
#define USB_DRISC_RESUME 0x00000001 // Resume Interrupt Status and
|
1292 |
|
|
// Clear.
|
1293 |
|
|
|
1294 |
|
|
//*****************************************************************************
|
1295 |
|
|
//
|
1296 |
|
|
// The following are defines for the bit fields in the USB_O_GPCS register.
|
1297 |
|
|
//
|
1298 |
|
|
//*****************************************************************************
|
1299 |
|
|
#define USB_GPCS_DEVMOD 0x00000001 // Device Mode.
|
1300 |
|
|
|
1301 |
|
|
//*****************************************************************************
|
1302 |
|
|
//
|
1303 |
|
|
// The following are defines for the bit fields in the USB_O_VPLEN register.
|
1304 |
|
|
//
|
1305 |
|
|
//*****************************************************************************
|
1306 |
|
|
#define USB_VPLEN_VPLEN_M 0x000000FF // VBus Pulse Length.
|
1307 |
|
|
#define USB_VPLEN_VPLEN_S 0
|
1308 |
|
|
|
1309 |
|
|
#endif // __HW_USB_H__
|