+/rtos

git clone https://git.julia.blue/+/rtos

Vivek Malneediusb mouse testda8d6f3

master
145.6 KiB3162 linesraw
1//*****************************************************************************
2//
3// hw_usb.h - Macros for use in accessing the USB registers.
4//
5// Copyright (c) 2007-2017 Texas Instruments Incorporated.  All rights reserved.
6// Software License Agreement
7//
8//   Redistribution and use in source and binary forms, with or without
9//   modification, are permitted provided that the following conditions
10//   are met:
11//
12//   Redistributions of source code must retain the above copyright
13//   notice, this list of conditions and the following disclaimer.
14//
15//   Redistributions in binary form must reproduce the above copyright
16//   notice, this list of conditions and the following disclaimer in the
17//   documentation and/or other materials provided with the
18//   distribution.
19//
20//   Neither the name of Texas Instruments Incorporated nor the names of
21//   its contributors may be used to endorse or promote products derived
22//   from this software without specific prior written permission.
23//
24// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35//
36// This is part of revision 2.1.4.178 of the Tiva Firmware Development Package.
37//
38//*****************************************************************************
39
40#ifndef __HW_USB_H__
41#define __HW_USB_H__
42
43//*****************************************************************************
44//
45// The following are defines for the Univeral Serial Bus register offsets.
46//
47//*****************************************************************************
48#define USB_O_FADDR 0x00000000       // USB Device Functional Address
49#define USB_O_POWER 0x00000001       // USB Power
50#define USB_O_TXIS 0x00000002        // USB Transmit Interrupt Status
51#define USB_O_RXIS 0x00000004        // USB Receive Interrupt Status
52#define USB_O_TXIE 0x00000006        // USB Transmit Interrupt Enable
53#define USB_O_RXIE 0x00000008        // USB Receive Interrupt Enable
54#define USB_O_IS 0x0000000A          // USB General Interrupt Status
55#define USB_O_IE 0x0000000B          // USB Interrupt Enable
56#define USB_O_FRAME 0x0000000C       // USB Frame Value
57#define USB_O_EPIDX 0x0000000E       // USB Endpoint Index
58#define USB_O_TEST 0x0000000F        // USB Test Mode
59#define USB_O_FIFO0 0x00000020       // USB FIFO Endpoint 0
60#define USB_O_FIFO1 0x00000024       // USB FIFO Endpoint 1
61#define USB_O_FIFO2 0x00000028       // USB FIFO Endpoint 2
62#define USB_O_FIFO3 0x0000002C       // USB FIFO Endpoint 3
63#define USB_O_FIFO4 0x00000030       // USB FIFO Endpoint 4
64#define USB_O_FIFO5 0x00000034       // USB FIFO Endpoint 5
65#define USB_O_FIFO6 0x00000038       // USB FIFO Endpoint 6
66#define USB_O_FIFO7 0x0000003C       // USB FIFO Endpoint 7
67#define USB_O_DEVCTL 0x00000060      // USB Device Control
68#define USB_O_CCONF 0x00000061       // USB Common Configuration
69#define USB_O_TXFIFOSZ 0x00000062    // USB Transmit Dynamic FIFO Sizing
70#define USB_O_RXFIFOSZ 0x00000063    // USB Receive Dynamic FIFO Sizing
71#define USB_O_TXFIFOADD 0x00000064   // USB Transmit FIFO Start Address
72#define USB_O_RXFIFOADD 0x00000066   // USB Receive FIFO Start Address
73#define USB_O_ULPIVBUSCTL 0x00000070 // USB ULPI VBUS Control
74#define USB_O_ULPIREGDATA 0x00000074 // USB ULPI Register Data
75#define USB_O_ULPIREGADDR 0x00000075 // USB ULPI Register Address
76#define USB_O_ULPIREGCTL 0x00000076  // USB ULPI Register Control
77#define USB_O_EPINFO 0x00000078      // USB Endpoint Information
78#define USB_O_RAMINFO 0x00000079     // USB RAM Information
79#define USB_O_CONTIM 0x0000007A      // USB Connect Timing
80#define USB_O_VPLEN 0x0000007B       // USB OTG VBUS Pulse Timing
81#define USB_O_HSEOF                                                            \
82    0x0000007C // USB High-Speed Last Transaction
83               // to End of Frame Timing
84#define USB_O_FSEOF                                                            \
85    0x0000007D // USB Full-Speed Last Transaction
86               // to End of Frame Timing
87#define USB_O_LSEOF                                                            \
88    0x0000007E // USB Low-Speed Last Transaction
89               // to End of Frame Timing
90#define USB_O_TXFUNCADDR0                                                      \
91    0x00000080 // USB Transmit Functional Address
92               // Endpoint 0
93#define USB_O_TXHUBADDR0                                                       \
94    0x00000082                      // USB Transmit Hub Address
95                                    // Endpoint 0
96#define USB_O_TXHUBPORT0 0x00000083 // USB Transmit Hub Port Endpoint 0
97#define USB_O_TXFUNCADDR1                                                      \
98    0x00000088 // USB Transmit Functional Address
99               // Endpoint 1
100#define USB_O_TXHUBADDR1                                                       \
101    0x0000008A                      // USB Transmit Hub Address
102                                    // Endpoint 1
103#define USB_O_TXHUBPORT1 0x0000008B // USB Transmit Hub Port Endpoint 1
104#define USB_O_RXFUNCADDR1                                                      \
105    0x0000008C // USB Receive Functional Address
106               // Endpoint 1
107#define USB_O_RXHUBADDR1                                                       \
108    0x0000008E                      // USB Receive Hub Address Endpoint
109                                    // 1
110#define USB_O_RXHUBPORT1 0x0000008F // USB Receive Hub Port Endpoint 1
111#define USB_O_TXFUNCADDR2                                                      \
112    0x00000090 // USB Transmit Functional Address
113               // Endpoint 2
114#define USB_O_TXHUBADDR2                                                       \
115    0x00000092                      // USB Transmit Hub Address
116                                    // Endpoint 2
117#define USB_O_TXHUBPORT2 0x00000093 // USB Transmit Hub Port Endpoint 2
118#define USB_O_RXFUNCADDR2                                                      \
119    0x00000094 // USB Receive Functional Address
120               // Endpoint 2
121#define USB_O_RXHUBADDR2                                                       \
122    0x00000096                      // USB Receive Hub Address Endpoint
123                                    // 2
124#define USB_O_RXHUBPORT2 0x00000097 // USB Receive Hub Port Endpoint 2
125#define USB_O_TXFUNCADDR3                                                      \
126    0x00000098 // USB Transmit Functional Address
127               // Endpoint 3
128#define USB_O_TXHUBADDR3                                                       \
129    0x0000009A                      // USB Transmit Hub Address
130                                    // Endpoint 3
131#define USB_O_TXHUBPORT3 0x0000009B // USB Transmit Hub Port Endpoint 3
132#define USB_O_RXFUNCADDR3                                                      \
133    0x0000009C // USB Receive Functional Address
134               // Endpoint 3
135#define USB_O_RXHUBADDR3                                                       \
136    0x0000009E                      // USB Receive Hub Address Endpoint
137                                    // 3
138#define USB_O_RXHUBPORT3 0x0000009F // USB Receive Hub Port Endpoint 3
139#define USB_O_TXFUNCADDR4                                                      \
140    0x000000A0 // USB Transmit Functional Address
141               // Endpoint 4
142#define USB_O_TXHUBADDR4                                                       \
143    0x000000A2                      // USB Transmit Hub Address
144                                    // Endpoint 4
145#define USB_O_TXHUBPORT4 0x000000A3 // USB Transmit Hub Port Endpoint 4
146#define USB_O_RXFUNCADDR4                                                      \
147    0x000000A4 // USB Receive Functional Address
148               // Endpoint 4
149#define USB_O_RXHUBADDR4                                                       \
150    0x000000A6                      // USB Receive Hub Address Endpoint
151                                    // 4
152#define USB_O_RXHUBPORT4 0x000000A7 // USB Receive Hub Port Endpoint 4
153#define USB_O_TXFUNCADDR5                                                      \
154    0x000000A8 // USB Transmit Functional Address
155               // Endpoint 5
156#define USB_O_TXHUBADDR5                                                       \
157    0x000000AA                      // USB Transmit Hub Address
158                                    // Endpoint 5
159#define USB_O_TXHUBPORT5 0x000000AB // USB Transmit Hub Port Endpoint 5
160#define USB_O_RXFUNCADDR5                                                      \
161    0x000000AC // USB Receive Functional Address
162               // Endpoint 5
163#define USB_O_RXHUBADDR5                                                       \
164    0x000000AE                      // USB Receive Hub Address Endpoint
165                                    // 5
166#define USB_O_RXHUBPORT5 0x000000AF // USB Receive Hub Port Endpoint 5
167#define USB_O_TXFUNCADDR6                                                      \
168    0x000000B0 // USB Transmit Functional Address
169               // Endpoint 6
170#define USB_O_TXHUBADDR6                                                       \
171    0x000000B2                      // USB Transmit Hub Address
172                                    // Endpoint 6
173#define USB_O_TXHUBPORT6 0x000000B3 // USB Transmit Hub Port Endpoint 6
174#define USB_O_RXFUNCADDR6                                                      \
175    0x000000B4 // USB Receive Functional Address
176               // Endpoint 6
177#define USB_O_RXHUBADDR6                                                       \
178    0x000000B6                      // USB Receive Hub Address Endpoint
179                                    // 6
180#define USB_O_RXHUBPORT6 0x000000B7 // USB Receive Hub Port Endpoint 6
181#define USB_O_TXFUNCADDR7                                                      \
182    0x000000B8 // USB Transmit Functional Address
183               // Endpoint 7
184#define USB_O_TXHUBADDR7                                                       \
185    0x000000BA                      // USB Transmit Hub Address
186                                    // Endpoint 7
187#define USB_O_TXHUBPORT7 0x000000BB // USB Transmit Hub Port Endpoint 7
188#define USB_O_RXFUNCADDR7                                                      \
189    0x000000BC // USB Receive Functional Address
190               // Endpoint 7
191#define USB_O_RXHUBADDR7                                                       \
192    0x000000BE                      // USB Receive Hub Address Endpoint
193                                    // 7
194#define USB_O_RXHUBPORT7 0x000000BF // USB Receive Hub Port Endpoint 7
195#define USB_O_CSRL0                                                            \
196    0x00000102 // USB Control and Status Endpoint
197               // 0 Low
198#define USB_O_CSRH0                                                            \
199    0x00000103 // USB Control and Status Endpoint
200               // 0 High
201#define USB_O_COUNT0                                                           \
202    0x00000108                  // USB Receive Byte Count Endpoint
203                                // 0
204#define USB_O_TYPE0 0x0000010A  // USB Type Endpoint 0
205#define USB_O_NAKLMT 0x0000010B // USB NAK Limit
206#define USB_O_TXMAXP1                                                          \
207    0x00000110 // USB Maximum Transmit Data
208               // Endpoint 1
209#define USB_O_TXCSRL1                                                          \
210    0x00000112 // USB Transmit Control and Status
211               // Endpoint 1 Low
212#define USB_O_TXCSRH1                                                          \
213    0x00000113 // USB Transmit Control and Status
214               // Endpoint 1 High
215#define USB_O_RXMAXP1                                                          \
216    0x00000114 // USB Maximum Receive Data
217               // Endpoint 1
218#define USB_O_RXCSRL1                                                          \
219    0x00000116 // USB Receive Control and Status
220               // Endpoint 1 Low
221#define USB_O_RXCSRH1                                                          \
222    0x00000117 // USB Receive Control and Status
223               // Endpoint 1 High
224#define USB_O_RXCOUNT1                                                         \
225    0x00000118 // USB Receive Byte Count Endpoint
226               // 1
227#define USB_O_TXTYPE1                                                          \
228    0x0000011A // USB Host Transmit Configure Type
229               // Endpoint 1
230#define USB_O_TXINTERVAL1                                                      \
231    0x0000011B // USB Host Transmit Interval
232               // Endpoint 1
233#define USB_O_RXTYPE1                                                          \
234    0x0000011C // USB Host Configure Receive Type
235               // Endpoint 1
236#define USB_O_RXINTERVAL1                                                      \
237    0x0000011D // USB Host Receive Polling
238               // Interval Endpoint 1
239#define USB_O_TXMAXP2                                                          \
240    0x00000120 // USB Maximum Transmit Data
241               // Endpoint 2
242#define USB_O_TXCSRL2                                                          \
243    0x00000122 // USB Transmit Control and Status
244               // Endpoint 2 Low
245#define USB_O_TXCSRH2                                                          \
246    0x00000123 // USB Transmit Control and Status
247               // Endpoint 2 High
248#define USB_O_RXMAXP2                                                          \
249    0x00000124 // USB Maximum Receive Data
250               // Endpoint 2
251#define USB_O_RXCSRL2                                                          \
252    0x00000126 // USB Receive Control and Status
253               // Endpoint 2 Low
254#define USB_O_RXCSRH2                                                          \
255    0x00000127 // USB Receive Control and Status
256               // Endpoint 2 High
257#define USB_O_RXCOUNT2                                                         \
258    0x00000128 // USB Receive Byte Count Endpoint
259               // 2
260#define USB_O_TXTYPE2                                                          \
261    0x0000012A // USB Host Transmit Configure Type
262               // Endpoint 2
263#define USB_O_TXINTERVAL2                                                      \
264    0x0000012B // USB Host Transmit Interval
265               // Endpoint 2
266#define USB_O_RXTYPE2                                                          \
267    0x0000012C // USB Host Configure Receive Type
268               // Endpoint 2
269#define USB_O_RXINTERVAL2                                                      \
270    0x0000012D // USB Host Receive Polling
271               // Interval Endpoint 2
272#define USB_O_TXMAXP3                                                          \
273    0x00000130 // USB Maximum Transmit Data
274               // Endpoint 3
275#define USB_O_TXCSRL3                                                          \
276    0x00000132 // USB Transmit Control and Status
277               // Endpoint 3 Low
278#define USB_O_TXCSRH3                                                          \
279    0x00000133 // USB Transmit Control and Status
280               // Endpoint 3 High
281#define USB_O_RXMAXP3                                                          \
282    0x00000134 // USB Maximum Receive Data
283               // Endpoint 3
284#define USB_O_RXCSRL3                                                          \
285    0x00000136 // USB Receive Control and Status
286               // Endpoint 3 Low
287#define USB_O_RXCSRH3                                                          \
288    0x00000137 // USB Receive Control and Status
289               // Endpoint 3 High
290#define USB_O_RXCOUNT3                                                         \
291    0x00000138 // USB Receive Byte Count Endpoint
292               // 3
293#define USB_O_TXTYPE3                                                          \
294    0x0000013A // USB Host Transmit Configure Type
295               // Endpoint 3
296#define USB_O_TXINTERVAL3                                                      \
297    0x0000013B // USB Host Transmit Interval
298               // Endpoint 3
299#define USB_O_RXTYPE3                                                          \
300    0x0000013C // USB Host Configure Receive Type
301               // Endpoint 3
302#define USB_O_RXINTERVAL3                                                      \
303    0x0000013D // USB Host Receive Polling
304               // Interval Endpoint 3
305#define USB_O_TXMAXP4                                                          \
306    0x00000140 // USB Maximum Transmit Data
307               // Endpoint 4
308#define USB_O_TXCSRL4                                                          \
309    0x00000142 // USB Transmit Control and Status
310               // Endpoint 4 Low
311#define USB_O_TXCSRH4                                                          \
312    0x00000143 // USB Transmit Control and Status
313               // Endpoint 4 High
314#define USB_O_RXMAXP4                                                          \
315    0x00000144 // USB Maximum Receive Data
316               // Endpoint 4
317#define USB_O_RXCSRL4                                                          \
318    0x00000146 // USB Receive Control and Status
319               // Endpoint 4 Low
320#define USB_O_RXCSRH4                                                          \
321    0x00000147 // USB Receive Control and Status
322               // Endpoint 4 High
323#define USB_O_RXCOUNT4                                                         \
324    0x00000148 // USB Receive Byte Count Endpoint
325               // 4
326#define USB_O_TXTYPE4                                                          \
327    0x0000014A // USB Host Transmit Configure Type
328               // Endpoint 4
329#define USB_O_TXINTERVAL4                                                      \
330    0x0000014B // USB Host Transmit Interval
331               // Endpoint 4
332#define USB_O_RXTYPE4                                                          \
333    0x0000014C // USB Host Configure Receive Type
334               // Endpoint 4
335#define USB_O_RXINTERVAL4                                                      \
336    0x0000014D // USB Host Receive Polling
337               // Interval Endpoint 4
338#define USB_O_TXMAXP5                                                          \
339    0x00000150 // USB Maximum Transmit Data
340               // Endpoint 5
341#define USB_O_TXCSRL5                                                          \
342    0x00000152 // USB Transmit Control and Status
343               // Endpoint 5 Low
344#define USB_O_TXCSRH5                                                          \
345    0x00000153 // USB Transmit Control and Status
346               // Endpoint 5 High
347#define USB_O_RXMAXP5                                                          \
348    0x00000154 // USB Maximum Receive Data
349               // Endpoint 5
350#define USB_O_RXCSRL5                                                          \
351    0x00000156 // USB Receive Control and Status
352               // Endpoint 5 Low
353#define USB_O_RXCSRH5                                                          \
354    0x00000157 // USB Receive Control and Status
355               // Endpoint 5 High
356#define USB_O_RXCOUNT5                                                         \
357    0x00000158 // USB Receive Byte Count Endpoint
358               // 5
359#define USB_O_TXTYPE5                                                          \
360    0x0000015A // USB Host Transmit Configure Type
361               // Endpoint 5
362#define USB_O_TXINTERVAL5                                                      \
363    0x0000015B // USB Host Transmit Interval
364               // Endpoint 5
365#define USB_O_RXTYPE5                                                          \
366    0x0000015C // USB Host Configure Receive Type
367               // Endpoint 5
368#define USB_O_RXINTERVAL5                                                      \
369    0x0000015D // USB Host Receive Polling
370               // Interval Endpoint 5
371#define USB_O_TXMAXP6                                                          \
372    0x00000160 // USB Maximum Transmit Data
373               // Endpoint 6
374#define USB_O_TXCSRL6                                                          \
375    0x00000162 // USB Transmit Control and Status
376               // Endpoint 6 Low
377#define USB_O_TXCSRH6                                                          \
378    0x00000163 // USB Transmit Control and Status
379               // Endpoint 6 High
380#define USB_O_RXMAXP6                                                          \
381    0x00000164 // USB Maximum Receive Data
382               // Endpoint 6
383#define USB_O_RXCSRL6                                                          \
384    0x00000166 // USB Receive Control and Status
385               // Endpoint 6 Low
386#define USB_O_RXCSRH6                                                          \
387    0x00000167 // USB Receive Control and Status
388               // Endpoint 6 High
389#define USB_O_RXCOUNT6                                                         \
390    0x00000168 // USB Receive Byte Count Endpoint
391               // 6
392#define USB_O_TXTYPE6                                                          \
393    0x0000016A // USB Host Transmit Configure Type
394               // Endpoint 6
395#define USB_O_TXINTERVAL6                                                      \
396    0x0000016B // USB Host Transmit Interval
397               // Endpoint 6
398#define USB_O_RXTYPE6                                                          \
399    0x0000016C // USB Host Configure Receive Type
400               // Endpoint 6
401#define USB_O_RXINTERVAL6                                                      \
402    0x0000016D // USB Host Receive Polling
403               // Interval Endpoint 6
404#define USB_O_TXMAXP7                                                          \
405    0x00000170 // USB Maximum Transmit Data
406               // Endpoint 7
407#define USB_O_TXCSRL7                                                          \
408    0x00000172 // USB Transmit Control and Status
409               // Endpoint 7 Low
410#define USB_O_TXCSRH7                                                          \
411    0x00000173 // USB Transmit Control and Status
412               // Endpoint 7 High
413#define USB_O_RXMAXP7                                                          \
414    0x00000174 // USB Maximum Receive Data
415               // Endpoint 7
416#define USB_O_RXCSRL7                                                          \
417    0x00000176 // USB Receive Control and Status
418               // Endpoint 7 Low
419#define USB_O_RXCSRH7                                                          \
420    0x00000177 // USB Receive Control and Status
421               // Endpoint 7 High
422#define USB_O_RXCOUNT7                                                         \
423    0x00000178 // USB Receive Byte Count Endpoint
424               // 7
425#define USB_O_TXTYPE7                                                          \
426    0x0000017A // USB Host Transmit Configure Type
427               // Endpoint 7
428#define USB_O_TXINTERVAL7                                                      \
429    0x0000017B // USB Host Transmit Interval
430               // Endpoint 7
431#define USB_O_RXTYPE7                                                          \
432    0x0000017C // USB Host Configure Receive Type
433               // Endpoint 7
434#define USB_O_RXINTERVAL7                                                      \
435    0x0000017D                     // USB Host Receive Polling
436                                   // Interval Endpoint 7
437#define USB_O_DMAINTR 0x00000200   // USB DMA Interrupt
438#define USB_O_DMACTL0 0x00000204   // USB DMA Control 0
439#define USB_O_DMAADDR0 0x00000208  // USB DMA Address 0
440#define USB_O_DMACOUNT0 0x0000020C // USB DMA Count 0
441#define USB_O_DMACTL1 0x00000214   // USB DMA Control 1
442#define USB_O_DMAADDR1 0x00000218  // USB DMA Address 1
443#define USB_O_DMACOUNT1 0x0000021C // USB DMA Count 1
444#define USB_O_DMACTL2 0x00000224   // USB DMA Control 2
445#define USB_O_DMAADDR2 0x00000228  // USB DMA Address 2
446#define USB_O_DMACOUNT2 0x0000022C // USB DMA Count 2
447#define USB_O_DMACTL3 0x00000234   // USB DMA Control 3
448#define USB_O_DMAADDR3 0x00000238  // USB DMA Address 3
449#define USB_O_DMACOUNT3 0x0000023C // USB DMA Count 3
450#define USB_O_DMACTL4 0x00000244   // USB DMA Control 4
451#define USB_O_DMAADDR4 0x00000248  // USB DMA Address 4
452#define USB_O_DMACOUNT4 0x0000024C // USB DMA Count 4
453#define USB_O_DMACTL5 0x00000254   // USB DMA Control 5
454#define USB_O_DMAADDR5 0x00000258  // USB DMA Address 5
455#define USB_O_DMACOUNT5 0x0000025C // USB DMA Count 5
456#define USB_O_DMACTL6 0x00000264   // USB DMA Control 6
457#define USB_O_DMAADDR6 0x00000268  // USB DMA Address 6
458#define USB_O_DMACOUNT6 0x0000026C // USB DMA Count 6
459#define USB_O_DMACTL7 0x00000274   // USB DMA Control 7
460#define USB_O_DMAADDR7 0x00000278  // USB DMA Address 7
461#define USB_O_DMACOUNT7 0x0000027C // USB DMA Count 7
462#define USB_O_RQPKTCOUNT1                                                      \
463    0x00000304 // USB Request Packet Count in
464               // Block Transfer Endpoint 1
465#define USB_O_RQPKTCOUNT2                                                      \
466    0x00000308 // USB Request Packet Count in
467               // Block Transfer Endpoint 2
468#define USB_O_RQPKTCOUNT3                                                      \
469    0x0000030C // USB Request Packet Count in
470               // Block Transfer Endpoint 3
471#define USB_O_RQPKTCOUNT4                                                      \
472    0x00000310 // USB Request Packet Count in
473               // Block Transfer Endpoint 4
474#define USB_O_RQPKTCOUNT5                                                      \
475    0x00000314 // USB Request Packet Count in
476               // Block Transfer Endpoint 5
477#define USB_O_RQPKTCOUNT6                                                      \
478    0x00000318 // USB Request Packet Count in
479               // Block Transfer Endpoint 6
480#define USB_O_RQPKTCOUNT7                                                      \
481    0x0000031C // USB Request Packet Count in
482               // Block Transfer Endpoint 7
483#define USB_O_RXDPKTBUFDIS                                                     \
484    0x00000340 // USB Receive Double Packet Buffer
485               // Disable
486#define USB_O_TXDPKTBUFDIS                                                     \
487    0x00000342               // USB Transmit Double Packet
488                             // Buffer Disable
489#define USB_O_CTO 0x00000344 // USB Chirp Timeout
490#define USB_O_HHSRTN                                                           \
491    0x00000346                    // USB High Speed to UTM Operating
492                                  // Delay
493#define USB_O_HSBT 0x00000348     // USB High Speed Time-out Adder
494#define USB_O_LPMATTR 0x00000360  // USB LPM Attributes
495#define USB_O_LPMCNTRL 0x00000362 // USB LPM Control
496#define USB_O_LPMIM 0x00000363    // USB LPM Interrupt Mask
497#define USB_O_LPMRIS 0x00000364   // USB LPM Raw Interrupt Status
498#define USB_O_LPMFADDR 0x00000365 // USB LPM Function Address
499#define USB_O_EPC 0x00000400      // USB External Power Control
500#define USB_O_EPCRIS                                                           \
501    0x00000404 // USB External Power Control Raw
502               // Interrupt Status
503#define USB_O_EPCIM                                                            \
504    0x00000408 // USB External Power Control
505               // Interrupt Mask
506#define USB_O_EPCISC                                                           \
507    0x0000040C // USB External Power Control
508               // Interrupt Status and Clear
509#define USB_O_DRRIS                                                            \
510    0x00000410                // USB Device RESUME Raw Interrupt
511                              // Status
512#define USB_O_DRIM 0x00000414 // USB Device RESUME Interrupt Mask
513#define USB_O_DRISC                                                            \
514    0x00000418 // USB Device RESUME Interrupt
515               // Status and Clear
516#define USB_O_GPCS                                                             \
517    0x0000041C               // USB General-Purpose Control and
518                             // Status
519#define USB_O_VDC 0x00000430 // USB VBUS Droop Control
520#define USB_O_VDCRIS                                                           \
521    0x00000434 // USB VBUS Droop Control Raw
522               // Interrupt Status
523#define USB_O_VDCIM                                                            \
524    0x00000438 // USB VBUS Droop Control Interrupt
525               // Mask
526#define USB_O_VDCISC                                                           \
527    0x0000043C // USB VBUS Droop Control Interrupt
528               // Status and Clear
529#define USB_O_IDVRIS                                                           \
530    0x00000444 // USB ID Valid Detect Raw
531               // Interrupt Status
532#define USB_O_IDVIM                                                            \
533    0x00000448 // USB ID Valid Detect Interrupt
534               // Mask
535#define USB_O_IDVISC                                                           \
536    0x0000044C                  // USB ID Valid Detect Interrupt
537                                // Status and Clear
538#define USB_O_DMASEL 0x00000450 // USB DMA Select
539#define USB_O_PP 0x00000FC0     // USB Peripheral Properties
540#define USB_O_PC 0x00000FC4     // USB Peripheral Configuration
541#define USB_O_CC 0x00000FC8     // USB Clock Configuration
542
543//*****************************************************************************
544//
545// The following are defines for the bit fields in the USB_O_FADDR register.
546//
547//*****************************************************************************
548#define USB_FADDR_M 0x0000007F // Function Address
549#define USB_FADDR_S 0
550
551//*****************************************************************************
552//
553// The following are defines for the bit fields in the USB_O_POWER register.
554//
555//*****************************************************************************
556#define USB_POWER_ISOUP 0x00000080    // Isochronous Update
557#define USB_POWER_SOFTCONN 0x00000040 // Soft Connect/Disconnect
558#define USB_POWER_HSENAB 0x00000020   // High Speed Enable
559#define USB_POWER_HSMODE 0x00000010   // High Speed Enable
560#define USB_POWER_RESET 0x00000008    // RESET Signaling
561#define USB_POWER_RESUME 0x00000004   // RESUME Signaling
562#define USB_POWER_SUSPEND 0x00000002  // SUSPEND Mode
563#define USB_POWER_PWRDNPHY 0x00000001 // Power Down PHY
564
565//*****************************************************************************
566//
567// The following are defines for the bit fields in the USB_O_TXIS register.
568//
569//*****************************************************************************
570#define USB_TXIS_EP7 0x00000080 // TX Endpoint 7 Interrupt
571#define USB_TXIS_EP6 0x00000040 // TX Endpoint 6 Interrupt
572#define USB_TXIS_EP5 0x00000020 // TX Endpoint 5 Interrupt
573#define USB_TXIS_EP4 0x00000010 // TX Endpoint 4 Interrupt
574#define USB_TXIS_EP3 0x00000008 // TX Endpoint 3 Interrupt
575#define USB_TXIS_EP2 0x00000004 // TX Endpoint 2 Interrupt
576#define USB_TXIS_EP1 0x00000002 // TX Endpoint 1 Interrupt
577#define USB_TXIS_EP0 0x00000001 // TX and RX Endpoint 0 Interrupt
578
579//*****************************************************************************
580//
581// The following are defines for the bit fields in the USB_O_RXIS register.
582//
583//*****************************************************************************
584#define USB_RXIS_EP7 0x00000080 // RX Endpoint 7 Interrupt
585#define USB_RXIS_EP6 0x00000040 // RX Endpoint 6 Interrupt
586#define USB_RXIS_EP5 0x00000020 // RX Endpoint 5 Interrupt
587#define USB_RXIS_EP4 0x00000010 // RX Endpoint 4 Interrupt
588#define USB_RXIS_EP3 0x00000008 // RX Endpoint 3 Interrupt
589#define USB_RXIS_EP2 0x00000004 // RX Endpoint 2 Interrupt
590#define USB_RXIS_EP1 0x00000002 // RX Endpoint 1 Interrupt
591
592//*****************************************************************************
593//
594// The following are defines for the bit fields in the USB_O_TXIE register.
595//
596//*****************************************************************************
597#define USB_TXIE_EP7 0x00000080 // TX Endpoint 7 Interrupt Enable
598#define USB_TXIE_EP6 0x00000040 // TX Endpoint 6 Interrupt Enable
599#define USB_TXIE_EP5 0x00000020 // TX Endpoint 5 Interrupt Enable
600#define USB_TXIE_EP4 0x00000010 // TX Endpoint 4 Interrupt Enable
601#define USB_TXIE_EP3 0x00000008 // TX Endpoint 3 Interrupt Enable
602#define USB_TXIE_EP2 0x00000004 // TX Endpoint 2 Interrupt Enable
603#define USB_TXIE_EP1 0x00000002 // TX Endpoint 1 Interrupt Enable
604#define USB_TXIE_EP0                                                           \
605    0x00000001 // TX and RX Endpoint 0 Interrupt
606               // Enable
607
608//*****************************************************************************
609//
610// The following are defines for the bit fields in the USB_O_RXIE register.
611//
612//*****************************************************************************
613#define USB_RXIE_EP7 0x00000080 // RX Endpoint 7 Interrupt Enable
614#define USB_RXIE_EP6 0x00000040 // RX Endpoint 6 Interrupt Enable
615#define USB_RXIE_EP5 0x00000020 // RX Endpoint 5 Interrupt Enable
616#define USB_RXIE_EP4 0x00000010 // RX Endpoint 4 Interrupt Enable
617#define USB_RXIE_EP3 0x00000008 // RX Endpoint 3 Interrupt Enable
618#define USB_RXIE_EP2 0x00000004 // RX Endpoint 2 Interrupt Enable
619#define USB_RXIE_EP1 0x00000002 // RX Endpoint 1 Interrupt Enable
620
621//*****************************************************************************
622//
623// The following are defines for the bit fields in the USB_O_IS register.
624//
625//*****************************************************************************
626#define USB_IS_VBUSERR 0x00000080 // VBUS Error (OTG only)
627#define USB_IS_SESREQ 0x00000040  // SESSION REQUEST (OTG only)
628#define USB_IS_DISCON 0x00000020  // Session Disconnect (OTG only)
629#define USB_IS_CONN 0x00000010    // Session Connect
630#define USB_IS_SOF 0x00000008     // Start of Frame
631#define USB_IS_BABBLE 0x00000004  // Babble Detected
632#define USB_IS_RESET 0x00000004   // RESET Signaling Detected
633#define USB_IS_RESUME 0x00000002  // RESUME Signaling Detected
634#define USB_IS_SUSPEND 0x00000001 // SUSPEND Signaling Detected
635
636//*****************************************************************************
637//
638// The following are defines for the bit fields in the USB_O_IE register.
639//
640//*****************************************************************************
641#define USB_IE_VBUSERR                                                         \
642    0x00000080 // Enable VBUS Error Interrupt (OTG
643               // only)
644#define USB_IE_SESREQ                                                          \
645    0x00000040                   // Enable Session Request (OTG
646                                 // only)
647#define USB_IE_DISCON 0x00000020 // Enable Disconnect Interrupt
648#define USB_IE_CONN 0x00000010   // Enable Connect Interrupt
649#define USB_IE_SOF 0x00000008    // Enable Start-of-Frame Interrupt
650#define USB_IE_BABBLE 0x00000004 // Enable Babble Interrupt
651#define USB_IE_RESET 0x00000004  // Enable RESET Interrupt
652#define USB_IE_RESUME 0x00000002 // Enable RESUME Interrupt
653#define USB_IE_SUSPND 0x00000001 // Enable SUSPEND Interrupt
654
655//*****************************************************************************
656//
657// The following are defines for the bit fields in the USB_O_FRAME register.
658//
659//*****************************************************************************
660#define USB_FRAME_M 0x000007FF // Frame Number
661#define USB_FRAME_S 0
662
663//*****************************************************************************
664//
665// The following are defines for the bit fields in the USB_O_EPIDX register.
666//
667//*****************************************************************************
668#define USB_EPIDX_EPIDX_M 0x0000000F // Endpoint Index
669#define USB_EPIDX_EPIDX_S 0
670
671//*****************************************************************************
672//
673// The following are defines for the bit fields in the USB_O_TEST register.
674//
675//*****************************************************************************
676#define USB_TEST_FORCEH 0x00000080     // Force Host Mode
677#define USB_TEST_FIFOACC 0x00000040    // FIFO Access
678#define USB_TEST_FORCEFS 0x00000020    // Force Full-Speed Mode
679#define USB_TEST_FORCEHS 0x00000010    // Force High-Speed Mode
680#define USB_TEST_TESTPKT 0x00000008    // Test Packet Mode Enable
681#define USB_TEST_TESTK 0x00000004      // Test_K Mode Enable
682#define USB_TEST_TESTJ 0x00000002      // Test_J Mode Enable
683#define USB_TEST_TESTSE0NAK 0x00000001 // Test_SE0_NAK Test Mode Enable
684
685//*****************************************************************************
686//
687// The following are defines for the bit fields in the USB_O_FIFO0 register.
688//
689//*****************************************************************************
690#define USB_FIFO0_EPDATA_M 0xFFFFFFFF // Endpoint Data
691#define USB_FIFO0_EPDATA_S 0
692
693//*****************************************************************************
694//
695// The following are defines for the bit fields in the USB_O_FIFO1 register.
696//
697//*****************************************************************************
698#define USB_FIFO1_EPDATA_M 0xFFFFFFFF // Endpoint Data
699#define USB_FIFO1_EPDATA_S 0
700
701//*****************************************************************************
702//
703// The following are defines for the bit fields in the USB_O_FIFO2 register.
704//
705//*****************************************************************************
706#define USB_FIFO2_EPDATA_M 0xFFFFFFFF // Endpoint Data
707#define USB_FIFO2_EPDATA_S 0
708
709//*****************************************************************************
710//
711// The following are defines for the bit fields in the USB_O_FIFO3 register.
712//
713//*****************************************************************************
714#define USB_FIFO3_EPDATA_M 0xFFFFFFFF // Endpoint Data
715#define USB_FIFO3_EPDATA_S 0
716
717//*****************************************************************************
718//
719// The following are defines for the bit fields in the USB_O_FIFO4 register.
720//
721//*****************************************************************************
722#define USB_FIFO4_EPDATA_M 0xFFFFFFFF // Endpoint Data
723#define USB_FIFO4_EPDATA_S 0
724
725//*****************************************************************************
726//
727// The following are defines for the bit fields in the USB_O_FIFO5 register.
728//
729//*****************************************************************************
730#define USB_FIFO5_EPDATA_M 0xFFFFFFFF // Endpoint Data
731#define USB_FIFO5_EPDATA_S 0
732
733//*****************************************************************************
734//
735// The following are defines for the bit fields in the USB_O_FIFO6 register.
736//
737//*****************************************************************************
738#define USB_FIFO6_EPDATA_M 0xFFFFFFFF // Endpoint Data
739#define USB_FIFO6_EPDATA_S 0
740
741//*****************************************************************************
742//
743// The following are defines for the bit fields in the USB_O_FIFO7 register.
744//
745//*****************************************************************************
746#define USB_FIFO7_EPDATA_M 0xFFFFFFFF // Endpoint Data
747#define USB_FIFO7_EPDATA_S 0
748
749//*****************************************************************************
750//
751// The following are defines for the bit fields in the USB_O_DEVCTL register.
752//
753//*****************************************************************************
754#define USB_DEVCTL_DEV 0x00000080         // Device Mode (OTG only)
755#define USB_DEVCTL_FSDEV 0x00000040       // Full-Speed Device Detected
756#define USB_DEVCTL_LSDEV 0x00000020       // Low-Speed Device Detected
757#define USB_DEVCTL_VBUS_M 0x00000018      // VBUS Level (OTG only)
758#define USB_DEVCTL_VBUS_NONE 0x00000000   // Below SessionEnd
759#define USB_DEVCTL_VBUS_SEND 0x00000008   // Above SessionEnd, below AValid
760#define USB_DEVCTL_VBUS_AVALID 0x00000010 // Above AValid, below VBUSValid
761#define USB_DEVCTL_VBUS_VALID 0x00000018  // Above VBUSValid
762#define USB_DEVCTL_HOST 0x00000004        // Host Mode
763#define USB_DEVCTL_HOSTREQ 0x00000002     // Host Request (OTG only)
764#define USB_DEVCTL_SESSION 0x00000001     // Session Start/End (OTG only)
765
766//*****************************************************************************
767//
768// The following are defines for the bit fields in the USB_O_CCONF register.
769//
770//*****************************************************************************
771#define USB_CCONF_TXEDMA 0x00000002 // TX Early DMA Enable
772#define USB_CCONF_RXEDMA 0x00000001 // TX Early DMA Enable
773
774//*****************************************************************************
775//
776// The following are defines for the bit fields in the USB_O_TXFIFOSZ register.
777//
778//*****************************************************************************
779#define USB_TXFIFOSZ_DPB 0x00000010       // Double Packet Buffer Support
780#define USB_TXFIFOSZ_SIZE_M 0x0000000F    // Max Packet Size
781#define USB_TXFIFOSZ_SIZE_8 0x00000000    // 8
782#define USB_TXFIFOSZ_SIZE_16 0x00000001   // 16
783#define USB_TXFIFOSZ_SIZE_32 0x00000002   // 32
784#define USB_TXFIFOSZ_SIZE_64 0x00000003   // 64
785#define USB_TXFIFOSZ_SIZE_128 0x00000004  // 128
786#define USB_TXFIFOSZ_SIZE_256 0x00000005  // 256
787#define USB_TXFIFOSZ_SIZE_512 0x00000006  // 512
788#define USB_TXFIFOSZ_SIZE_1024 0x00000007 // 1024
789#define USB_TXFIFOSZ_SIZE_2048 0x00000008 // 2048
790
791//*****************************************************************************
792//
793// The following are defines for the bit fields in the USB_O_RXFIFOSZ register.
794//
795//*****************************************************************************
796#define USB_RXFIFOSZ_DPB 0x00000010       // Double Packet Buffer Support
797#define USB_RXFIFOSZ_SIZE_M 0x0000000F    // Max Packet Size
798#define USB_RXFIFOSZ_SIZE_8 0x00000000    // 8
799#define USB_RXFIFOSZ_SIZE_16 0x00000001   // 16
800#define USB_RXFIFOSZ_SIZE_32 0x00000002   // 32
801#define USB_RXFIFOSZ_SIZE_64 0x00000003   // 64
802#define USB_RXFIFOSZ_SIZE_128 0x00000004  // 128
803#define USB_RXFIFOSZ_SIZE_256 0x00000005  // 256
804#define USB_RXFIFOSZ_SIZE_512 0x00000006  // 512
805#define USB_RXFIFOSZ_SIZE_1024 0x00000007 // 1024
806#define USB_RXFIFOSZ_SIZE_2048 0x00000008 // 2048
807
808//*****************************************************************************
809//
810// The following are defines for the bit fields in the USB_O_TXFIFOADD
811// register.
812//
813//*****************************************************************************
814#define USB_TXFIFOADD_ADDR_M 0x000001FF // Transmit/Receive Start Address
815#define USB_TXFIFOADD_ADDR_S 0
816
817//*****************************************************************************
818//
819// The following are defines for the bit fields in the USB_O_RXFIFOADD
820// register.
821//
822//*****************************************************************************
823#define USB_RXFIFOADD_ADDR_M 0x000001FF // Transmit/Receive Start Address
824#define USB_RXFIFOADD_ADDR_S 0
825
826//*****************************************************************************
827//
828// The following are defines for the bit fields in the USB_O_ULPIVBUSCTL
829// register.
830//
831//*****************************************************************************
832#define USB_ULPIVBUSCTL_USEEXTVBUSIND 0x00000002 // Use External VBUS Indicator
833#define USB_ULPIVBUSCTL_USEEXTVBUS 0x00000001    // Use External VBUS
834
835//*****************************************************************************
836//
837// The following are defines for the bit fields in the USB_O_ULPIREGDATA
838// register.
839//
840//*****************************************************************************
841#define USB_ULPIREGDATA_REGDATA_M 0x000000FF // Register Data
842#define USB_ULPIREGDATA_REGDATA_S 0
843
844//*****************************************************************************
845//
846// The following are defines for the bit fields in the USB_O_ULPIREGADDR
847// register.
848//
849//*****************************************************************************
850#define USB_ULPIREGADDR_ADDR_M 0x000000FF // Register Address
851#define USB_ULPIREGADDR_ADDR_S 0
852
853//*****************************************************************************
854//
855// The following are defines for the bit fields in the USB_O_ULPIREGCTL
856// register.
857//
858//*****************************************************************************
859#define USB_ULPIREGCTL_RDWR 0x00000004     // Read/Write Control
860#define USB_ULPIREGCTL_REGCMPLT 0x00000002 // Register Access Complete
861#define USB_ULPIREGCTL_REGACC 0x00000001   // Initiate Register Access
862
863//*****************************************************************************
864//
865// The following are defines for the bit fields in the USB_O_EPINFO register.
866//
867//*****************************************************************************
868#define USB_EPINFO_RXEP_M 0x000000F0 // RX Endpoints
869#define USB_EPINFO_TXEP_M 0x0000000F // TX Endpoints
870#define USB_EPINFO_RXEP_S 4
871#define USB_EPINFO_TXEP_S 0
872
873//*****************************************************************************
874//
875// The following are defines for the bit fields in the USB_O_RAMINFO register.
876//
877//*****************************************************************************
878#define USB_RAMINFO_DMACHAN_M 0x000000F0 // DMA Channels
879#define USB_RAMINFO_RAMBITS_M 0x0000000F // RAM Address Bus Width
880#define USB_RAMINFO_DMACHAN_S 4
881#define USB_RAMINFO_RAMBITS_S 0
882
883//*****************************************************************************
884//
885// The following are defines for the bit fields in the USB_O_CONTIM register.
886//
887//*****************************************************************************
888#define USB_CONTIM_WTCON_M 0x000000F0 // Connect Wait
889#define USB_CONTIM_WTID_M 0x0000000F  // Wait ID
890#define USB_CONTIM_WTCON_S 4
891#define USB_CONTIM_WTID_S 0
892
893//*****************************************************************************
894//
895// The following are defines for the bit fields in the USB_O_VPLEN register.
896//
897//*****************************************************************************
898#define USB_VPLEN_VPLEN_M 0x000000FF // VBUS Pulse Length
899#define USB_VPLEN_VPLEN_S 0
900
901//*****************************************************************************
902//
903// The following are defines for the bit fields in the USB_O_HSEOF register.
904//
905//*****************************************************************************
906#define USB_HSEOF_HSEOFG_M 0x000000FF // HIgh-Speed End-of-Frame Gap
907#define USB_HSEOF_HSEOFG_S 0
908
909//*****************************************************************************
910//
911// The following are defines for the bit fields in the USB_O_FSEOF register.
912//
913//*****************************************************************************
914#define USB_FSEOF_FSEOFG_M 0x000000FF // Full-Speed End-of-Frame Gap
915#define USB_FSEOF_FSEOFG_S 0
916
917//*****************************************************************************
918//
919// The following are defines for the bit fields in the USB_O_LSEOF register.
920//
921//*****************************************************************************
922#define USB_LSEOF_LSEOFG_M 0x000000FF // Low-Speed End-of-Frame Gap
923#define USB_LSEOF_LSEOFG_S 0
924
925//*****************************************************************************
926//
927// The following are defines for the bit fields in the USB_O_TXFUNCADDR0
928// register.
929//
930//*****************************************************************************
931#define USB_TXFUNCADDR0_ADDR_M 0x0000007F // Device Address
932#define USB_TXFUNCADDR0_ADDR_S 0
933
934//*****************************************************************************
935//
936// The following are defines for the bit fields in the USB_O_TXHUBADDR0
937// register.
938//
939//*****************************************************************************
940#define USB_TXHUBADDR0_ADDR_M 0x0000007F // Hub Address
941#define USB_TXHUBADDR0_ADDR_S 0
942
943//*****************************************************************************
944//
945// The following are defines for the bit fields in the USB_O_TXHUBPORT0
946// register.
947//
948//*****************************************************************************
949#define USB_TXHUBPORT0_PORT_M 0x0000007F // Hub Port
950#define USB_TXHUBPORT0_PORT_S 0
951
952//*****************************************************************************
953//
954// The following are defines for the bit fields in the USB_O_TXFUNCADDR1
955// register.
956//
957//*****************************************************************************
958#define USB_TXFUNCADDR1_ADDR_M 0x0000007F // Device Address
959#define USB_TXFUNCADDR1_ADDR_S 0
960
961//*****************************************************************************
962//
963// The following are defines for the bit fields in the USB_O_TXHUBADDR1
964// register.
965//
966//*****************************************************************************
967#define USB_TXHUBADDR1_ADDR_M 0x0000007F // Hub Address
968#define USB_TXHUBADDR1_ADDR_S 0
969
970//*****************************************************************************
971//
972// The following are defines for the bit fields in the USB_O_TXHUBPORT1
973// register.
974//
975//*****************************************************************************
976#define USB_TXHUBPORT1_PORT_M 0x0000007F // Hub Port
977#define USB_TXHUBPORT1_PORT_S 0
978
979//*****************************************************************************
980//
981// The following are defines for the bit fields in the USB_O_RXFUNCADDR1
982// register.
983//
984//*****************************************************************************
985#define USB_RXFUNCADDR1_ADDR_M 0x0000007F // Device Address
986#define USB_RXFUNCADDR1_ADDR_S 0
987
988//*****************************************************************************
989//
990// The following are defines for the bit fields in the USB_O_RXHUBADDR1
991// register.
992//
993//*****************************************************************************
994#define USB_RXHUBADDR1_ADDR_M 0x0000007F // Hub Address
995#define USB_RXHUBADDR1_ADDR_S 0
996
997//*****************************************************************************
998//
999// The following are defines for the bit fields in the USB_O_RXHUBPORT1
1000// register.
1001//
1002//*****************************************************************************
1003#define USB_RXHUBPORT1_PORT_M 0x0000007F // Hub Port
1004#define USB_RXHUBPORT1_PORT_S 0
1005
1006//*****************************************************************************
1007//
1008// The following are defines for the bit fields in the USB_O_TXFUNCADDR2
1009// register.
1010//
1011//*****************************************************************************
1012#define USB_TXFUNCADDR2_ADDR_M 0x0000007F // Device Address
1013#define USB_TXFUNCADDR2_ADDR_S 0
1014
1015//*****************************************************************************
1016//
1017// The following are defines for the bit fields in the USB_O_TXHUBADDR2
1018// register.
1019//
1020//*****************************************************************************
1021#define USB_TXHUBADDR2_ADDR_M 0x0000007F // Hub Address
1022#define USB_TXHUBADDR2_ADDR_S 0
1023
1024//*****************************************************************************
1025//
1026// The following are defines for the bit fields in the USB_O_TXHUBPORT2
1027// register.
1028//
1029//*****************************************************************************
1030#define USB_TXHUBPORT2_PORT_M 0x0000007F // Hub Port
1031#define USB_TXHUBPORT2_PORT_S 0
1032
1033//*****************************************************************************
1034//
1035// The following are defines for the bit fields in the USB_O_RXFUNCADDR2
1036// register.
1037//
1038//*****************************************************************************
1039#define USB_RXFUNCADDR2_ADDR_M 0x0000007F // Device Address
1040#define USB_RXFUNCADDR2_ADDR_S 0
1041
1042//*****************************************************************************
1043//
1044// The following are defines for the bit fields in the USB_O_RXHUBADDR2
1045// register.
1046//
1047//*****************************************************************************
1048#define USB_RXHUBADDR2_ADDR_M 0x0000007F // Hub Address
1049#define USB_RXHUBADDR2_ADDR_S 0
1050
1051//*****************************************************************************
1052//
1053// The following are defines for the bit fields in the USB_O_RXHUBPORT2
1054// register.
1055//
1056//*****************************************************************************
1057#define USB_RXHUBPORT2_PORT_M 0x0000007F // Hub Port
1058#define USB_RXHUBPORT2_PORT_S 0
1059
1060//*****************************************************************************
1061//
1062// The following are defines for the bit fields in the USB_O_TXFUNCADDR3
1063// register.
1064//
1065//*****************************************************************************
1066#define USB_TXFUNCADDR3_ADDR_M 0x0000007F // Device Address
1067#define USB_TXFUNCADDR3_ADDR_S 0
1068
1069//*****************************************************************************
1070//
1071// The following are defines for the bit fields in the USB_O_TXHUBADDR3
1072// register.
1073//
1074//*****************************************************************************
1075#define USB_TXHUBADDR3_ADDR_M 0x0000007F // Hub Address
1076#define USB_TXHUBADDR3_ADDR_S 0
1077
1078//*****************************************************************************
1079//
1080// The following are defines for the bit fields in the USB_O_TXHUBPORT3
1081// register.
1082//
1083//*****************************************************************************
1084#define USB_TXHUBPORT3_PORT_M 0x0000007F // Hub Port
1085#define USB_TXHUBPORT3_PORT_S 0
1086
1087//*****************************************************************************
1088//
1089// The following are defines for the bit fields in the USB_O_RXFUNCADDR3
1090// register.
1091//
1092//*****************************************************************************
1093#define USB_RXFUNCADDR3_ADDR_M 0x0000007F // Device Address
1094#define USB_RXFUNCADDR3_ADDR_S 0
1095
1096//*****************************************************************************
1097//
1098// The following are defines for the bit fields in the USB_O_RXHUBADDR3
1099// register.
1100//
1101//*****************************************************************************
1102#define USB_RXHUBADDR3_ADDR_M 0x0000007F // Hub Address
1103#define USB_RXHUBADDR3_ADDR_S 0
1104
1105//*****************************************************************************
1106//
1107// The following are defines for the bit fields in the USB_O_RXHUBPORT3
1108// register.
1109//
1110//*****************************************************************************
1111#define USB_RXHUBPORT3_PORT_M 0x0000007F // Hub Port
1112#define USB_RXHUBPORT3_PORT_S 0
1113
1114//*****************************************************************************
1115//
1116// The following are defines for the bit fields in the USB_O_TXFUNCADDR4
1117// register.
1118//
1119//*****************************************************************************
1120#define USB_TXFUNCADDR4_ADDR_M 0x0000007F // Device Address
1121#define USB_TXFUNCADDR4_ADDR_S 0
1122
1123//*****************************************************************************
1124//
1125// The following are defines for the bit fields in the USB_O_TXHUBADDR4
1126// register.
1127//
1128//*****************************************************************************
1129#define USB_TXHUBADDR4_ADDR_M 0x0000007F // Hub Address
1130#define USB_TXHUBADDR4_ADDR_S 0
1131
1132//*****************************************************************************
1133//
1134// The following are defines for the bit fields in the USB_O_TXHUBPORT4
1135// register.
1136//
1137//*****************************************************************************
1138#define USB_TXHUBPORT4_PORT_M 0x0000007F // Hub Port
1139#define USB_TXHUBPORT4_PORT_S 0
1140
1141//*****************************************************************************
1142//
1143// The following are defines for the bit fields in the USB_O_RXFUNCADDR4
1144// register.
1145//
1146//*****************************************************************************
1147#define USB_RXFUNCADDR4_ADDR_M 0x0000007F // Device Address
1148#define USB_RXFUNCADDR4_ADDR_S 0
1149
1150//*****************************************************************************
1151//
1152// The following are defines for the bit fields in the USB_O_RXHUBADDR4
1153// register.
1154//
1155//*****************************************************************************
1156#define USB_RXHUBADDR4_ADDR_M 0x0000007F // Hub Address
1157#define USB_RXHUBADDR4_ADDR_S 0
1158
1159//*****************************************************************************
1160//
1161// The following are defines for the bit fields in the USB_O_RXHUBPORT4
1162// register.
1163//
1164//*****************************************************************************
1165#define USB_RXHUBPORT4_PORT_M 0x0000007F // Hub Port
1166#define USB_RXHUBPORT4_PORT_S 0
1167
1168//*****************************************************************************
1169//
1170// The following are defines for the bit fields in the USB_O_TXFUNCADDR5
1171// register.
1172//
1173//*****************************************************************************
1174#define USB_TXFUNCADDR5_ADDR_M 0x0000007F // Device Address
1175#define USB_TXFUNCADDR5_ADDR_S 0
1176
1177//*****************************************************************************
1178//
1179// The following are defines for the bit fields in the USB_O_TXHUBADDR5
1180// register.
1181//
1182//*****************************************************************************
1183#define USB_TXHUBADDR5_ADDR_M 0x0000007F // Hub Address
1184#define USB_TXHUBADDR5_ADDR_S 0
1185
1186//*****************************************************************************
1187//
1188// The following are defines for the bit fields in the USB_O_TXHUBPORT5
1189// register.
1190//
1191//*****************************************************************************
1192#define USB_TXHUBPORT5_PORT_M 0x0000007F // Hub Port
1193#define USB_TXHUBPORT5_PORT_S 0
1194
1195//*****************************************************************************
1196//
1197// The following are defines for the bit fields in the USB_O_RXFUNCADDR5
1198// register.
1199//
1200//*****************************************************************************
1201#define USB_RXFUNCADDR5_ADDR_M 0x0000007F // Device Address
1202#define USB_RXFUNCADDR5_ADDR_S 0
1203
1204//*****************************************************************************
1205//
1206// The following are defines for the bit fields in the USB_O_RXHUBADDR5
1207// register.
1208//
1209//*****************************************************************************
1210#define USB_RXHUBADDR5_ADDR_M 0x0000007F // Hub Address
1211#define USB_RXHUBADDR5_ADDR_S 0
1212
1213//*****************************************************************************
1214//
1215// The following are defines for the bit fields in the USB_O_RXHUBPORT5
1216// register.
1217//
1218//*****************************************************************************
1219#define USB_RXHUBPORT5_PORT_M 0x0000007F // Hub Port
1220#define USB_RXHUBPORT5_PORT_S 0
1221
1222//*****************************************************************************
1223//
1224// The following are defines for the bit fields in the USB_O_TXFUNCADDR6
1225// register.
1226//
1227//*****************************************************************************
1228#define USB_TXFUNCADDR6_ADDR_M 0x0000007F // Device Address
1229#define USB_TXFUNCADDR6_ADDR_S 0
1230
1231//*****************************************************************************
1232//
1233// The following are defines for the bit fields in the USB_O_TXHUBADDR6
1234// register.
1235//
1236//*****************************************************************************
1237#define USB_TXHUBADDR6_ADDR_M 0x0000007F // Hub Address
1238#define USB_TXHUBADDR6_ADDR_S 0
1239
1240//*****************************************************************************
1241//
1242// The following are defines for the bit fields in the USB_O_TXHUBPORT6
1243// register.
1244//
1245//*****************************************************************************
1246#define USB_TXHUBPORT6_PORT_M 0x0000007F // Hub Port
1247#define USB_TXHUBPORT6_PORT_S 0
1248
1249//*****************************************************************************
1250//
1251// The following are defines for the bit fields in the USB_O_RXFUNCADDR6
1252// register.
1253//
1254//*****************************************************************************
1255#define USB_RXFUNCADDR6_ADDR_M 0x0000007F // Device Address
1256#define USB_RXFUNCADDR6_ADDR_S 0
1257
1258//*****************************************************************************
1259//
1260// The following are defines for the bit fields in the USB_O_RXHUBADDR6
1261// register.
1262//
1263//*****************************************************************************
1264#define USB_RXHUBADDR6_ADDR_M 0x0000007F // Hub Address
1265#define USB_RXHUBADDR6_ADDR_S 0
1266
1267//*****************************************************************************
1268//
1269// The following are defines for the bit fields in the USB_O_RXHUBPORT6
1270// register.
1271//
1272//*****************************************************************************
1273#define USB_RXHUBPORT6_PORT_M 0x0000007F // Hub Port
1274#define USB_RXHUBPORT6_PORT_S 0
1275
1276//*****************************************************************************
1277//
1278// The following are defines for the bit fields in the USB_O_TXFUNCADDR7
1279// register.
1280//
1281//*****************************************************************************
1282#define USB_TXFUNCADDR7_ADDR_M 0x0000007F // Device Address
1283#define USB_TXFUNCADDR7_ADDR_S 0
1284
1285//*****************************************************************************
1286//
1287// The following are defines for the bit fields in the USB_O_TXHUBADDR7
1288// register.
1289//
1290//*****************************************************************************
1291#define USB_TXHUBADDR7_ADDR_M 0x0000007F // Hub Address
1292#define USB_TXHUBADDR7_ADDR_S 0
1293
1294//*****************************************************************************
1295//
1296// The following are defines for the bit fields in the USB_O_TXHUBPORT7
1297// register.
1298//
1299//*****************************************************************************
1300#define USB_TXHUBPORT7_PORT_M 0x0000007F // Hub Port
1301#define USB_TXHUBPORT7_PORT_S 0
1302
1303//*****************************************************************************
1304//
1305// The following are defines for the bit fields in the USB_O_RXFUNCADDR7
1306// register.
1307//
1308//*****************************************************************************
1309#define USB_RXFUNCADDR7_ADDR_M 0x0000007F // Device Address
1310#define USB_RXFUNCADDR7_ADDR_S 0
1311
1312//*****************************************************************************
1313//
1314// The following are defines for the bit fields in the USB_O_RXHUBADDR7
1315// register.
1316//
1317//*****************************************************************************
1318#define USB_RXHUBADDR7_ADDR_M 0x0000007F // Hub Address
1319#define USB_RXHUBADDR7_ADDR_S 0
1320
1321//*****************************************************************************
1322//
1323// The following are defines for the bit fields in the USB_O_RXHUBPORT7
1324// register.
1325//
1326//*****************************************************************************
1327#define USB_RXHUBPORT7_PORT_M 0x0000007F // Hub Port
1328#define USB_RXHUBPORT7_PORT_S 0
1329
1330//*****************************************************************************
1331//
1332// The following are defines for the bit fields in the USB_O_CSRL0 register.
1333//
1334//*****************************************************************************
1335#define USB_CSRL0_NAKTO 0x00000080   // NAK Timeout
1336#define USB_CSRL0_SETENDC 0x00000080 // Setup End Clear
1337#define USB_CSRL0_STATUS 0x00000040  // STATUS Packet
1338#define USB_CSRL0_RXRDYC 0x00000040  // RXRDY Clear
1339#define USB_CSRL0_REQPKT 0x00000020  // Request Packet
1340#define USB_CSRL0_STALL 0x00000020   // Send Stall
1341#define USB_CSRL0_SETEND 0x00000010  // Setup End
1342#define USB_CSRL0_ERROR 0x00000010   // Error
1343#define USB_CSRL0_DATAEND 0x00000008 // Data End
1344#define USB_CSRL0_SETUP 0x00000008   // Setup Packet
1345#define USB_CSRL0_STALLED 0x00000004 // Endpoint Stalled
1346#define USB_CSRL0_TXRDY 0x00000002   // Transmit Packet Ready
1347#define USB_CSRL0_RXRDY 0x00000001   // Receive Packet Ready
1348
1349//*****************************************************************************
1350//
1351// The following are defines for the bit fields in the USB_O_CSRH0 register.
1352//
1353//*****************************************************************************
1354#define USB_CSRH0_DISPING 0x00000008 // PING Disable
1355#define USB_CSRH0_DTWE 0x00000004    // Data Toggle Write Enable
1356#define USB_CSRH0_DT 0x00000002      // Data Toggle
1357#define USB_CSRH0_FLUSH 0x00000001   // Flush FIFO
1358
1359//*****************************************************************************
1360//
1361// The following are defines for the bit fields in the USB_O_COUNT0 register.
1362//
1363//*****************************************************************************
1364#define USB_COUNT0_COUNT_M 0x0000007F // FIFO Count
1365#define USB_COUNT0_COUNT_S 0
1366
1367//*****************************************************************************
1368//
1369// The following are defines for the bit fields in the USB_O_TYPE0 register.
1370//
1371//*****************************************************************************
1372#define USB_TYPE0_SPEED_M 0x000000C0    // Operating Speed
1373#define USB_TYPE0_SPEED_HIGH 0x00000040 // High
1374#define USB_TYPE0_SPEED_FULL 0x00000080 // Full
1375#define USB_TYPE0_SPEED_LOW 0x000000C0  // Low
1376
1377//*****************************************************************************
1378//
1379// The following are defines for the bit fields in the USB_O_NAKLMT register.
1380//
1381//*****************************************************************************
1382#define USB_NAKLMT_NAKLMT_M 0x0000001F // EP0 NAK Limit
1383#define USB_NAKLMT_NAKLMT_S 0
1384
1385//*****************************************************************************
1386//
1387// The following are defines for the bit fields in the USB_O_TXMAXP1 register.
1388//
1389//*****************************************************************************
1390#define USB_TXMAXP1_MAXLOAD_M 0x000007FF // Maximum Payload
1391#define USB_TXMAXP1_MAXLOAD_S 0
1392
1393//*****************************************************************************
1394//
1395// The following are defines for the bit fields in the USB_O_TXCSRL1 register.
1396//
1397//*****************************************************************************
1398#define USB_TXCSRL1_NAKTO 0x00000080   // NAK Timeout
1399#define USB_TXCSRL1_CLRDT 0x00000040   // Clear Data Toggle
1400#define USB_TXCSRL1_STALLED 0x00000020 // Endpoint Stalled
1401#define USB_TXCSRL1_STALL 0x00000010   // Send STALL
1402#define USB_TXCSRL1_SETUP 0x00000010   // Setup Packet
1403#define USB_TXCSRL1_FLUSH 0x00000008   // Flush FIFO
1404#define USB_TXCSRL1_ERROR 0x00000004   // Error
1405#define USB_TXCSRL1_UNDRN 0x00000004   // Underrun
1406#define USB_TXCSRL1_FIFONE 0x00000002  // FIFO Not Empty
1407#define USB_TXCSRL1_TXRDY 0x00000001   // Transmit Packet Ready
1408
1409//*****************************************************************************
1410//
1411// The following are defines for the bit fields in the USB_O_TXCSRH1 register.
1412//
1413//*****************************************************************************
1414#define USB_TXCSRH1_AUTOSET 0x00000080 // Auto Set
1415#define USB_TXCSRH1_ISO 0x00000040     // Isochronous Transfers
1416#define USB_TXCSRH1_MODE 0x00000020    // Mode
1417#define USB_TXCSRH1_DMAEN 0x00000010   // DMA Request Enable
1418#define USB_TXCSRH1_FDT 0x00000008     // Force Data Toggle
1419#define USB_TXCSRH1_DMAMOD 0x00000004  // DMA Request Mode
1420#define USB_TXCSRH1_DTWE 0x00000002    // Data Toggle Write Enable
1421#define USB_TXCSRH1_DT 0x00000001      // Data Toggle
1422
1423//*****************************************************************************
1424//
1425// The following are defines for the bit fields in the USB_O_RXMAXP1 register.
1426//
1427//*****************************************************************************
1428#define USB_RXMAXP1_MAXLOAD_M 0x000007FF // Maximum Payload
1429#define USB_RXMAXP1_MAXLOAD_S 0
1430
1431//*****************************************************************************
1432//
1433// The following are defines for the bit fields in the USB_O_RXCSRL1 register.
1434//
1435//*****************************************************************************
1436#define USB_RXCSRL1_CLRDT 0x00000080   // Clear Data Toggle
1437#define USB_RXCSRL1_STALLED 0x00000040 // Endpoint Stalled
1438#define USB_RXCSRL1_STALL 0x00000020   // Send STALL
1439#define USB_RXCSRL1_REQPKT 0x00000020  // Request Packet
1440#define USB_RXCSRL1_FLUSH 0x00000010   // Flush FIFO
1441#define USB_RXCSRL1_DATAERR 0x00000008 // Data Error
1442#define USB_RXCSRL1_NAKTO 0x00000008   // NAK Timeout
1443#define USB_RXCSRL1_OVER 0x00000004    // Overrun
1444#define USB_RXCSRL1_ERROR 0x00000004   // Error
1445#define USB_RXCSRL1_FULL 0x00000002    // FIFO Full
1446#define USB_RXCSRL1_RXRDY 0x00000001   // Receive Packet Ready
1447
1448//*****************************************************************************
1449//
1450// The following are defines for the bit fields in the USB_O_RXCSRH1 register.
1451//
1452//*****************************************************************************
1453#define USB_RXCSRH1_AUTOCL 0x00000080  // Auto Clear
1454#define USB_RXCSRH1_AUTORQ 0x00000040  // Auto Request
1455#define USB_RXCSRH1_ISO 0x00000040     // Isochronous Transfers
1456#define USB_RXCSRH1_DMAEN 0x00000020   // DMA Request Enable
1457#define USB_RXCSRH1_DISNYET 0x00000010 // Disable NYET
1458#define USB_RXCSRH1_PIDERR 0x00000010  // PID Error
1459#define USB_RXCSRH1_DMAMOD 0x00000008  // DMA Request Mode
1460#define USB_RXCSRH1_DTWE 0x00000004    // Data Toggle Write Enable
1461#define USB_RXCSRH1_DT 0x00000002      // Data Toggle
1462#define USB_RXCSRH1_INCOMPRX                                                   \
1463    0x00000001 // Incomplete RX Transmission
1464               // Status
1465
1466//*****************************************************************************
1467//
1468// The following are defines for the bit fields in the USB_O_RXCOUNT1 register.
1469//
1470//*****************************************************************************
1471#define USB_RXCOUNT1_COUNT_M 0x00001FFF // Receive Packet Count
1472#define USB_RXCOUNT1_COUNT_S 0
1473
1474//*****************************************************************************
1475//
1476// The following are defines for the bit fields in the USB_O_TXTYPE1 register.
1477//
1478//*****************************************************************************
1479#define USB_TXTYPE1_SPEED_M 0x000000C0    // Operating Speed
1480#define USB_TXTYPE1_SPEED_DFLT 0x00000000 // Default
1481#define USB_TXTYPE1_SPEED_HIGH 0x00000040 // High
1482#define USB_TXTYPE1_SPEED_FULL 0x00000080 // Full
1483#define USB_TXTYPE1_SPEED_LOW 0x000000C0  // Low
1484#define USB_TXTYPE1_PROTO_M 0x00000030    // Protocol
1485#define USB_TXTYPE1_PROTO_CTRL 0x00000000 // Control
1486#define USB_TXTYPE1_PROTO_ISOC 0x00000010 // Isochronous
1487#define USB_TXTYPE1_PROTO_BULK 0x00000020 // Bulk
1488#define USB_TXTYPE1_PROTO_INT 0x00000030  // Interrupt
1489#define USB_TXTYPE1_TEP_M 0x0000000F      // Target Endpoint Number
1490#define USB_TXTYPE1_TEP_S 0
1491
1492//*****************************************************************************
1493//
1494// The following are defines for the bit fields in the USB_O_TXINTERVAL1
1495// register.
1496//
1497//*****************************************************************************
1498#define USB_TXINTERVAL1_NAKLMT_M 0x000000FF // NAK Limit
1499#define USB_TXINTERVAL1_TXPOLL_M 0x000000FF // TX Polling
1500#define USB_TXINTERVAL1_TXPOLL_S 0
1501#define USB_TXINTERVAL1_NAKLMT_S 0
1502
1503//*****************************************************************************
1504//
1505// The following are defines for the bit fields in the USB_O_RXTYPE1 register.
1506//
1507//*****************************************************************************
1508#define USB_RXTYPE1_SPEED_M 0x000000C0    // Operating Speed
1509#define USB_RXTYPE1_SPEED_DFLT 0x00000000 // Default
1510#define USB_RXTYPE1_SPEED_HIGH 0x00000040 // High
1511#define USB_RXTYPE1_SPEED_FULL 0x00000080 // Full
1512#define USB_RXTYPE1_SPEED_LOW 0x000000C0  // Low
1513#define USB_RXTYPE1_PROTO_M 0x00000030    // Protocol
1514#define USB_RXTYPE1_PROTO_CTRL 0x00000000 // Control
1515#define USB_RXTYPE1_PROTO_ISOC 0x00000010 // Isochronous
1516#define USB_RXTYPE1_PROTO_BULK 0x00000020 // Bulk
1517#define USB_RXTYPE1_PROTO_INT 0x00000030  // Interrupt
1518#define USB_RXTYPE1_TEP_M 0x0000000F      // Target Endpoint Number
1519#define USB_RXTYPE1_TEP_S 0
1520
1521//*****************************************************************************
1522//
1523// The following are defines for the bit fields in the USB_O_RXINTERVAL1
1524// register.
1525//
1526//*****************************************************************************
1527#define USB_RXINTERVAL1_TXPOLL_M 0x000000FF // RX Polling
1528#define USB_RXINTERVAL1_NAKLMT_M 0x000000FF // NAK Limit
1529#define USB_RXINTERVAL1_TXPOLL_S 0
1530#define USB_RXINTERVAL1_NAKLMT_S 0
1531
1532//*****************************************************************************
1533//
1534// The following are defines for the bit fields in the USB_O_TXMAXP2 register.
1535//
1536//*****************************************************************************
1537#define USB_TXMAXP2_MAXLOAD_M 0x000007FF // Maximum Payload
1538#define USB_TXMAXP2_MAXLOAD_S 0
1539
1540//*****************************************************************************
1541//
1542// The following are defines for the bit fields in the USB_O_TXCSRL2 register.
1543//
1544//*****************************************************************************
1545#define USB_TXCSRL2_NAKTO 0x00000080   // NAK Timeout
1546#define USB_TXCSRL2_CLRDT 0x00000040   // Clear Data Toggle
1547#define USB_TXCSRL2_STALLED 0x00000020 // Endpoint Stalled
1548#define USB_TXCSRL2_SETUP 0x00000010   // Setup Packet
1549#define USB_TXCSRL2_STALL 0x00000010   // Send STALL
1550#define USB_TXCSRL2_FLUSH 0x00000008   // Flush FIFO
1551#define USB_TXCSRL2_ERROR 0x00000004   // Error
1552#define USB_TXCSRL2_UNDRN 0x00000004   // Underrun
1553#define USB_TXCSRL2_FIFONE 0x00000002  // FIFO Not Empty
1554#define USB_TXCSRL2_TXRDY 0x00000001   // Transmit Packet Ready
1555
1556//*****************************************************************************
1557//
1558// The following are defines for the bit fields in the USB_O_TXCSRH2 register.
1559//
1560//*****************************************************************************
1561#define USB_TXCSRH2_AUTOSET 0x00000080 // Auto Set
1562#define USB_TXCSRH2_ISO 0x00000040     // Isochronous Transfers
1563#define USB_TXCSRH2_MODE 0x00000020    // Mode
1564#define USB_TXCSRH2_DMAEN 0x00000010   // DMA Request Enable
1565#define USB_TXCSRH2_FDT 0x00000008     // Force Data Toggle
1566#define USB_TXCSRH2_DMAMOD 0x00000004  // DMA Request Mode
1567#define USB_TXCSRH2_DTWE 0x00000002    // Data Toggle Write Enable
1568#define USB_TXCSRH2_DT 0x00000001      // Data Toggle
1569
1570//*****************************************************************************
1571//
1572// The following are defines for the bit fields in the USB_O_RXMAXP2 register.
1573//
1574//*****************************************************************************
1575#define USB_RXMAXP2_MAXLOAD_M 0x000007FF // Maximum Payload
1576#define USB_RXMAXP2_MAXLOAD_S 0
1577
1578//*****************************************************************************
1579//
1580// The following are defines for the bit fields in the USB_O_RXCSRL2 register.
1581//
1582//*****************************************************************************
1583#define USB_RXCSRL2_CLRDT 0x00000080   // Clear Data Toggle
1584#define USB_RXCSRL2_STALLED 0x00000040 // Endpoint Stalled
1585#define USB_RXCSRL2_REQPKT 0x00000020  // Request Packet
1586#define USB_RXCSRL2_STALL 0x00000020   // Send STALL
1587#define USB_RXCSRL2_FLUSH 0x00000010   // Flush FIFO
1588#define USB_RXCSRL2_DATAERR 0x00000008 // Data Error
1589#define USB_RXCSRL2_NAKTO 0x00000008   // NAK Timeout
1590#define USB_RXCSRL2_ERROR 0x00000004   // Error
1591#define USB_RXCSRL2_OVER 0x00000004    // Overrun
1592#define USB_RXCSRL2_FULL 0x00000002    // FIFO Full
1593#define USB_RXCSRL2_RXRDY 0x00000001   // Receive Packet Ready
1594
1595//*****************************************************************************
1596//
1597// The following are defines for the bit fields in the USB_O_RXCSRH2 register.
1598//
1599//*****************************************************************************
1600#define USB_RXCSRH2_AUTOCL 0x00000080  // Auto Clear
1601#define USB_RXCSRH2_AUTORQ 0x00000040  // Auto Request
1602#define USB_RXCSRH2_ISO 0x00000040     // Isochronous Transfers
1603#define USB_RXCSRH2_DMAEN 0x00000020   // DMA Request Enable
1604#define USB_RXCSRH2_DISNYET 0x00000010 // Disable NYET
1605#define USB_RXCSRH2_PIDERR 0x00000010  // PID Error
1606#define USB_RXCSRH2_DMAMOD 0x00000008  // DMA Request Mode
1607#define USB_RXCSRH2_DTWE 0x00000004    // Data Toggle Write Enable
1608#define USB_RXCSRH2_DT 0x00000002      // Data Toggle
1609#define USB_RXCSRH2_INCOMPRX                                                   \
1610    0x00000001 // Incomplete RX Transmission
1611               // Status
1612
1613//*****************************************************************************
1614//
1615// The following are defines for the bit fields in the USB_O_RXCOUNT2 register.
1616//
1617//*****************************************************************************
1618#define USB_RXCOUNT2_COUNT_M 0x00001FFF // Receive Packet Count
1619#define USB_RXCOUNT2_COUNT_S 0
1620
1621//*****************************************************************************
1622//
1623// The following are defines for the bit fields in the USB_O_TXTYPE2 register.
1624//
1625//*****************************************************************************
1626#define USB_TXTYPE2_SPEED_M 0x000000C0    // Operating Speed
1627#define USB_TXTYPE2_SPEED_DFLT 0x00000000 // Default
1628#define USB_TXTYPE2_SPEED_HIGH 0x00000040 // High
1629#define USB_TXTYPE2_SPEED_FULL 0x00000080 // Full
1630#define USB_TXTYPE2_SPEED_LOW 0x000000C0  // Low
1631#define USB_TXTYPE2_PROTO_M 0x00000030    // Protocol
1632#define USB_TXTYPE2_PROTO_CTRL 0x00000000 // Control
1633#define USB_TXTYPE2_PROTO_ISOC 0x00000010 // Isochronous
1634#define USB_TXTYPE2_PROTO_BULK 0x00000020 // Bulk
1635#define USB_TXTYPE2_PROTO_INT 0x00000030  // Interrupt
1636#define USB_TXTYPE2_TEP_M 0x0000000F      // Target Endpoint Number
1637#define USB_TXTYPE2_TEP_S 0
1638
1639//*****************************************************************************
1640//
1641// The following are defines for the bit fields in the USB_O_TXINTERVAL2
1642// register.
1643//
1644//*****************************************************************************
1645#define USB_TXINTERVAL2_TXPOLL_M 0x000000FF // TX Polling
1646#define USB_TXINTERVAL2_NAKLMT_M 0x000000FF // NAK Limit
1647#define USB_TXINTERVAL2_NAKLMT_S 0
1648#define USB_TXINTERVAL2_TXPOLL_S 0
1649
1650//*****************************************************************************
1651//
1652// The following are defines for the bit fields in the USB_O_RXTYPE2 register.
1653//
1654//*****************************************************************************
1655#define USB_RXTYPE2_SPEED_M 0x000000C0    // Operating Speed
1656#define USB_RXTYPE2_SPEED_DFLT 0x00000000 // Default
1657#define USB_RXTYPE2_SPEED_HIGH 0x00000040 // High
1658#define USB_RXTYPE2_SPEED_FULL 0x00000080 // Full
1659#define USB_RXTYPE2_SPEED_LOW 0x000000C0  // Low
1660#define USB_RXTYPE2_PROTO_M 0x00000030    // Protocol
1661#define USB_RXTYPE2_PROTO_CTRL 0x00000000 // Control
1662#define USB_RXTYPE2_PROTO_ISOC 0x00000010 // Isochronous
1663#define USB_RXTYPE2_PROTO_BULK 0x00000020 // Bulk
1664#define USB_RXTYPE2_PROTO_INT 0x00000030  // Interrupt
1665#define USB_RXTYPE2_TEP_M 0x0000000F      // Target Endpoint Number
1666#define USB_RXTYPE2_TEP_S 0
1667
1668//*****************************************************************************
1669//
1670// The following are defines for the bit fields in the USB_O_RXINTERVAL2
1671// register.
1672//
1673//*****************************************************************************
1674#define USB_RXINTERVAL2_TXPOLL_M 0x000000FF // RX Polling
1675#define USB_RXINTERVAL2_NAKLMT_M 0x000000FF // NAK Limit
1676#define USB_RXINTERVAL2_TXPOLL_S 0
1677#define USB_RXINTERVAL2_NAKLMT_S 0
1678
1679//*****************************************************************************
1680//
1681// The following are defines for the bit fields in the USB_O_TXMAXP3 register.
1682//
1683//*****************************************************************************
1684#define USB_TXMAXP3_MAXLOAD_M 0x000007FF // Maximum Payload
1685#define USB_TXMAXP3_MAXLOAD_S 0
1686
1687//*****************************************************************************
1688//
1689// The following are defines for the bit fields in the USB_O_TXCSRL3 register.
1690//
1691//*****************************************************************************
1692#define USB_TXCSRL3_NAKTO 0x00000080   // NAK Timeout
1693#define USB_TXCSRL3_CLRDT 0x00000040   // Clear Data Toggle
1694#define USB_TXCSRL3_STALLED 0x00000020 // Endpoint Stalled
1695#define USB_TXCSRL3_SETUP 0x00000010   // Setup Packet
1696#define USB_TXCSRL3_STALL 0x00000010   // Send STALL
1697#define USB_TXCSRL3_FLUSH 0x00000008   // Flush FIFO
1698#define USB_TXCSRL3_ERROR 0x00000004   // Error
1699#define USB_TXCSRL3_UNDRN 0x00000004   // Underrun
1700#define USB_TXCSRL3_FIFONE 0x00000002  // FIFO Not Empty
1701#define USB_TXCSRL3_TXRDY 0x00000001   // Transmit Packet Ready
1702
1703//*****************************************************************************
1704//
1705// The following are defines for the bit fields in the USB_O_TXCSRH3 register.
1706//
1707//*****************************************************************************
1708#define USB_TXCSRH3_AUTOSET 0x00000080 // Auto Set
1709#define USB_TXCSRH3_ISO 0x00000040     // Isochronous Transfers
1710#define USB_TXCSRH3_MODE 0x00000020    // Mode
1711#define USB_TXCSRH3_DMAEN 0x00000010   // DMA Request Enable
1712#define USB_TXCSRH3_FDT 0x00000008     // Force Data Toggle
1713#define USB_TXCSRH3_DMAMOD 0x00000004  // DMA Request Mode
1714#define USB_TXCSRH3_DTWE 0x00000002    // Data Toggle Write Enable
1715#define USB_TXCSRH3_DT 0x00000001      // Data Toggle
1716
1717//*****************************************************************************
1718//
1719// The following are defines for the bit fields in the USB_O_RXMAXP3 register.
1720//
1721//*****************************************************************************
1722#define USB_RXMAXP3_MAXLOAD_M 0x000007FF // Maximum Payload
1723#define USB_RXMAXP3_MAXLOAD_S 0
1724
1725//*****************************************************************************
1726//
1727// The following are defines for the bit fields in the USB_O_RXCSRL3 register.
1728//
1729//*****************************************************************************
1730#define USB_RXCSRL3_CLRDT 0x00000080   // Clear Data Toggle
1731#define USB_RXCSRL3_STALLED 0x00000040 // Endpoint Stalled
1732#define USB_RXCSRL3_STALL 0x00000020   // Send STALL
1733#define USB_RXCSRL3_REQPKT 0x00000020  // Request Packet
1734#define USB_RXCSRL3_FLUSH 0x00000010   // Flush FIFO
1735#define USB_RXCSRL3_DATAERR 0x00000008 // Data Error
1736#define USB_RXCSRL3_NAKTO 0x00000008   // NAK Timeout
1737#define USB_RXCSRL3_ERROR 0x00000004   // Error
1738#define USB_RXCSRL3_OVER 0x00000004    // Overrun
1739#define USB_RXCSRL3_FULL 0x00000002    // FIFO Full
1740#define USB_RXCSRL3_RXRDY 0x00000001   // Receive Packet Ready
1741
1742//*****************************************************************************
1743//
1744// The following are defines for the bit fields in the USB_O_RXCSRH3 register.
1745//
1746//*****************************************************************************
1747#define USB_RXCSRH3_AUTOCL 0x00000080  // Auto Clear
1748#define USB_RXCSRH3_AUTORQ 0x00000040  // Auto Request
1749#define USB_RXCSRH3_ISO 0x00000040     // Isochronous Transfers
1750#define USB_RXCSRH3_DMAEN 0x00000020   // DMA Request Enable
1751#define USB_RXCSRH3_DISNYET 0x00000010 // Disable NYET
1752#define USB_RXCSRH3_PIDERR 0x00000010  // PID Error
1753#define USB_RXCSRH3_DMAMOD 0x00000008  // DMA Request Mode
1754#define USB_RXCSRH3_DTWE 0x00000004    // Data Toggle Write Enable
1755#define USB_RXCSRH3_DT 0x00000002      // Data Toggle
1756#define USB_RXCSRH3_INCOMPRX                                                   \
1757    0x00000001 // Incomplete RX Transmission
1758               // Status
1759
1760//*****************************************************************************
1761//
1762// The following are defines for the bit fields in the USB_O_RXCOUNT3 register.
1763//
1764//*****************************************************************************
1765#define USB_RXCOUNT3_COUNT_M 0x00001FFF // Receive Packet Count
1766#define USB_RXCOUNT3_COUNT_S 0
1767
1768//*****************************************************************************
1769//
1770// The following are defines for the bit fields in the USB_O_TXTYPE3 register.
1771//
1772//*****************************************************************************
1773#define USB_TXTYPE3_SPEED_M 0x000000C0    // Operating Speed
1774#define USB_TXTYPE3_SPEED_DFLT 0x00000000 // Default
1775#define USB_TXTYPE3_SPEED_HIGH 0x00000040 // High
1776#define USB_TXTYPE3_SPEED_FULL 0x00000080 // Full
1777#define USB_TXTYPE3_SPEED_LOW 0x000000C0  // Low
1778#define USB_TXTYPE3_PROTO_M 0x00000030    // Protocol
1779#define USB_TXTYPE3_PROTO_CTRL 0x00000000 // Control
1780#define USB_TXTYPE3_PROTO_ISOC 0x00000010 // Isochronous
1781#define USB_TXTYPE3_PROTO_BULK 0x00000020 // Bulk
1782#define USB_TXTYPE3_PROTO_INT 0x00000030  // Interrupt
1783#define USB_TXTYPE3_TEP_M 0x0000000F      // Target Endpoint Number
1784#define USB_TXTYPE3_TEP_S 0
1785
1786//*****************************************************************************
1787//
1788// The following are defines for the bit fields in the USB_O_TXINTERVAL3
1789// register.
1790//
1791//*****************************************************************************
1792#define USB_TXINTERVAL3_TXPOLL_M 0x000000FF // TX Polling
1793#define USB_TXINTERVAL3_NAKLMT_M 0x000000FF // NAK Limit
1794#define USB_TXINTERVAL3_TXPOLL_S 0
1795#define USB_TXINTERVAL3_NAKLMT_S 0
1796
1797//*****************************************************************************
1798//
1799// The following are defines for the bit fields in the USB_O_RXTYPE3 register.
1800//
1801//*****************************************************************************
1802#define USB_RXTYPE3_SPEED_M 0x000000C0    // Operating Speed
1803#define USB_RXTYPE3_SPEED_DFLT 0x00000000 // Default
1804#define USB_RXTYPE3_SPEED_HIGH 0x00000040 // High
1805#define USB_RXTYPE3_SPEED_FULL 0x00000080 // Full
1806#define USB_RXTYPE3_SPEED_LOW 0x000000C0  // Low
1807#define USB_RXTYPE3_PROTO_M 0x00000030    // Protocol
1808#define USB_RXTYPE3_PROTO_CTRL 0x00000000 // Control
1809#define USB_RXTYPE3_PROTO_ISOC 0x00000010 // Isochronous
1810#define USB_RXTYPE3_PROTO_BULK 0x00000020 // Bulk
1811#define USB_RXTYPE3_PROTO_INT 0x00000030  // Interrupt
1812#define USB_RXTYPE3_TEP_M 0x0000000F      // Target Endpoint Number
1813#define USB_RXTYPE3_TEP_S 0
1814
1815//*****************************************************************************
1816//
1817// The following are defines for the bit fields in the USB_O_RXINTERVAL3
1818// register.
1819//
1820//*****************************************************************************
1821#define USB_RXINTERVAL3_TXPOLL_M 0x000000FF // RX Polling
1822#define USB_RXINTERVAL3_NAKLMT_M 0x000000FF // NAK Limit
1823#define USB_RXINTERVAL3_TXPOLL_S 0
1824#define USB_RXINTERVAL3_NAKLMT_S 0
1825
1826//*****************************************************************************
1827//
1828// The following are defines for the bit fields in the USB_O_TXMAXP4 register.
1829//
1830//*****************************************************************************
1831#define USB_TXMAXP4_MAXLOAD_M 0x000007FF // Maximum Payload
1832#define USB_TXMAXP4_MAXLOAD_S 0
1833
1834//*****************************************************************************
1835//
1836// The following are defines for the bit fields in the USB_O_TXCSRL4 register.
1837//
1838//*****************************************************************************
1839#define USB_TXCSRL4_NAKTO 0x00000080   // NAK Timeout
1840#define USB_TXCSRL4_CLRDT 0x00000040   // Clear Data Toggle
1841#define USB_TXCSRL4_STALLED 0x00000020 // Endpoint Stalled
1842#define USB_TXCSRL4_SETUP 0x00000010   // Setup Packet
1843#define USB_TXCSRL4_STALL 0x00000010   // Send STALL
1844#define USB_TXCSRL4_FLUSH 0x00000008   // Flush FIFO
1845#define USB_TXCSRL4_ERROR 0x00000004   // Error
1846#define USB_TXCSRL4_UNDRN 0x00000004   // Underrun
1847#define USB_TXCSRL4_FIFONE 0x00000002  // FIFO Not Empty
1848#define USB_TXCSRL4_TXRDY 0x00000001   // Transmit Packet Ready
1849
1850//*****************************************************************************
1851//
1852// The following are defines for the bit fields in the USB_O_TXCSRH4 register.
1853//
1854//*****************************************************************************
1855#define USB_TXCSRH4_AUTOSET 0x00000080 // Auto Set
1856#define USB_TXCSRH4_ISO 0x00000040     // Isochronous Transfers
1857#define USB_TXCSRH4_MODE 0x00000020    // Mode
1858#define USB_TXCSRH4_DMAEN 0x00000010   // DMA Request Enable
1859#define USB_TXCSRH4_FDT 0x00000008     // Force Data Toggle
1860#define USB_TXCSRH4_DMAMOD 0x00000004  // DMA Request Mode
1861#define USB_TXCSRH4_DTWE 0x00000002    // Data Toggle Write Enable
1862#define USB_TXCSRH4_DT 0x00000001      // Data Toggle
1863
1864//*****************************************************************************
1865//
1866// The following are defines for the bit fields in the USB_O_RXMAXP4 register.
1867//
1868//*****************************************************************************
1869#define USB_RXMAXP4_MAXLOAD_M 0x000007FF // Maximum Payload
1870#define USB_RXMAXP4_MAXLOAD_S 0
1871
1872//*****************************************************************************
1873//
1874// The following are defines for the bit fields in the USB_O_RXCSRL4 register.
1875//
1876//*****************************************************************************
1877#define USB_RXCSRL4_CLRDT 0x00000080   // Clear Data Toggle
1878#define USB_RXCSRL4_STALLED 0x00000040 // Endpoint Stalled
1879#define USB_RXCSRL4_STALL 0x00000020   // Send STALL
1880#define USB_RXCSRL4_REQPKT 0x00000020  // Request Packet
1881#define USB_RXCSRL4_FLUSH 0x00000010   // Flush FIFO
1882#define USB_RXCSRL4_NAKTO 0x00000008   // NAK Timeout
1883#define USB_RXCSRL4_DATAERR 0x00000008 // Data Error
1884#define USB_RXCSRL4_OVER 0x00000004    // Overrun
1885#define USB_RXCSRL4_ERROR 0x00000004   // Error
1886#define USB_RXCSRL4_FULL 0x00000002    // FIFO Full
1887#define USB_RXCSRL4_RXRDY 0x00000001   // Receive Packet Ready
1888
1889//*****************************************************************************
1890//
1891// The following are defines for the bit fields in the USB_O_RXCSRH4 register.
1892//
1893//*****************************************************************************
1894#define USB_RXCSRH4_AUTOCL 0x00000080  // Auto Clear
1895#define USB_RXCSRH4_AUTORQ 0x00000040  // Auto Request
1896#define USB_RXCSRH4_ISO 0x00000040     // Isochronous Transfers
1897#define USB_RXCSRH4_DMAEN 0x00000020   // DMA Request Enable
1898#define USB_RXCSRH4_DISNYET 0x00000010 // Disable NYET
1899#define USB_RXCSRH4_PIDERR 0x00000010  // PID Error
1900#define USB_RXCSRH4_DMAMOD 0x00000008  // DMA Request Mode
1901#define USB_RXCSRH4_DTWE 0x00000004    // Data Toggle Write Enable
1902#define USB_RXCSRH4_DT 0x00000002      // Data Toggle
1903#define USB_RXCSRH4_INCOMPRX                                                   \
1904    0x00000001 // Incomplete RX Transmission
1905               // Status
1906
1907//*****************************************************************************
1908//
1909// The following are defines for the bit fields in the USB_O_RXCOUNT4 register.
1910//
1911//*****************************************************************************
1912#define USB_RXCOUNT4_COUNT_M 0x00001FFF // Receive Packet Count
1913#define USB_RXCOUNT4_COUNT_S 0
1914
1915//*****************************************************************************
1916//
1917// The following are defines for the bit fields in the USB_O_TXTYPE4 register.
1918//
1919//*****************************************************************************
1920#define USB_TXTYPE4_SPEED_M 0x000000C0    // Operating Speed
1921#define USB_TXTYPE4_SPEED_DFLT 0x00000000 // Default
1922#define USB_TXTYPE4_SPEED_HIGH 0x00000040 // High
1923#define USB_TXTYPE4_SPEED_FULL 0x00000080 // Full
1924#define USB_TXTYPE4_SPEED_LOW 0x000000C0  // Low
1925#define USB_TXTYPE4_PROTO_M 0x00000030    // Protocol
1926#define USB_TXTYPE4_PROTO_CTRL 0x00000000 // Control
1927#define USB_TXTYPE4_PROTO_ISOC 0x00000010 // Isochronous
1928#define USB_TXTYPE4_PROTO_BULK 0x00000020 // Bulk
1929#define USB_TXTYPE4_PROTO_INT 0x00000030  // Interrupt
1930#define USB_TXTYPE4_TEP_M 0x0000000F      // Target Endpoint Number
1931#define USB_TXTYPE4_TEP_S 0
1932
1933//*****************************************************************************
1934//
1935// The following are defines for the bit fields in the USB_O_TXINTERVAL4
1936// register.
1937//
1938//*****************************************************************************
1939#define USB_TXINTERVAL4_TXPOLL_M 0x000000FF // TX Polling
1940#define USB_TXINTERVAL4_NAKLMT_M 0x000000FF // NAK Limit
1941#define USB_TXINTERVAL4_NAKLMT_S 0
1942#define USB_TXINTERVAL4_TXPOLL_S 0
1943
1944//*****************************************************************************
1945//
1946// The following are defines for the bit fields in the USB_O_RXTYPE4 register.
1947//
1948//*****************************************************************************
1949#define USB_RXTYPE4_SPEED_M 0x000000C0    // Operating Speed
1950#define USB_RXTYPE4_SPEED_DFLT 0x00000000 // Default
1951#define USB_RXTYPE4_SPEED_HIGH 0x00000040 // High
1952#define USB_RXTYPE4_SPEED_FULL 0x00000080 // Full
1953#define USB_RXTYPE4_SPEED_LOW 0x000000C0  // Low
1954#define USB_RXTYPE4_PROTO_M 0x00000030    // Protocol
1955#define USB_RXTYPE4_PROTO_CTRL 0x00000000 // Control
1956#define USB_RXTYPE4_PROTO_ISOC 0x00000010 // Isochronous
1957#define USB_RXTYPE4_PROTO_BULK 0x00000020 // Bulk
1958#define USB_RXTYPE4_PROTO_INT 0x00000030  // Interrupt
1959#define USB_RXTYPE4_TEP_M 0x0000000F      // Target Endpoint Number
1960#define USB_RXTYPE4_TEP_S 0
1961
1962//*****************************************************************************
1963//
1964// The following are defines for the bit fields in the USB_O_RXINTERVAL4
1965// register.
1966//
1967//*****************************************************************************
1968#define USB_RXINTERVAL4_TXPOLL_M 0x000000FF // RX Polling
1969#define USB_RXINTERVAL4_NAKLMT_M 0x000000FF // NAK Limit
1970#define USB_RXINTERVAL4_NAKLMT_S 0
1971#define USB_RXINTERVAL4_TXPOLL_S 0
1972
1973//*****************************************************************************
1974//
1975// The following are defines for the bit fields in the USB_O_TXMAXP5 register.
1976//
1977//*****************************************************************************
1978#define USB_TXMAXP5_MAXLOAD_M 0x000007FF // Maximum Payload
1979#define USB_TXMAXP5_MAXLOAD_S 0
1980
1981//*****************************************************************************
1982//
1983// The following are defines for the bit fields in the USB_O_TXCSRL5 register.
1984//
1985//*****************************************************************************
1986#define USB_TXCSRL5_NAKTO 0x00000080   // NAK Timeout
1987#define USB_TXCSRL5_CLRDT 0x00000040   // Clear Data Toggle
1988#define USB_TXCSRL5_STALLED 0x00000020 // Endpoint Stalled
1989#define USB_TXCSRL5_SETUP 0x00000010   // Setup Packet
1990#define USB_TXCSRL5_STALL 0x00000010   // Send STALL
1991#define USB_TXCSRL5_FLUSH 0x00000008   // Flush FIFO
1992#define USB_TXCSRL5_ERROR 0x00000004   // Error
1993#define USB_TXCSRL5_UNDRN 0x00000004   // Underrun
1994#define USB_TXCSRL5_FIFONE 0x00000002  // FIFO Not Empty
1995#define USB_TXCSRL5_TXRDY 0x00000001   // Transmit Packet Ready
1996
1997//*****************************************************************************
1998//
1999// The following are defines for the bit fields in the USB_O_TXCSRH5 register.
2000//
2001//*****************************************************************************
2002#define USB_TXCSRH5_AUTOSET 0x00000080 // Auto Set
2003#define USB_TXCSRH5_ISO 0x00000040     // Isochronous Transfers
2004#define USB_TXCSRH5_MODE 0x00000020    // Mode
2005#define USB_TXCSRH5_DMAEN 0x00000010   // DMA Request Enable
2006#define USB_TXCSRH5_FDT 0x00000008     // Force Data Toggle
2007#define USB_TXCSRH5_DMAMOD 0x00000004  // DMA Request Mode
2008#define USB_TXCSRH5_DTWE 0x00000002    // Data Toggle Write Enable
2009#define USB_TXCSRH5_DT 0x00000001      // Data Toggle
2010
2011//*****************************************************************************
2012//
2013// The following are defines for the bit fields in the USB_O_RXMAXP5 register.
2014//
2015//*****************************************************************************
2016#define USB_RXMAXP5_MAXLOAD_M 0x000007FF // Maximum Payload
2017#define USB_RXMAXP5_MAXLOAD_S 0
2018
2019//*****************************************************************************
2020//
2021// The following are defines for the bit fields in the USB_O_RXCSRL5 register.
2022//
2023//*****************************************************************************
2024#define USB_RXCSRL5_CLRDT 0x00000080   // Clear Data Toggle
2025#define USB_RXCSRL5_STALLED 0x00000040 // Endpoint Stalled
2026#define USB_RXCSRL5_STALL 0x00000020   // Send STALL
2027#define USB_RXCSRL5_REQPKT 0x00000020  // Request Packet
2028#define USB_RXCSRL5_FLUSH 0x00000010   // Flush FIFO
2029#define USB_RXCSRL5_NAKTO 0x00000008   // NAK Timeout
2030#define USB_RXCSRL5_DATAERR 0x00000008 // Data Error
2031#define USB_RXCSRL5_ERROR 0x00000004   // Error
2032#define USB_RXCSRL5_OVER 0x00000004    // Overrun
2033#define USB_RXCSRL5_FULL 0x00000002    // FIFO Full
2034#define USB_RXCSRL5_RXRDY 0x00000001   // Receive Packet Ready
2035
2036//*****************************************************************************
2037//
2038// The following are defines for the bit fields in the USB_O_RXCSRH5 register.
2039//
2040//*****************************************************************************
2041#define USB_RXCSRH5_AUTOCL 0x00000080  // Auto Clear
2042#define USB_RXCSRH5_AUTORQ 0x00000040  // Auto Request
2043#define USB_RXCSRH5_ISO 0x00000040     // Isochronous Transfers
2044#define USB_RXCSRH5_DMAEN 0x00000020   // DMA Request Enable
2045#define USB_RXCSRH5_DISNYET 0x00000010 // Disable NYET
2046#define USB_RXCSRH5_PIDERR 0x00000010  // PID Error
2047#define USB_RXCSRH5_DMAMOD 0x00000008  // DMA Request Mode
2048#define USB_RXCSRH5_DTWE 0x00000004    // Data Toggle Write Enable
2049#define USB_RXCSRH5_DT 0x00000002      // Data Toggle
2050#define USB_RXCSRH5_INCOMPRX                                                   \
2051    0x00000001 // Incomplete RX Transmission
2052               // Status
2053
2054//*****************************************************************************
2055//
2056// The following are defines for the bit fields in the USB_O_RXCOUNT5 register.
2057//
2058//*****************************************************************************
2059#define USB_RXCOUNT5_COUNT_M 0x00001FFF // Receive Packet Count
2060#define USB_RXCOUNT5_COUNT_S 0
2061
2062//*****************************************************************************
2063//
2064// The following are defines for the bit fields in the USB_O_TXTYPE5 register.
2065//
2066//*****************************************************************************
2067#define USB_TXTYPE5_SPEED_M 0x000000C0    // Operating Speed
2068#define USB_TXTYPE5_SPEED_DFLT 0x00000000 // Default
2069#define USB_TXTYPE5_SPEED_HIGH 0x00000040 // High
2070#define USB_TXTYPE5_SPEED_FULL 0x00000080 // Full
2071#define USB_TXTYPE5_SPEED_LOW 0x000000C0  // Low
2072#define USB_TXTYPE5_PROTO_M 0x00000030    // Protocol
2073#define USB_TXTYPE5_PROTO_CTRL 0x00000000 // Control
2074#define USB_TXTYPE5_PROTO_ISOC 0x00000010 // Isochronous
2075#define USB_TXTYPE5_PROTO_BULK 0x00000020 // Bulk
2076#define USB_TXTYPE5_PROTO_INT 0x00000030  // Interrupt
2077#define USB_TXTYPE5_TEP_M 0x0000000F      // Target Endpoint Number
2078#define USB_TXTYPE5_TEP_S 0
2079
2080//*****************************************************************************
2081//
2082// The following are defines for the bit fields in the USB_O_TXINTERVAL5
2083// register.
2084//
2085//*****************************************************************************
2086#define USB_TXINTERVAL5_TXPOLL_M 0x000000FF // TX Polling
2087#define USB_TXINTERVAL5_NAKLMT_M 0x000000FF // NAK Limit
2088#define USB_TXINTERVAL5_NAKLMT_S 0
2089#define USB_TXINTERVAL5_TXPOLL_S 0
2090
2091//*****************************************************************************
2092//
2093// The following are defines for the bit fields in the USB_O_RXTYPE5 register.
2094//
2095//*****************************************************************************
2096#define USB_RXTYPE5_SPEED_M 0x000000C0    // Operating Speed
2097#define USB_RXTYPE5_SPEED_DFLT 0x00000000 // Default
2098#define USB_RXTYPE5_SPEED_HIGH 0x00000040 // High
2099#define USB_RXTYPE5_SPEED_FULL 0x00000080 // Full
2100#define USB_RXTYPE5_SPEED_LOW 0x000000C0  // Low
2101#define USB_RXTYPE5_PROTO_M 0x00000030    // Protocol
2102#define USB_RXTYPE5_PROTO_CTRL 0x00000000 // Control
2103#define USB_RXTYPE5_PROTO_ISOC 0x00000010 // Isochronous
2104#define USB_RXTYPE5_PROTO_BULK 0x00000020 // Bulk
2105#define USB_RXTYPE5_PROTO_INT 0x00000030  // Interrupt
2106#define USB_RXTYPE5_TEP_M 0x0000000F      // Target Endpoint Number
2107#define USB_RXTYPE5_TEP_S 0
2108
2109//*****************************************************************************
2110//
2111// The following are defines for the bit fields in the USB_O_RXINTERVAL5
2112// register.
2113//
2114//*****************************************************************************
2115#define USB_RXINTERVAL5_TXPOLL_M 0x000000FF // RX Polling
2116#define USB_RXINTERVAL5_NAKLMT_M 0x000000FF // NAK Limit
2117#define USB_RXINTERVAL5_TXPOLL_S 0
2118#define USB_RXINTERVAL5_NAKLMT_S 0
2119
2120//*****************************************************************************
2121//
2122// The following are defines for the bit fields in the USB_O_TXMAXP6 register.
2123//
2124//*****************************************************************************
2125#define USB_TXMAXP6_MAXLOAD_M 0x000007FF // Maximum Payload
2126#define USB_TXMAXP6_MAXLOAD_S 0
2127
2128//*****************************************************************************
2129//
2130// The following are defines for the bit fields in the USB_O_TXCSRL6 register.
2131//
2132//*****************************************************************************
2133#define USB_TXCSRL6_NAKTO 0x00000080   // NAK Timeout
2134#define USB_TXCSRL6_CLRDT 0x00000040   // Clear Data Toggle
2135#define USB_TXCSRL6_STALLED 0x00000020 // Endpoint Stalled
2136#define USB_TXCSRL6_STALL 0x00000010   // Send STALL
2137#define USB_TXCSRL6_SETUP 0x00000010   // Setup Packet
2138#define USB_TXCSRL6_FLUSH 0x00000008   // Flush FIFO
2139#define USB_TXCSRL6_ERROR 0x00000004   // Error
2140#define USB_TXCSRL6_UNDRN 0x00000004   // Underrun
2141#define USB_TXCSRL6_FIFONE 0x00000002  // FIFO Not Empty
2142#define USB_TXCSRL6_TXRDY 0x00000001   // Transmit Packet Ready
2143
2144//*****************************************************************************
2145//
2146// The following are defines for the bit fields in the USB_O_TXCSRH6 register.
2147//
2148//*****************************************************************************
2149#define USB_TXCSRH6_AUTOSET 0x00000080 // Auto Set
2150#define USB_TXCSRH6_ISO 0x00000040     // Isochronous Transfers
2151#define USB_TXCSRH6_MODE 0x00000020    // Mode
2152#define USB_TXCSRH6_DMAEN 0x00000010   // DMA Request Enable
2153#define USB_TXCSRH6_FDT 0x00000008     // Force Data Toggle
2154#define USB_TXCSRH6_DMAMOD 0x00000004  // DMA Request Mode
2155#define USB_TXCSRH6_DTWE 0x00000002    // Data Toggle Write Enable
2156#define USB_TXCSRH6_DT 0x00000001      // Data Toggle
2157
2158//*****************************************************************************
2159//
2160// The following are defines for the bit fields in the USB_O_RXMAXP6 register.
2161//
2162//*****************************************************************************
2163#define USB_RXMAXP6_MAXLOAD_M 0x000007FF // Maximum Payload
2164#define USB_RXMAXP6_MAXLOAD_S 0
2165
2166//*****************************************************************************
2167//
2168// The following are defines for the bit fields in the USB_O_RXCSRL6 register.
2169//
2170//*****************************************************************************
2171#define USB_RXCSRL6_CLRDT 0x00000080   // Clear Data Toggle
2172#define USB_RXCSRL6_STALLED 0x00000040 // Endpoint Stalled
2173#define USB_RXCSRL6_REQPKT 0x00000020  // Request Packet
2174#define USB_RXCSRL6_STALL 0x00000020   // Send STALL
2175#define USB_RXCSRL6_FLUSH 0x00000010   // Flush FIFO
2176#define USB_RXCSRL6_NAKTO 0x00000008   // NAK Timeout
2177#define USB_RXCSRL6_DATAERR 0x00000008 // Data Error
2178#define USB_RXCSRL6_ERROR 0x00000004   // Error
2179#define USB_RXCSRL6_OVER 0x00000004    // Overrun
2180#define USB_RXCSRL6_FULL 0x00000002    // FIFO Full
2181#define USB_RXCSRL6_RXRDY 0x00000001   // Receive Packet Ready
2182
2183//*****************************************************************************
2184//
2185// The following are defines for the bit fields in the USB_O_RXCSRH6 register.
2186//
2187//*****************************************************************************
2188#define USB_RXCSRH6_AUTOCL 0x00000080  // Auto Clear
2189#define USB_RXCSRH6_AUTORQ 0x00000040  // Auto Request
2190#define USB_RXCSRH6_ISO 0x00000040     // Isochronous Transfers
2191#define USB_RXCSRH6_DMAEN 0x00000020   // DMA Request Enable
2192#define USB_RXCSRH6_DISNYET 0x00000010 // Disable NYET
2193#define USB_RXCSRH6_PIDERR 0x00000010  // PID Error
2194#define USB_RXCSRH6_DMAMOD 0x00000008  // DMA Request Mode
2195#define USB_RXCSRH6_DTWE 0x00000004    // Data Toggle Write Enable
2196#define USB_RXCSRH6_DT 0x00000002      // Data Toggle
2197#define USB_RXCSRH6_INCOMPRX                                                   \
2198    0x00000001 // Incomplete RX Transmission
2199               // Status
2200
2201//*****************************************************************************
2202//
2203// The following are defines for the bit fields in the USB_O_RXCOUNT6 register.
2204//
2205//*****************************************************************************
2206#define USB_RXCOUNT6_COUNT_M 0x00001FFF // Receive Packet Count
2207#define USB_RXCOUNT6_COUNT_S 0
2208
2209//*****************************************************************************
2210//
2211// The following are defines for the bit fields in the USB_O_TXTYPE6 register.
2212//
2213//*****************************************************************************
2214#define USB_TXTYPE6_SPEED_M 0x000000C0    // Operating Speed
2215#define USB_TXTYPE6_SPEED_DFLT 0x00000000 // Default
2216#define USB_TXTYPE6_SPEED_HIGH 0x00000040 // High
2217#define USB_TXTYPE6_SPEED_FULL 0x00000080 // Full
2218#define USB_TXTYPE6_SPEED_LOW 0x000000C0  // Low
2219#define USB_TXTYPE6_PROTO_M 0x00000030    // Protocol
2220#define USB_TXTYPE6_PROTO_CTRL 0x00000000 // Control
2221#define USB_TXTYPE6_PROTO_ISOC 0x00000010 // Isochronous
2222#define USB_TXTYPE6_PROTO_BULK 0x00000020 // Bulk
2223#define USB_TXTYPE6_PROTO_INT 0x00000030  // Interrupt
2224#define USB_TXTYPE6_TEP_M 0x0000000F      // Target Endpoint Number
2225#define USB_TXTYPE6_TEP_S 0
2226
2227//*****************************************************************************
2228//
2229// The following are defines for the bit fields in the USB_O_TXINTERVAL6
2230// register.
2231//
2232//*****************************************************************************
2233#define USB_TXINTERVAL6_TXPOLL_M 0x000000FF // TX Polling
2234#define USB_TXINTERVAL6_NAKLMT_M 0x000000FF // NAK Limit
2235#define USB_TXINTERVAL6_TXPOLL_S 0
2236#define USB_TXINTERVAL6_NAKLMT_S 0
2237
2238//*****************************************************************************
2239//
2240// The following are defines for the bit fields in the USB_O_RXTYPE6 register.
2241//
2242//*****************************************************************************
2243#define USB_RXTYPE6_SPEED_M 0x000000C0    // Operating Speed
2244#define USB_RXTYPE6_SPEED_DFLT 0x00000000 // Default
2245#define USB_RXTYPE6_SPEED_HIGH 0x00000040 // High
2246#define USB_RXTYPE6_SPEED_FULL 0x00000080 // Full
2247#define USB_RXTYPE6_SPEED_LOW 0x000000C0  // Low
2248#define USB_RXTYPE6_PROTO_M 0x00000030    // Protocol
2249#define USB_RXTYPE6_PROTO_CTRL 0x00000000 // Control
2250#define USB_RXTYPE6_PROTO_ISOC 0x00000010 // Isochronous
2251#define USB_RXTYPE6_PROTO_BULK 0x00000020 // Bulk
2252#define USB_RXTYPE6_PROTO_INT 0x00000030  // Interrupt
2253#define USB_RXTYPE6_TEP_M 0x0000000F      // Target Endpoint Number
2254#define USB_RXTYPE6_TEP_S 0
2255
2256//*****************************************************************************
2257//
2258// The following are defines for the bit fields in the USB_O_RXINTERVAL6
2259// register.
2260//
2261//*****************************************************************************
2262#define USB_RXINTERVAL6_TXPOLL_M 0x000000FF // RX Polling
2263#define USB_RXINTERVAL6_NAKLMT_M 0x000000FF // NAK Limit
2264#define USB_RXINTERVAL6_NAKLMT_S 0
2265#define USB_RXINTERVAL6_TXPOLL_S 0
2266
2267//*****************************************************************************
2268//
2269// The following are defines for the bit fields in the USB_O_TXMAXP7 register.
2270//
2271//*****************************************************************************
2272#define USB_TXMAXP7_MAXLOAD_M 0x000007FF // Maximum Payload
2273#define USB_TXMAXP7_MAXLOAD_S 0
2274
2275//*****************************************************************************
2276//
2277// The following are defines for the bit fields in the USB_O_TXCSRL7 register.
2278//
2279//*****************************************************************************
2280#define USB_TXCSRL7_NAKTO 0x00000080   // NAK Timeout
2281#define USB_TXCSRL7_CLRDT 0x00000040   // Clear Data Toggle
2282#define USB_TXCSRL7_STALLED 0x00000020 // Endpoint Stalled
2283#define USB_TXCSRL7_STALL 0x00000010   // Send STALL
2284#define USB_TXCSRL7_SETUP 0x00000010   // Setup Packet
2285#define USB_TXCSRL7_FLUSH 0x00000008   // Flush FIFO
2286#define USB_TXCSRL7_ERROR 0x00000004   // Error
2287#define USB_TXCSRL7_UNDRN 0x00000004   // Underrun
2288#define USB_TXCSRL7_FIFONE 0x00000002  // FIFO Not Empty
2289#define USB_TXCSRL7_TXRDY 0x00000001   // Transmit Packet Ready
2290
2291//*****************************************************************************
2292//
2293// The following are defines for the bit fields in the USB_O_TXCSRH7 register.
2294//
2295//*****************************************************************************
2296#define USB_TXCSRH7_AUTOSET 0x00000080 // Auto Set
2297#define USB_TXCSRH7_ISO 0x00000040     // Isochronous Transfers
2298#define USB_TXCSRH7_MODE 0x00000020    // Mode
2299#define USB_TXCSRH7_DMAEN 0x00000010   // DMA Request Enable
2300#define USB_TXCSRH7_FDT 0x00000008     // Force Data Toggle
2301#define USB_TXCSRH7_DMAMOD 0x00000004  // DMA Request Mode
2302#define USB_TXCSRH7_DTWE 0x00000002    // Data Toggle Write Enable
2303#define USB_TXCSRH7_DT 0x00000001      // Data Toggle
2304
2305//*****************************************************************************
2306//
2307// The following are defines for the bit fields in the USB_O_RXMAXP7 register.
2308//
2309//*****************************************************************************
2310#define USB_RXMAXP7_MAXLOAD_M 0x000007FF // Maximum Payload
2311#define USB_RXMAXP7_MAXLOAD_S 0
2312
2313//*****************************************************************************
2314//
2315// The following are defines for the bit fields in the USB_O_RXCSRL7 register.
2316//
2317//*****************************************************************************
2318#define USB_RXCSRL7_CLRDT 0x00000080   // Clear Data Toggle
2319#define USB_RXCSRL7_STALLED 0x00000040 // Endpoint Stalled
2320#define USB_RXCSRL7_REQPKT 0x00000020  // Request Packet
2321#define USB_RXCSRL7_STALL 0x00000020   // Send STALL
2322#define USB_RXCSRL7_FLUSH 0x00000010   // Flush FIFO
2323#define USB_RXCSRL7_DATAERR 0x00000008 // Data Error
2324#define USB_RXCSRL7_NAKTO 0x00000008   // NAK Timeout
2325#define USB_RXCSRL7_ERROR 0x00000004   // Error
2326#define USB_RXCSRL7_OVER 0x00000004    // Overrun
2327#define USB_RXCSRL7_FULL 0x00000002    // FIFO Full
2328#define USB_RXCSRL7_RXRDY 0x00000001   // Receive Packet Ready
2329
2330//*****************************************************************************
2331//
2332// The following are defines for the bit fields in the USB_O_RXCSRH7 register.
2333//
2334//*****************************************************************************
2335#define USB_RXCSRH7_AUTOCL 0x00000080  // Auto Clear
2336#define USB_RXCSRH7_ISO 0x00000040     // Isochronous Transfers
2337#define USB_RXCSRH7_AUTORQ 0x00000040  // Auto Request
2338#define USB_RXCSRH7_DMAEN 0x00000020   // DMA Request Enable
2339#define USB_RXCSRH7_PIDERR 0x00000010  // PID Error
2340#define USB_RXCSRH7_DISNYET 0x00000010 // Disable NYET
2341#define USB_RXCSRH7_DMAMOD 0x00000008  // DMA Request Mode
2342#define USB_RXCSRH7_DTWE 0x00000004    // Data Toggle Write Enable
2343#define USB_RXCSRH7_DT 0x00000002      // Data Toggle
2344#define USB_RXCSRH7_INCOMPRX                                                   \
2345    0x00000001 // Incomplete RX Transmission
2346               // Status
2347
2348//*****************************************************************************
2349//
2350// The following are defines for the bit fields in the USB_O_RXCOUNT7 register.
2351//
2352//*****************************************************************************
2353#define USB_RXCOUNT7_COUNT_M 0x00001FFF // Receive Packet Count
2354#define USB_RXCOUNT7_COUNT_S 0
2355
2356//*****************************************************************************
2357//
2358// The following are defines for the bit fields in the USB_O_TXTYPE7 register.
2359//
2360//*****************************************************************************
2361#define USB_TXTYPE7_SPEED_M 0x000000C0    // Operating Speed
2362#define USB_TXTYPE7_SPEED_DFLT 0x00000000 // Default
2363#define USB_TXTYPE7_SPEED_HIGH 0x00000040 // High
2364#define USB_TXTYPE7_SPEED_FULL 0x00000080 // Full
2365#define USB_TXTYPE7_SPEED_LOW 0x000000C0  // Low
2366#define USB_TXTYPE7_PROTO_M 0x00000030    // Protocol
2367#define USB_TXTYPE7_PROTO_CTRL 0x00000000 // Control
2368#define USB_TXTYPE7_PROTO_ISOC 0x00000010 // Isochronous
2369#define USB_TXTYPE7_PROTO_BULK 0x00000020 // Bulk
2370#define USB_TXTYPE7_PROTO_INT 0x00000030  // Interrupt
2371#define USB_TXTYPE7_TEP_M 0x0000000F      // Target Endpoint Number
2372#define USB_TXTYPE7_TEP_S 0
2373
2374//*****************************************************************************
2375//
2376// The following are defines for the bit fields in the USB_O_TXINTERVAL7
2377// register.
2378//
2379//*****************************************************************************
2380#define USB_TXINTERVAL7_TXPOLL_M 0x000000FF // TX Polling
2381#define USB_TXINTERVAL7_NAKLMT_M 0x000000FF // NAK Limit
2382#define USB_TXINTERVAL7_NAKLMT_S 0
2383#define USB_TXINTERVAL7_TXPOLL_S 0
2384
2385//*****************************************************************************
2386//
2387// The following are defines for the bit fields in the USB_O_RXTYPE7 register.
2388//
2389//*****************************************************************************
2390#define USB_RXTYPE7_SPEED_M 0x000000C0    // Operating Speed
2391#define USB_RXTYPE7_SPEED_DFLT 0x00000000 // Default
2392#define USB_RXTYPE7_SPEED_HIGH 0x00000040 // High
2393#define USB_RXTYPE7_SPEED_FULL 0x00000080 // Full
2394#define USB_RXTYPE7_SPEED_LOW 0x000000C0  // Low
2395#define USB_RXTYPE7_PROTO_M 0x00000030    // Protocol
2396#define USB_RXTYPE7_PROTO_CTRL 0x00000000 // Control
2397#define USB_RXTYPE7_PROTO_ISOC 0x00000010 // Isochronous
2398#define USB_RXTYPE7_PROTO_BULK 0x00000020 // Bulk
2399#define USB_RXTYPE7_PROTO_INT 0x00000030  // Interrupt
2400#define USB_RXTYPE7_TEP_M 0x0000000F      // Target Endpoint Number
2401#define USB_RXTYPE7_TEP_S 0
2402
2403//*****************************************************************************
2404//
2405// The following are defines for the bit fields in the USB_O_RXINTERVAL7
2406// register.
2407//
2408//*****************************************************************************
2409#define USB_RXINTERVAL7_TXPOLL_M 0x000000FF // RX Polling
2410#define USB_RXINTERVAL7_NAKLMT_M 0x000000FF // NAK Limit
2411#define USB_RXINTERVAL7_NAKLMT_S 0
2412#define USB_RXINTERVAL7_TXPOLL_S 0
2413
2414//*****************************************************************************
2415//
2416// The following are defines for the bit fields in the USB_O_DMAINTR register.
2417//
2418//*****************************************************************************
2419#define USB_DMAINTR_CH7 0x00000080 // Channel 7 DMA Interrupt
2420#define USB_DMAINTR_CH6 0x00000040 // Channel 6 DMA Interrupt
2421#define USB_DMAINTR_CH5 0x00000020 // Channel 5 DMA Interrupt
2422#define USB_DMAINTR_CH4 0x00000010 // Channel 4 DMA Interrupt
2423#define USB_DMAINTR_CH3 0x00000008 // Channel 3 DMA Interrupt
2424#define USB_DMAINTR_CH2 0x00000004 // Channel 2 DMA Interrupt
2425#define USB_DMAINTR_CH1 0x00000002 // Channel 1 DMA Interrupt
2426#define USB_DMAINTR_CH0 0x00000001 // Channel 0 DMA Interrupt
2427
2428//*****************************************************************************
2429//
2430// The following are defines for the bit fields in the USB_O_DMACTL0 register.
2431//
2432//*****************************************************************************
2433#define USB_DMACTL0_BRSTM_M 0x00000600    // Burst Mode
2434#define USB_DMACTL0_BRSTM_ANY 0x00000000  // Bursts of unspecified length
2435#define USB_DMACTL0_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
2436#define USB_DMACTL0_BRSTM_INC8                                                 \
2437    0x00000400 // INCR8, INCR4 or unspecified
2438               // length
2439#define USB_DMACTL0_BRSTM_INC16                                                \
2440    0x00000600                        // INCR16, INCR8, INCR4 or
2441                                      // unspecified length
2442#define USB_DMACTL0_ERR 0x00000100    // Bus Error Bit
2443#define USB_DMACTL0_EP_M 0x000000F0   // Endpoint number
2444#define USB_DMACTL0_IE 0x00000008     // DMA Interrupt Enable
2445#define USB_DMACTL0_MODE 0x00000004   // DMA Transfer Mode
2446#define USB_DMACTL0_DIR 0x00000002    // DMA Direction
2447#define USB_DMACTL0_ENABLE 0x00000001 // DMA Transfer Enable
2448#define USB_DMACTL0_EP_S 4
2449
2450//*****************************************************************************
2451//
2452// The following are defines for the bit fields in the USB_O_DMAADDR0 register.
2453//
2454//*****************************************************************************
2455#define USB_DMAADDR0_ADDR_M 0xFFFFFFFC // DMA Address
2456#define USB_DMAADDR0_ADDR_S 2
2457
2458//*****************************************************************************
2459//
2460// The following are defines for the bit fields in the USB_O_DMACOUNT0
2461// register.
2462//
2463//*****************************************************************************
2464#define USB_DMACOUNT0_COUNT_M 0xFFFFFFFC // DMA Count
2465#define USB_DMACOUNT0_COUNT_S 2
2466
2467//*****************************************************************************
2468//
2469// The following are defines for the bit fields in the USB_O_DMACTL1 register.
2470//
2471//*****************************************************************************
2472#define USB_DMACTL1_BRSTM_M 0x00000600    // Burst Mode
2473#define USB_DMACTL1_BRSTM_ANY 0x00000000  // Bursts of unspecified length
2474#define USB_DMACTL1_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
2475#define USB_DMACTL1_BRSTM_INC8                                                 \
2476    0x00000400 // INCR8, INCR4 or unspecified
2477               // length
2478#define USB_DMACTL1_BRSTM_INC16                                                \
2479    0x00000600                        // INCR16, INCR8, INCR4 or
2480                                      // unspecified length
2481#define USB_DMACTL1_ERR 0x00000100    // Bus Error Bit
2482#define USB_DMACTL1_EP_M 0x000000F0   // Endpoint number
2483#define USB_DMACTL1_IE 0x00000008     // DMA Interrupt Enable
2484#define USB_DMACTL1_MODE 0x00000004   // DMA Transfer Mode
2485#define USB_DMACTL1_DIR 0x00000002    // DMA Direction
2486#define USB_DMACTL1_ENABLE 0x00000001 // DMA Transfer Enable
2487#define USB_DMACTL1_EP_S 4
2488
2489//*****************************************************************************
2490//
2491// The following are defines for the bit fields in the USB_O_DMAADDR1 register.
2492//
2493//*****************************************************************************
2494#define USB_DMAADDR1_ADDR_M 0xFFFFFFFC // DMA Address
2495#define USB_DMAADDR1_ADDR_S 2
2496
2497//*****************************************************************************
2498//
2499// The following are defines for the bit fields in the USB_O_DMACOUNT1
2500// register.
2501//
2502//*****************************************************************************
2503#define USB_DMACOUNT1_COUNT_M 0xFFFFFFFC // DMA Count
2504#define USB_DMACOUNT1_COUNT_S 2
2505
2506//*****************************************************************************
2507//
2508// The following are defines for the bit fields in the USB_O_DMACTL2 register.
2509//
2510//*****************************************************************************
2511#define USB_DMACTL2_BRSTM_M 0x00000600    // Burst Mode
2512#define USB_DMACTL2_BRSTM_ANY 0x00000000  // Bursts of unspecified length
2513#define USB_DMACTL2_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
2514#define USB_DMACTL2_BRSTM_INC8                                                 \
2515    0x00000400 // INCR8, INCR4 or unspecified
2516               // length
2517#define USB_DMACTL2_BRSTM_INC16                                                \
2518    0x00000600                        // INCR16, INCR8, INCR4 or
2519                                      // unspecified length
2520#define USB_DMACTL2_ERR 0x00000100    // Bus Error Bit
2521#define USB_DMACTL2_EP_M 0x000000F0   // Endpoint number
2522#define USB_DMACTL2_IE 0x00000008     // DMA Interrupt Enable
2523#define USB_DMACTL2_MODE 0x00000004   // DMA Transfer Mode
2524#define USB_DMACTL2_DIR 0x00000002    // DMA Direction
2525#define USB_DMACTL2_ENABLE 0x00000001 // DMA Transfer Enable
2526#define USB_DMACTL2_EP_S 4
2527
2528//*****************************************************************************
2529//
2530// The following are defines for the bit fields in the USB_O_DMAADDR2 register.
2531//
2532//*****************************************************************************
2533#define USB_DMAADDR2_ADDR_M 0xFFFFFFFC // DMA Address
2534#define USB_DMAADDR2_ADDR_S 2
2535
2536//*****************************************************************************
2537//
2538// The following are defines for the bit fields in the USB_O_DMACOUNT2
2539// register.
2540//
2541//*****************************************************************************
2542#define USB_DMACOUNT2_COUNT_M 0xFFFFFFFC // DMA Count
2543#define USB_DMACOUNT2_COUNT_S 2
2544
2545//*****************************************************************************
2546//
2547// The following are defines for the bit fields in the USB_O_DMACTL3 register.
2548//
2549//*****************************************************************************
2550#define USB_DMACTL3_BRSTM_M 0x00000600    // Burst Mode
2551#define USB_DMACTL3_BRSTM_ANY 0x00000000  // Bursts of unspecified length
2552#define USB_DMACTL3_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
2553#define USB_DMACTL3_BRSTM_INC8                                                 \
2554    0x00000400 // INCR8, INCR4 or unspecified
2555               // length
2556#define USB_DMACTL3_BRSTM_INC16                                                \
2557    0x00000600                        // INCR16, INCR8, INCR4 or
2558                                      // unspecified length
2559#define USB_DMACTL3_ERR 0x00000100    // Bus Error Bit
2560#define USB_DMACTL3_EP_M 0x000000F0   // Endpoint number
2561#define USB_DMACTL3_IE 0x00000008     // DMA Interrupt Enable
2562#define USB_DMACTL3_MODE 0x00000004   // DMA Transfer Mode
2563#define USB_DMACTL3_DIR 0x00000002    // DMA Direction
2564#define USB_DMACTL3_ENABLE 0x00000001 // DMA Transfer Enable
2565#define USB_DMACTL3_EP_S 4
2566
2567//*****************************************************************************
2568//
2569// The following are defines for the bit fields in the USB_O_DMAADDR3 register.
2570//
2571//*****************************************************************************
2572#define USB_DMAADDR3_ADDR_M 0xFFFFFFFC // DMA Address
2573#define USB_DMAADDR3_ADDR_S 2
2574
2575//*****************************************************************************
2576//
2577// The following are defines for the bit fields in the USB_O_DMACOUNT3
2578// register.
2579//
2580//*****************************************************************************
2581#define USB_DMACOUNT3_COUNT_M 0xFFFFFFFC // DMA Count
2582#define USB_DMACOUNT3_COUNT_S 2
2583
2584//*****************************************************************************
2585//
2586// The following are defines for the bit fields in the USB_O_DMACTL4 register.
2587//
2588//*****************************************************************************
2589#define USB_DMACTL4_BRSTM_M 0x00000600    // Burst Mode
2590#define USB_DMACTL4_BRSTM_ANY 0x00000000  // Bursts of unspecified length
2591#define USB_DMACTL4_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
2592#define USB_DMACTL4_BRSTM_INC8                                                 \
2593    0x00000400 // INCR8, INCR4 or unspecified
2594               // length
2595#define USB_DMACTL4_BRSTM_INC16                                                \
2596    0x00000600                        // INCR16, INCR8, INCR4 or
2597                                      // unspecified length
2598#define USB_DMACTL4_ERR 0x00000100    // Bus Error Bit
2599#define USB_DMACTL4_EP_M 0x000000F0   // Endpoint number
2600#define USB_DMACTL4_IE 0x00000008     // DMA Interrupt Enable
2601#define USB_DMACTL4_MODE 0x00000004   // DMA Transfer Mode
2602#define USB_DMACTL4_DIR 0x00000002    // DMA Direction
2603#define USB_DMACTL4_ENABLE 0x00000001 // DMA Transfer Enable
2604#define USB_DMACTL4_EP_S 4
2605
2606//*****************************************************************************
2607//
2608// The following are defines for the bit fields in the USB_O_DMAADDR4 register.
2609//
2610//*****************************************************************************
2611#define USB_DMAADDR4_ADDR_M 0xFFFFFFFC // DMA Address
2612#define USB_DMAADDR4_ADDR_S 2
2613
2614//*****************************************************************************
2615//
2616// The following are defines for the bit fields in the USB_O_DMACOUNT4
2617// register.
2618//
2619//*****************************************************************************
2620#define USB_DMACOUNT4_COUNT_M 0xFFFFFFFC // DMA Count
2621#define USB_DMACOUNT4_COUNT_S 2
2622
2623//*****************************************************************************
2624//
2625// The following are defines for the bit fields in the USB_O_DMACTL5 register.
2626//
2627//*****************************************************************************
2628#define USB_DMACTL5_BRSTM_M 0x00000600    // Burst Mode
2629#define USB_DMACTL5_BRSTM_ANY 0x00000000  // Bursts of unspecified length
2630#define USB_DMACTL5_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
2631#define USB_DMACTL5_BRSTM_INC8                                                 \
2632    0x00000400 // INCR8, INCR4 or unspecified
2633               // length
2634#define USB_DMACTL5_BRSTM_INC16                                                \
2635    0x00000600                        // INCR16, INCR8, INCR4 or
2636                                      // unspecified length
2637#define USB_DMACTL5_ERR 0x00000100    // Bus Error Bit
2638#define USB_DMACTL5_EP_M 0x000000F0   // Endpoint number
2639#define USB_DMACTL5_IE 0x00000008     // DMA Interrupt Enable
2640#define USB_DMACTL5_MODE 0x00000004   // DMA Transfer Mode
2641#define USB_DMACTL5_DIR 0x00000002    // DMA Direction
2642#define USB_DMACTL5_ENABLE 0x00000001 // DMA Transfer Enable
2643#define USB_DMACTL5_EP_S 4
2644
2645//*****************************************************************************
2646//
2647// The following are defines for the bit fields in the USB_O_DMAADDR5 register.
2648//
2649//*****************************************************************************
2650#define USB_DMAADDR5_ADDR_M 0xFFFFFFFC // DMA Address
2651#define USB_DMAADDR5_ADDR_S 2
2652
2653//*****************************************************************************
2654//
2655// The following are defines for the bit fields in the USB_O_DMACOUNT5
2656// register.
2657//
2658//*****************************************************************************
2659#define USB_DMACOUNT5_COUNT_M 0xFFFFFFFC // DMA Count
2660#define USB_DMACOUNT5_COUNT_S 2
2661
2662//*****************************************************************************
2663//
2664// The following are defines for the bit fields in the USB_O_DMACTL6 register.
2665//
2666//*****************************************************************************
2667#define USB_DMACTL6_BRSTM_M 0x00000600    // Burst Mode
2668#define USB_DMACTL6_BRSTM_ANY 0x00000000  // Bursts of unspecified length
2669#define USB_DMACTL6_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
2670#define USB_DMACTL6_BRSTM_INC8                                                 \
2671    0x00000400 // INCR8, INCR4 or unspecified
2672               // length
2673#define USB_DMACTL6_BRSTM_INC16                                                \
2674    0x00000600                        // INCR16, INCR8, INCR4 or
2675                                      // unspecified length
2676#define USB_DMACTL6_ERR 0x00000100    // Bus Error Bit
2677#define USB_DMACTL6_EP_M 0x000000F0   // Endpoint number
2678#define USB_DMACTL6_IE 0x00000008     // DMA Interrupt Enable
2679#define USB_DMACTL6_MODE 0x00000004   // DMA Transfer Mode
2680#define USB_DMACTL6_DIR 0x00000002    // DMA Direction
2681#define USB_DMACTL6_ENABLE 0x00000001 // DMA Transfer Enable
2682#define USB_DMACTL6_EP_S 4
2683
2684//*****************************************************************************
2685//
2686// The following are defines for the bit fields in the USB_O_DMAADDR6 register.
2687//
2688//*****************************************************************************
2689#define USB_DMAADDR6_ADDR_M 0xFFFFFFFC // DMA Address
2690#define USB_DMAADDR6_ADDR_S 2
2691
2692//*****************************************************************************
2693//
2694// The following are defines for the bit fields in the USB_O_DMACOUNT6
2695// register.
2696//
2697//*****************************************************************************
2698#define USB_DMACOUNT6_COUNT_M 0xFFFFFFFC // DMA Count
2699#define USB_DMACOUNT6_COUNT_S 2
2700
2701//*****************************************************************************
2702//
2703// The following are defines for the bit fields in the USB_O_DMACTL7 register.
2704//
2705//*****************************************************************************
2706#define USB_DMACTL7_BRSTM_M 0x00000600    // Burst Mode
2707#define USB_DMACTL7_BRSTM_ANY 0x00000000  // Bursts of unspecified length
2708#define USB_DMACTL7_BRSTM_INC4 0x00000200 // INCR4 or unspecified length
2709#define USB_DMACTL7_BRSTM_INC8                                                 \
2710    0x00000400 // INCR8, INCR4 or unspecified
2711               // length
2712#define USB_DMACTL7_BRSTM_INC16                                                \
2713    0x00000600                        // INCR16, INCR8, INCR4 or
2714                                      // unspecified length
2715#define USB_DMACTL7_ERR 0x00000100    // Bus Error Bit
2716#define USB_DMACTL7_EP_M 0x000000F0   // Endpoint number
2717#define USB_DMACTL7_IE 0x00000008     // DMA Interrupt Enable
2718#define USB_DMACTL7_MODE 0x00000004   // DMA Transfer Mode
2719#define USB_DMACTL7_DIR 0x00000002    // DMA Direction
2720#define USB_DMACTL7_ENABLE 0x00000001 // DMA Transfer Enable
2721#define USB_DMACTL7_EP_S 4
2722
2723//*****************************************************************************
2724//
2725// The following are defines for the bit fields in the USB_O_DMAADDR7 register.
2726//
2727//*****************************************************************************
2728#define USB_DMAADDR7_ADDR_M 0xFFFFFFFC // DMA Address
2729#define USB_DMAADDR7_ADDR_S 2
2730
2731//*****************************************************************************
2732//
2733// The following are defines for the bit fields in the USB_O_DMACOUNT7
2734// register.
2735//
2736//*****************************************************************************
2737#define USB_DMACOUNT7_COUNT_M 0xFFFFFFFC // DMA Count
2738#define USB_DMACOUNT7_COUNT_S 2
2739
2740//*****************************************************************************
2741//
2742// The following are defines for the bit fields in the USB_O_RQPKTCOUNT1
2743// register.
2744//
2745//*****************************************************************************
2746#define USB_RQPKTCOUNT1_M 0x0000FFFF // Block Transfer Packet Count
2747#define USB_RQPKTCOUNT1_S 0
2748
2749//*****************************************************************************
2750//
2751// The following are defines for the bit fields in the USB_O_RQPKTCOUNT2
2752// register.
2753//
2754//*****************************************************************************
2755#define USB_RQPKTCOUNT2_M 0x0000FFFF // Block Transfer Packet Count
2756#define USB_RQPKTCOUNT2_S 0
2757
2758//*****************************************************************************
2759//
2760// The following are defines for the bit fields in the USB_O_RQPKTCOUNT3
2761// register.
2762//
2763//*****************************************************************************
2764#define USB_RQPKTCOUNT3_M 0x0000FFFF // Block Transfer Packet Count
2765#define USB_RQPKTCOUNT3_S 0
2766
2767//*****************************************************************************
2768//
2769// The following are defines for the bit fields in the USB_O_RQPKTCOUNT4
2770// register.
2771//
2772//*****************************************************************************
2773#define USB_RQPKTCOUNT4_COUNT_M 0x0000FFFF // Block Transfer Packet Count
2774#define USB_RQPKTCOUNT4_COUNT_S 0
2775
2776//*****************************************************************************
2777//
2778// The following are defines for the bit fields in the USB_O_RQPKTCOUNT5
2779// register.
2780//
2781//*****************************************************************************
2782#define USB_RQPKTCOUNT5_COUNT_M 0x0000FFFF // Block Transfer Packet Count
2783#define USB_RQPKTCOUNT5_COUNT_S 0
2784
2785//*****************************************************************************
2786//
2787// The following are defines for the bit fields in the USB_O_RQPKTCOUNT6
2788// register.
2789//
2790//*****************************************************************************
2791#define USB_RQPKTCOUNT6_COUNT_M 0x0000FFFF // Block Transfer Packet Count
2792#define USB_RQPKTCOUNT6_COUNT_S 0
2793
2794//*****************************************************************************
2795//
2796// The following are defines for the bit fields in the USB_O_RQPKTCOUNT7
2797// register.
2798//
2799//*****************************************************************************
2800#define USB_RQPKTCOUNT7_COUNT_M 0x0000FFFF // Block Transfer Packet Count
2801#define USB_RQPKTCOUNT7_COUNT_S 0
2802
2803//*****************************************************************************
2804//
2805// The following are defines for the bit fields in the USB_O_RXDPKTBUFDIS
2806// register.
2807//
2808//*****************************************************************************
2809#define USB_RXDPKTBUFDIS_EP7                                                   \
2810    0x00000080 // EP7 RX Double-Packet Buffer
2811               // Disable
2812#define USB_RXDPKTBUFDIS_EP6                                                   \
2813    0x00000040 // EP6 RX Double-Packet Buffer
2814               // Disable
2815#define USB_RXDPKTBUFDIS_EP5                                                   \
2816    0x00000020 // EP5 RX Double-Packet Buffer
2817               // Disable
2818#define USB_RXDPKTBUFDIS_EP4                                                   \
2819    0x00000010 // EP4 RX Double-Packet Buffer
2820               // Disable
2821#define USB_RXDPKTBUFDIS_EP3                                                   \
2822    0x00000008 // EP3 RX Double-Packet Buffer
2823               // Disable
2824#define USB_RXDPKTBUFDIS_EP2                                                   \
2825    0x00000004 // EP2 RX Double-Packet Buffer
2826               // Disable
2827#define USB_RXDPKTBUFDIS_EP1                                                   \
2828    0x00000002 // EP1 RX Double-Packet Buffer
2829               // Disable
2830
2831//*****************************************************************************
2832//
2833// The following are defines for the bit fields in the USB_O_TXDPKTBUFDIS
2834// register.
2835//
2836//*****************************************************************************
2837#define USB_TXDPKTBUFDIS_EP7                                                   \
2838    0x00000080 // EP7 TX Double-Packet Buffer
2839               // Disable
2840#define USB_TXDPKTBUFDIS_EP6                                                   \
2841    0x00000040 // EP6 TX Double-Packet Buffer
2842               // Disable
2843#define USB_TXDPKTBUFDIS_EP5                                                   \
2844    0x00000020 // EP5 TX Double-Packet Buffer
2845               // Disable
2846#define USB_TXDPKTBUFDIS_EP4                                                   \
2847    0x00000010 // EP4 TX Double-Packet Buffer
2848               // Disable
2849#define USB_TXDPKTBUFDIS_EP3                                                   \
2850    0x00000008 // EP3 TX Double-Packet Buffer
2851               // Disable
2852#define USB_TXDPKTBUFDIS_EP2                                                   \
2853    0x00000004 // EP2 TX Double-Packet Buffer
2854               // Disable
2855#define USB_TXDPKTBUFDIS_EP1                                                   \
2856    0x00000002 // EP1 TX Double-Packet Buffer
2857               // Disable
2858
2859//*****************************************************************************
2860//
2861// The following are defines for the bit fields in the USB_O_CTO register.
2862//
2863//*****************************************************************************
2864#define USB_CTO_CCTV_M 0x0000FFFF // Configurable Chirp Timeout Value
2865#define USB_CTO_CCTV_S 0
2866
2867//*****************************************************************************
2868//
2869// The following are defines for the bit fields in the USB_O_HHSRTN register.
2870//
2871//*****************************************************************************
2872#define USB_HHSRTN_HHSRTN_M                                                    \
2873    0x0000FFFF // HIgh Speed to UTM Operating
2874               // Delay
2875#define USB_HHSRTN_HHSRTN_S 0
2876
2877//*****************************************************************************
2878//
2879// The following are defines for the bit fields in the USB_O_HSBT register.
2880//
2881//*****************************************************************************
2882#define USB_HSBT_HSBT_M 0x0000000F // High Speed Timeout Adder
2883#define USB_HSBT_HSBT_S 0
2884
2885//*****************************************************************************
2886//
2887// The following are defines for the bit fields in the USB_O_LPMATTR register.
2888//
2889//*****************************************************************************
2890#define USB_LPMATTR_ENDPT_M 0x0000F000 // Endpoint
2891#define USB_LPMATTR_RMTWAK 0x00000100  // Remote Wake
2892#define USB_LPMATTR_HIRD_M 0x000000F0  // Host Initiated Resume Duration
2893#define USB_LPMATTR_LS_M 0x0000000F    // Link State
2894#define USB_LPMATTR_LS_L1 0x00000001   // Sleep State (L1)
2895#define USB_LPMATTR_ENDPT_S 12
2896#define USB_LPMATTR_HIRD_S 4
2897
2898//*****************************************************************************
2899//
2900// The following are defines for the bit fields in the USB_O_LPMCNTRL register.
2901//
2902//*****************************************************************************
2903#define USB_LPMCNTRL_NAK 0x00000010  // LPM NAK
2904#define USB_LPMCNTRL_EN_M 0x0000000C // LPM Enable
2905#define USB_LPMCNTRL_EN_NONE                                                   \
2906    0x00000000 // LPM and Extended transactions
2907               // are not supported. In this case,
2908               // the USB does not respond to LPM
2909               // transactions and LPM
2910               // transactions cause a timeout
2911#define USB_LPMCNTRL_EN_EXT                                                    \
2912    0x00000004 // LPM is not supported but
2913               // extended transactions are
2914               // supported. In this case, the USB
2915               // does respond to an LPM
2916               // transaction with a STALL
2917#define USB_LPMCNTRL_EN_LPMEXT                                                 \
2918    0x0000000C                        // The USB supports LPM extended
2919                                      // transactions. In this case, the
2920                                      // USB responds with a NYET or an
2921                                      // ACK as determined by the value
2922                                      // of TXLPM and other conditions
2923#define USB_LPMCNTRL_RES 0x00000002   // LPM Resume
2924#define USB_LPMCNTRL_TXLPM 0x00000001 // Transmit LPM Transaction Enable
2925
2926//*****************************************************************************
2927//
2928// The following are defines for the bit fields in the USB_O_LPMIM register.
2929//
2930//*****************************************************************************
2931#define USB_LPMIM_ERR 0x00000020   // LPM Error Interrupt Mask
2932#define USB_LPMIM_RES 0x00000010   // LPM Resume Interrupt Mask
2933#define USB_LPMIM_NC 0x00000008    // LPM NC Interrupt Mask
2934#define USB_LPMIM_ACK 0x00000004   // LPM ACK Interrupt Mask
2935#define USB_LPMIM_NY 0x00000002    // LPM NY Interrupt Mask
2936#define USB_LPMIM_STALL 0x00000001 // LPM STALL Interrupt Mask
2937
2938//*****************************************************************************
2939//
2940// The following are defines for the bit fields in the USB_O_LPMRIS register.
2941//
2942//*****************************************************************************
2943#define USB_LPMRIS_ERR 0x00000020   // LPM Interrupt Status
2944#define USB_LPMRIS_RES 0x00000010   // LPM Resume Interrupt Status
2945#define USB_LPMRIS_NC 0x00000008    // LPM NC Interrupt Status
2946#define USB_LPMRIS_ACK 0x00000004   // LPM ACK Interrupt Status
2947#define USB_LPMRIS_NY 0x00000002    // LPM NY Interrupt Status
2948#define USB_LPMRIS_LPMST 0x00000001 // LPM STALL Interrupt Status
2949
2950//*****************************************************************************
2951//
2952// The following are defines for the bit fields in the USB_O_LPMFADDR register.
2953//
2954//*****************************************************************************
2955#define USB_LPMFADDR_ADDR_M 0x0000007F // LPM Function Address
2956#define USB_LPMFADDR_ADDR_S 0
2957
2958//*****************************************************************************
2959//
2960// The following are defines for the bit fields in the USB_O_EPC register.
2961//
2962//*****************************************************************************
2963#define USB_EPC_PFLTACT_M 0x00000300     // Power Fault Action
2964#define USB_EPC_PFLTACT_UNCHG 0x00000000 // Unchanged
2965#define USB_EPC_PFLTACT_TRIS 0x00000100  // Tristate
2966#define USB_EPC_PFLTACT_LOW 0x00000200   // Low
2967#define USB_EPC_PFLTACT_HIGH 0x00000300  // High
2968#define USB_EPC_PFLTAEN 0x00000040       // Power Fault Action Enable
2969#define USB_EPC_PFLTSEN_HIGH 0x00000020  // Power Fault Sense
2970#define USB_EPC_PFLTEN 0x00000010        // Power Fault Input Enable
2971#define USB_EPC_EPENDE 0x00000004        // EPEN Drive Enable
2972#define USB_EPC_EPEN_M                                                         \
2973    0x00000003                       // External Power Supply Enable
2974                                     // Configuration
2975#define USB_EPC_EPEN_LOW 0x00000000  // Power Enable Active Low
2976#define USB_EPC_EPEN_HIGH 0x00000001 // Power Enable Active High
2977#define USB_EPC_EPEN_VBLOW                                                     \
2978    0x00000002 // Power Enable High if VBUS Low
2979               // (OTG only)
2980#define USB_EPC_EPEN_VBHIGH                                                    \
2981    0x00000003 // Power Enable High if VBUS High
2982               // (OTG only)
2983
2984//*****************************************************************************
2985//
2986// The following are defines for the bit fields in the USB_O_EPCRIS register.
2987//
2988//*****************************************************************************
2989#define USB_EPCRIS_PF 0x00000001 // USB Power Fault Interrupt Status
2990
2991//*****************************************************************************
2992//
2993// The following are defines for the bit fields in the USB_O_EPCIM register.
2994//
2995//*****************************************************************************
2996#define USB_EPCIM_PF 0x00000001 // USB Power Fault Interrupt Mask
2997
2998//*****************************************************************************
2999//
3000// The following are defines for the bit fields in the USB_O_EPCISC register.
3001//
3002//*****************************************************************************
3003#define USB_EPCISC_PF                                                          \
3004    0x00000001 // USB Power Fault Interrupt Status
3005               // and Clear
3006
3007//*****************************************************************************
3008//
3009// The following are defines for the bit fields in the USB_O_DRRIS register.
3010//
3011//*****************************************************************************
3012#define USB_DRRIS_RESUME 0x00000001 // RESUME Interrupt Status
3013
3014//*****************************************************************************
3015//
3016// The following are defines for the bit fields in the USB_O_DRIM register.
3017//
3018//*****************************************************************************
3019#define USB_DRIM_RESUME 0x00000001 // RESUME Interrupt Mask
3020
3021//*****************************************************************************
3022//
3023// The following are defines for the bit fields in the USB_O_DRISC register.
3024//
3025//*****************************************************************************
3026#define USB_DRISC_RESUME                                                       \
3027    0x00000001 // RESUME Interrupt Status and
3028               // Clear
3029
3030//*****************************************************************************
3031//
3032// The following are defines for the bit fields in the USB_O_GPCS register.
3033//
3034//*****************************************************************************
3035#define USB_GPCS_DEVMOD_M 0x00000007    // Device Mode
3036#define USB_GPCS_DEVMOD_OTG 0x00000000  // Use USB0VBUS and USB0ID pin
3037#define USB_GPCS_DEVMOD_HOST 0x00000002 // Force USB0VBUS and USB0ID low
3038#define USB_GPCS_DEVMOD_DEV 0x00000003  // Force USB0VBUS and USB0ID high
3039#define USB_GPCS_DEVMOD_HOSTVBUS                                               \
3040    0x00000004 // Use USB0VBUS and force USB0ID
3041               // low
3042#define USB_GPCS_DEVMOD_DEVVBUS                                                \
3043    0x00000005                        // Use USB0VBUS and force USB0ID
3044                                      // high
3045#define USB_GPCS_DEVMODOTG 0x00000002 // Enable Device Mode
3046#define USB_GPCS_DEVMOD 0x00000001    // Device Mode
3047
3048//*****************************************************************************
3049//
3050// The following are defines for the bit fields in the USB_O_VDC register.
3051//
3052//*****************************************************************************
3053#define USB_VDC_VBDEN 0x00000001 // VBUS Droop Enable
3054
3055//*****************************************************************************
3056//
3057// The following are defines for the bit fields in the USB_O_VDCRIS register.
3058//
3059//*****************************************************************************
3060#define USB_VDCRIS_VD 0x00000001 // VBUS Droop Raw Interrupt Status
3061
3062//*****************************************************************************
3063//
3064// The following are defines for the bit fields in the USB_O_VDCIM register.
3065//
3066//*****************************************************************************
3067#define USB_VDCIM_VD 0x00000001 // VBUS Droop Interrupt Mask
3068
3069//*****************************************************************************
3070//
3071// The following are defines for the bit fields in the USB_O_VDCISC register.
3072//
3073//*****************************************************************************
3074#define USB_VDCISC_VD                                                          \
3075    0x00000001 // VBUS Droop Interrupt Status and
3076               // Clear
3077
3078//*****************************************************************************
3079//
3080// The following are defines for the bit fields in the USB_O_IDVRIS register.
3081//
3082//*****************************************************************************
3083#define USB_IDVRIS_ID                                                          \
3084    0x00000001 // ID Valid Detect Raw Interrupt
3085               // Status
3086
3087//*****************************************************************************
3088//
3089// The following are defines for the bit fields in the USB_O_IDVIM register.
3090//
3091//*****************************************************************************
3092#define USB_IDVIM_ID 0x00000001 // ID Valid Detect Interrupt Mask
3093
3094//*****************************************************************************
3095//
3096// The following are defines for the bit fields in the USB_O_IDVISC register.
3097//
3098//*****************************************************************************
3099#define USB_IDVISC_ID                                                          \
3100    0x00000001 // ID Valid Detect Interrupt Status
3101               // and Clear
3102
3103//*****************************************************************************
3104//
3105// The following are defines for the bit fields in the USB_O_DMASEL register.
3106//
3107//*****************************************************************************
3108#define USB_DMASEL_DMACTX_M 0x00F00000 // DMA C TX Select
3109#define USB_DMASEL_DMACRX_M 0x000F0000 // DMA C RX Select
3110#define USB_DMASEL_DMABTX_M 0x0000F000 // DMA B TX Select
3111#define USB_DMASEL_DMABRX_M 0x00000F00 // DMA B RX Select
3112#define USB_DMASEL_DMAATX_M 0x000000F0 // DMA A TX Select
3113#define USB_DMASEL_DMAARX_M 0x0000000F // DMA A RX Select
3114#define USB_DMASEL_DMACTX_S 20
3115#define USB_DMASEL_DMACRX_S 16
3116#define USB_DMASEL_DMABTX_S 12
3117#define USB_DMASEL_DMABRX_S 8
3118#define USB_DMASEL_DMAATX_S 4
3119#define USB_DMASEL_DMAARX_S 0
3120
3121//*****************************************************************************
3122//
3123// The following are defines for the bit fields in the USB_O_PP register.
3124//
3125//*****************************************************************************
3126#define USB_PP_ECNT_M 0x0000FF00         // Endpoint Count
3127#define USB_PP_USB_M 0x000000C0          // USB Capability
3128#define USB_PP_USB_DEVICE 0x00000040     // DEVICE
3129#define USB_PP_USB_HOSTDEVICE 0x00000080 // HOST
3130#define USB_PP_USB_OTG 0x000000C0        // OTG
3131#define USB_PP_ULPI 0x00000020           // ULPI Present
3132#define USB_PP_PHY 0x00000010            // PHY Present
3133#define USB_PP_TYPE_M 0x0000000F         // Controller Type
3134#define USB_PP_TYPE_0                                                          \
3135    0x00000000 // The first-generation USB
3136               // controller
3137#define USB_PP_TYPE_1                                                          \
3138    0x00000001 // Second-generation USB
3139               // controller.The controller
3140               // implemented in post Icestorm
3141               // devices that use the 3.0 version
3142               // of the Mentor controller
3143#define USB_PP_ECNT_S 8
3144
3145//*****************************************************************************
3146//
3147// The following are defines for the bit fields in the USB_O_PC register.
3148//
3149//*****************************************************************************
3150#define USB_PC_ULPIEN 0x00010000 // ULPI Enable
3151
3152//*****************************************************************************
3153//
3154// The following are defines for the bit fields in the USB_O_CC register.
3155//
3156//*****************************************************************************
3157#define USB_CC_CLKEN 0x00000200    // USB Clock Enable
3158#define USB_CC_CSD 0x00000100      // Clock Source/Direction
3159#define USB_CC_CLKDIV_M 0x0000000F // PLL Clock Divisor
3160#define USB_CC_CLKDIV_S 0
3161
3162#endif // __HW_USB_H__