36#ifndef LIBOPENCM3_LM4F_USB_H
37#define LIBOPENCM3_LM4F_USB_H
49#define USB_FADDR MMIO8(USB_BASE + 0x00)
52#define USB_POWER MMIO8(USB_BASE + 0x01)
55#define USB_TXIS MMIO16(USB_BASE + 0x02)
58#define USB_RXIS MMIO16(USB_BASE + 0x04)
61#define USB_TXIE MMIO16(USB_BASE + 0x06)
64#define USB_RXIE MMIO16(USB_BASE + 0x08)
67#define USB_IS MMIO8(USB_BASE + 0x0A)
70#define USB_IE MMIO8(USB_BASE + 0x0B)
73#define USB_FRAME MMIO16(USB_BASE + 0x0C)
76#define USB_EPIDX MMIO8(USB_BASE + 0x0E)
79#define USB_TEST MMIO8(USB_BASE + 0x0F)
82#define USB_FIFO8(n) MMIO8(USB_BASE + 0x20 + (n)*0x04)
83#define USB_FIFO16(n) MMIO16(USB_BASE + 0x20 + (n)*0x04)
84#define USB_FIFO32(n) MMIO32(USB_BASE + 0x20 + (n)*0x04)
87#define USB_TXFIFOSZ MMIO8(USB_BASE + 0x62)
90#define USB_RXFIFOSZ MMIO8(USB_BASE + 0x63)
93#define USB_TXFIFOADD MMIO16(USB_BASE + 0x64)
96#define USB_RXFIFOADD MMIO16(USB_BASE + 0x66)
99#define USB_CONTIM MMIO8(USB_BASE + 0x7A)
102#define USB_FSEOF MMIO8(USB_BASE + 0x7D)
105#define USB_LSEOF MMIO8(USB_BASE + 0x7E)
108#define USB_CSRL0 MMIO8(USB_BASE + 0x102)
111#define USB_CSRH0 MMIO8(USB_BASE + 0x103)
114#define USB_COUNT0 MMIO8(USB_BASE + 0x108)
117#define USB_TXMAXP(n) MMIO16(USB_BASE + 0x100 + (n)*0x10)
120#define USB_TXCSRL(n) MMIO8(USB_BASE + 0x102 + (n)*0x10)
123#define USB_TXCSRH(n) MMIO8(USB_BASE + 0x103 + (n)*0x10)
126#define USB_RXMAXP(n) MMIO16(USB_BASE + 0x104 + (n)*0x10)
129#define USB_RXCSRL(n) MMIO8(USB_BASE + 0x106 + (n)*0x10)
132#define USB_RXCSRH(n) MMIO8(USB_BASE + 0x107 + (n)*0x10)
135#define USB_RXCOUNT(n) MMIO16(USB_BASE + 0x108 + (n)*0x10)
138#define USB_RXDPKTBUFDIS MMIO16(USB_BASE + 0x340)
141#define USB_TXDPKTBUFDIS MMIO16(USB_BASE + 0x342)
144#define USB_DRRIS MMIO32(USB_BASE + 0x410)
147#define USB_DRIM MMIO32(USB_BASE + 0x414)
150#define USB_DRISC MMIO32(USB_BASE + 0x418)
153#define USB_DMASEL MMIO32(USB_BASE + 0x450)
156#define USB_PP MMIO32(USB_BASE + 0xFC0)
163#define USB_FADDR_FUNCADDR_MASK (0x3f << 0)
169#define USB_POWER_ISOUP (1 << 7)
171#define USB_POWER_SOFTCONN (1 << 6)
173#define USB_POWER_RESET (1 << 3)
175#define USB_POWER_RESUME (1 << 2)
177#define USB_POWER_SUSPEND (1 << 1)
179#define USB_POWER_PWRDNPHY (1 << 0)
186#define USB_EP7 (1 << 7)
187#define USB_EP6 (1 << 6)
188#define USB_EP5 (1 << 5)
189#define USB_EP4 (1 << 4)
190#define USB_EP3 (1 << 3)
191#define USB_EP2 (1 << 2)
192#define USB_EP1 (1 << 1)
193#define USB_EP0 (1 << 0)
201#define USB_IM_DISCON (1 << 5)
203#define USB_IM_SOF (1 << 3)
205#define USB_IM_RESET (1 << 2)
207#define USB_IM_RESUME (1 << 1)
209#define USB_IM_SUSPEND (1 << 0)
215#define USB_FRAME_MASK (0x03FF)
221#define USB_EPIDX_MASK (0x0F)
227#define USB_TEST_FIFOACC (1 << 6)
229#define USB_TEST_FORCEFS (1 << 5)
235#define USB_FIFOSZ_DPB (1 << 4)
237#define USB_FIFOSZ_SIZE_MASK (0x0F << 0)
238#define USB_FIFOSZ_SIZE_8 (0x00 << 0)
239#define USB_FIFOSZ_SIZE_16 (0x01 << 0)
240#define USB_FIFOSZ_SIZE_32 (0x02 << 0)
241#define USB_FIFOSZ_SIZE_64 (0x03 << 0)
242#define USB_FIFOSZ_SIZE_128 (0x04 << 0)
243#define USB_FIFOSZ_SIZE_256 (0x05 << 0)
244#define USB_FIFOSZ_SIZE_512 (0x06 << 0)
245#define USB_FIFOSZ_SIZE_1024 (0x07 << 0)
246#define USB_FIFOSZ_SIZE_2048 (0x08 << 0)
253#define USB_CONTIM_WTCON_MASK (0x0F << 4)
255#define USB_CONTIM_WTID_MASK (0x0F << 0)
261#define USB_CSRL0_SETENDC (1 << 7)
263#define USB_CSRL0_RXRDYC (1 << 6)
265#define USB_CSRL0_STALL (1 << 5)
267#define USB_CSRL0_SETEND (1 << 4)
269#define USB_CSRL0_DATAEND (1 << 3)
271#define USB_CSRL0_STALLED (1 << 2)
273#define USB_CSRL0_TXRDY (1 << 1)
275#define USB_CSRL0_RXRDY (1 << 0)
281#define USB_CSRH0_FLUSH (1 << 0)
287#define USB_TXCSRL_CLRDT (1 << 6)
289#define USB_TXCSRL_STALLED (1 << 5)
291#define USB_TXCSRL_STALL (1 << 4)
293#define USB_TXCSRL_FLUSH (1 << 3)
295#define USB_TXCSRL_UNDRN (1 << 2)
297#define USB_TXCSRL_FIFONE (1 << 1)
299#define USB_TXCSRL_TXRDY (1 << 0)
305#define USB_TXCSRH_AUTOSET (1 << 7)
307#define USB_TXCSRH_ISO (1 << 6)
309#define USB_TXCSRH_MODE (1 << 5)
311#define USB_TXCSRH_DMAEN (1 << 4)
313#define USB_TXCSRH_FDT (1 << 3)
315#define USB_TXCSRH_DMAMOD (1 << 2)
321#define USB_RXCSRL_CLRDT (1 << 7)
323#define USB_RXCSRL_STALLED (1 << 6)
325#define USB_RXCSRL_STALL (1 << 5)
327#define USB_RXCSRL_FLUSH (1 << 4)
329#define USB_RXCSRL_DATAERR (1 << 2)
331#define USB_RXCSRL_OVER (1 << 2)
333#define USB_RXCSRL_FULL (1 << 1)
335#define USB_RXCSRL_RXRDY (1 << 0)
341#define USB_RXCSRH_AUTOCL (1 << 7)
343#define USB_RXCSRH_ISO (1 << 6)
345#define USB_RXCSRH_DMAEN (1 << 5)
347#define USB_RXCSRH_PIDERR (1 << 4)
349#define USB_RXCSRH_DMAMOD (1 << 3)
355#define USB_DRRIS_RESUME (1 << 0)
361#define USB_DRIM_RESUME (1 << 0)
367#define USB_DRISC_RESUME (1 << 0)
373#define USB_PP_ECNT_MASK (0xFF << 8)
375#define USB_PP_USB_MASK (0x03 << 6)
376#define USB_PP_USB_NA (0x00 << 6)
377#define USB_PP_USB_DEVICE (0x01 << 6)
378#define USB_PP_USB_HOST (0x02 << 6)
379#define USB_PP_USB_OTG (0x03 << 6)
381#define USB_PP_PHY (1 << 4)
383#define USB_PP_TYPE_MASK (0x0F << 0)
#define USB_IM_RESUME
RESUME signaling detected.
#define USB_IM_DISCON
USB disconnect interrupt.
void usb_disable_interrupts(enum usb_interrupt ints, enum usb_ep_interrupt rx_ints, enum usb_ep_interrupt tx_ints)
Disable Specific USB Interrupts.
#define USB_IM_RESET
RESET signaling detected.
#define USB_IM_SOF
Start of frame.
#define USB_IM_SUSPEND
SUSPEND signaling detected.
void usb_enable_interrupts(enum usb_interrupt ints, enum usb_ep_interrupt rx_ints, enum usb_ep_interrupt tx_ints)
Enable Specific USB Interrupts.