📄 mcf532x_usb.h
字号:
/*
* File: mcf532x_usb.h
* Purpose: Register and bit definitions
*/
#ifndef __MCF532X_USB_H__
#define __MCF532X_USB_H__
/*********************************************************************
*
* USB Controller (USB)
*
*********************************************************************/
/* Register read/write macros */
#define MCF_USB0_ID (*(vuint32*)(0xFC0B0000))
#define MCF_USB0_HWGENERAL (*(vuint32*)(0xFC0B0004))
#define MCF_USB0_HWHOST (*(vuint32*)(0xFC0B0008))
#define MCF_USB0_HWDEVICE (*(vuint32*)(0xFC0B000C))
#define MCF_USB0_HWTXBUF (*(vuint32*)(0xFC0B0010))
#define MCF_USB0_HWRXBUF (*(vuint32*)(0xFC0B0014))
#define MCF_USB0_CAPLENGTH (*(vuint8 *)(0xFC0B0100))
#define MCF_USB0_HCIVERSION (*(vuint16*)(0xFC0B0102))
#define MCF_USB0_HCSPARAMS (*(vuint32*)(0xFC0B0104))
#define MCF_USB0_HCCPARAMS (*(vuint32*)(0xFC0B0108))
#define MCF_USB0_DCIVERSION (*(vuint16*)(0xFC0B0120))
#define MCF_USB0_DCCPARAMS (*(vuint32*)(0xFC0B0124))
#define MCF_USB0_USBCMD (*(vuint32*)(0xFC0B0140))
#define MCF_USB0_USBSTS (*(vuint32*)(0xFC0B0144))
#define MCF_USB0_USBINTR (*(vuint32*)(0xFC0B0148))
#define MCF_USB0_FRINDEX (*(vuint32*)(0xFC0B014C))
#define MCF_USB0_PERIODICLISTBASE (*(vuint32*)(0xFC0B0154))
#define MCF_USB0_DEVICEADDR (*(vuint32*)(0xFC0B0154))
#define MCF_USB0_ASYNCLISTADDR (*(vuint32*)(0xFC0B0158))
#define MCF_USB0_EPLISTADDR (*(vuint32*)(0xFC0B0158))
#define MCF_USB0_ASYNCTTSTS (*(vuint32*)(0xFC0B015C))
#define MCF_USB0_BURSTSIZE (*(vuint32*)(0xFC0B0160))
#define MCF_USB0_TXFILLTUNING (*(vuint32*)(0xFC0B0164))
#define MCF_USB0_TXTTFILLTUNING (*(vuint32*)(0xFC0B0168))
#define MCF_USB_ULPI0_VIEWPORT (*(vuint32*)(0xFC0B0170))
#define MCF_USB0_CONFIGFLAG (*(vuint32*)(0xFC0B0180))
#define MCF_USB0_PORTSC (*(vuint32*)(0xFC0B0184))
#define MCF_USB0_OTGSC (*(vuint32*)(0xFC0B01A4))
#define MCF_USB0_USBMODE (*(vuint32*)(0xFC0B01A8))
#define MCF_USB0_EPSETUPSR (*(vuint32*)(0xFC0B01AC))
#define MCF_USB0_EPPRIME (*(vuint32*)(0xFC0B01B0))
#define MCF_USB0_EPFLUSH (*(vuint32*)(0xFC0B01B4))
#define MCF_USB0_EPSR (*(vuint32*)(0xFC0B01B8))
#define MCF_USB0_EPCOMPLETE (*(vuint32*)(0xFC0B01BC))
#define MCF_USB0_EPCR0 (*(vuint32*)(0xFC0B01C0))
#define MCF_USB0_EPCR1 (*(vuint32*)(0xFC0B01C4))
#define MCF_USB0_EPCR2 (*(vuint32*)(0xFC0B01C8))
#define MCF_USB0_EPCR3 (*(vuint32*)(0xFC0B01CC))
#define MCF_USB0_EPCR(x) (*(vuint32*)(0xFC0B01C4+((x-1)*0x004)))
#define MCF_USB1_ID (*(vuint32*)(0xFC0B4000))
#define MCF_USB1_HWGENERAL (*(vuint32*)(0xFC0B4004))
#define MCF_USB1_HWHOST (*(vuint32*)(0xFC0B4008))
#define MCF_USB1_HWDEVICE (*(vuint32*)(0xFC0B400C))
#define MCF_USB1_HWTXBUF (*(vuint32*)(0xFC0B4010))
#define MCF_USB1_HWRXBUF (*(vuint32*)(0xFC0B4014))
#define MCF_USB1_CAPLENGTH (*(vuint8 *)(0xFC0B4100))
#define MCF_USB1_HCIVERSION (*(vuint16*)(0xFC0B4102))
#define MCF_USB1_HCSPARAMS (*(vuint32*)(0xFC0B4104))
#define MCF_USB1_HCCPARAMS (*(vuint32*)(0xFC0B4108))
#define MCF_USB1_DCIVERSION (*(vuint16*)(0xFC0B4120))
#define MCF_USB1_DCCPARAMS (*(vuint32*)(0xFC0B4124))
#define MCF_USB1_USBCMD (*(vuint32*)(0xFC0B4140))
#define MCF_USB1_USBSTS (*(vuint32*)(0xFC0B4144))
#define MCF_USB1_USBINTR (*(vuint32*)(0xFC0B4148))
#define MCF_USB1_FRINDEX (*(vuint32*)(0xFC0B414C))
#define MCF_USB1_PERIODICLISTBASE (*(vuint32*)(0xFC0B4154))
#define MCF_USB1_DEVICEADDR (*(vuint32*)(0xFC0B4154))
#define MCF_USB1_ASYNCLISTADDR (*(vuint32*)(0xFC0B4158))
#define MCF_USB1_EPLISTADDR (*(vuint32*)(0xFC0B4158))
#define MCF_USB1_ASYNCTTSTS (*(vuint32*)(0xFC0B415C))
#define MCF_USB1_BURSTSIZE (*(vuint32*)(0xFC0B4160))
#define MCF_USB1_TXFILLTUNING (*(vuint32*)(0xFC0B4164))
#define MCF_USB1_TXTTFILLTUNING (*(vuint32*)(0xFC0B4168))
#define MCF_USB_ULPI1_VIEWPORT (*(vuint32*)(0xFC0B4170))
#define MCF_USB1_CONFIGFLAG (*(vuint32*)(0xFC0B4180))
#define MCF_USB1_PORTSC (*(vuint32*)(0xFC0B4184))
#define MCF_USB1_OTGSC (*(vuint32*)(0xFC0B41A4))
#define MCF_USB1_USBMODE (*(vuint32*)(0xFC0B41A8))
#define MCF_USB1_EPSETUPSR (*(vuint32*)(0xFC0B41AC))
#define MCF_USB1_EPPRIME (*(vuint32*)(0xFC0B41B0))
#define MCF_USB1_EPFLUSH (*(vuint32*)(0xFC0B41B4))
#define MCF_USB1_EPSR (*(vuint32*)(0xFC0B41B8))
#define MCF_USB1_EPCOMPLETE (*(vuint32*)(0xFC0B41BC))
#define MCF_USB1_EPCR0 (*(vuint32*)(0xFC0B41C0))
#define MCF_USB1_EPCR1 (*(vuint32*)(0xFC0B41C4))
#define MCF_USB1_EPCR2 (*(vuint32*)(0xFC0B41C8))
#define MCF_USB1_EPCR3 (*(vuint32*)(0xFC0B41CC))
#define MCF_USB1_EPCR(x) (*(vuint32*)(0xFC0B41C4+((x-1)*0x004)))
#define MCF_USB_ID(x) (*(vuint32*)(0xFC0B0000+((x)*0x4000)))
#define MCF_USB_HWGENERAL(x) (*(vuint32*)(0xFC0B0004+((x)*0x4000)))
#define MCF_USB_HWHOST(x) (*(vuint32*)(0xFC0B0008+((x)*0x4000)))
#define MCF_USB_HWDEVICE(x) (*(vuint32*)(0xFC0B000C+((x)*0x4000)))
#define MCF_USB_HWTXBUF(x) (*(vuint32*)(0xFC0B0010+((x)*0x4000)))
#define MCF_USB_HWRXBUF(x) (*(vuint32*)(0xFC0B0014+((x)*0x4000)))
#define MCF_USB_CAPLENGTH(x) (*(vuint8 *)(0xFC0B0100+((x)*0x4000)))
#define MCF_USB_HCIVERSION(x) (*(vuint16*)(0xFC0B0102+((x)*0x4000)))
#define MCF_USB_HCSPARAMS(x) (*(vuint32*)(0xFC0B0104+((x)*0x4000)))
#define MCF_USB_HCCPARAMS(x) (*(vuint32*)(0xFC0B0108+((x)*0x4000)))
#define MCF_USB_DCIVERSION(x) (*(vuint16*)(0xFC0B0120+((x)*0x4000)))
#define MCF_USB_DCCPARAMS(x) (*(vuint32*)(0xFC0B0124+((x)*0x4000)))
#define MCF_USB_USBCMD(x) (*(vuint32*)(0xFC0B0140+((x)*0x4000)))
#define MCF_USB_USBSTS(x) (*(vuint32*)(0xFC0B0144+((x)*0x4000)))
#define MCF_USB_USBINTR(x) (*(vuint32*)(0xFC0B0148+((x)*0x4000)))
#define MCF_USB_FRINDEX(x) (*(vuint32*)(0xFC0B014C+((x)*0x4000)))
#define MCF_USB_PERIODICLISTBASE(x) (*(vuint32*)(0xFC0B0154+((x)*0x4000)))
#define MCF_USB_DEVICEADDR(x) (*(vuint32*)(0xFC0B0154+((x)*0x4000)))
#define MCF_USB_ASYNCLISTADDR(x) (*(vuint32*)(0xFC0B0158+((x)*0x4000)))
#define MCF_USB_EPLISTADDR(x) (*(vuint32*)(0xFC0B0158+((x)*0x4000)))
#define MCF_USB_ASYNCTTSTS(x) (*(vuint32*)(0xFC0B015C+((x)*0x4000)))
#define MCF_USB_BURSTSIZE(x) (*(vuint32*)(0xFC0B0160+((x)*0x4000)))
#define MCF_USB_TXFILLTUNING(x) (*(vuint32*)(0xFC0B0164+((x)*0x4000)))
#define MCF_USB_TXTTFILLTUNING(x) (*(vuint32*)(0xFC0B0168+((x)*0x4000)))
#define MCF_USB_ULPI_VIEWPORT(x) (*(vuint32*)(0xFC0B0170+((x)*0x4000)))
#define MCF_USB_CONFIGFLAG(x) (*(vuint32*)(0xFC0B0180+((x)*0x4000)))
#define MCF_USB_PORTSC(x) (*(vuint32*)(0xFC0B0184+((x)*0x4000)))
#define MCF_USB_OTGSC(x) (*(vuint32*)(0xFC0B01A4+((x)*0x4000)))
#define MCF_USB_USBMODE(x) (*(vuint32*)(0xFC0B01A8+((x)*0x4000)))
#define MCF_USB_EPSETUPSR(x) (*(vuint32*)(0xFC0B01AC+((x)*0x4000)))
#define MCF_USB_EPPRIME(x) (*(vuint32*)(0xFC0B01B0+((x)*0x4000)))
#define MCF_USB_EPFLUSH(x) (*(vuint32*)(0xFC0B01B4+((x)*0x4000)))
#define MCF_USB_EPSR(x) (*(vuint32*)(0xFC0B01B8+((x)*0x4000)))
#define MCF_USB_EPCOMPLETE(x) (*(vuint32*)(0xFC0B01BC+((x)*0x4000)))
#define MCF_USB_EPCR0(x) (*(vuint32*)(0xFC0B01C0+((x)*0x4000)))
#define MCF_USB_EPCR1(x) (*(vuint32*)(0xFC0B01C4+((x)*0x4000)))
#define MCF_USB_EPCR2(x) (*(vuint32*)(0xFC0B01C8+((x)*0x4000)))
#define MCF_USB_EPCR3(x) (*(vuint32*)(0xFC0B01CC+((x)*0x4000)))
/* Bit definitions and macros for MCF_USB_ID */
#define MCF_USB_ID_RESERVED (0x0000C000)
#define MCF_USB_ID_ID(x) (((x)&0x0000003F)<<0|0x0000C000)
#define MCF_USB_ID_NID(x) (((x)&0x0000003F)<<8|0x0000C000)
#define MCF_USB_ID_REVISION(x) (((x)&0x000000FF)<<16|0x0000C000)
/* Bit definitions and macros for MCF_USB_HWGENERAL */
#define MCF_USB_HWGENERAL_RT (0x00000001)
#define MCF_USB_HWGENERAL_CLKC(x) (((x)&0x00000003)<<1)
#define MCF_USB_HWGENERAL_BWT (0x00000008)
#define MCF_USB_HWGENERAL_PHYW(x) (((x)&0x00000003)<<4)
#define MCF_USB_HWGENERAL_PHYM(x) (((x)&0x00000007)<<6)
#define MCF_USB_HWGENERAL_SM(x) (((x)&0x00000003)<<9)
/* Bit definitions and macros for MCF_USB_HWHOST */
#define MCF_USB_HWHOST_HC (0x00000001)
#define MCF_USB_HWHOST_NPORT(x) (((x)&0x00000007)<<1)
#define MCF_USB_HWHOST_TTASY(x) (((x)&0x000000FF)<<16)
#define MCF_USB_HWHOST_TTPER(x) (((x)&0x000000FF)<<24)
/* Bit definitions and macros for MCF_USB_HWDEVICE */
#define MCF_USB_HWDEVICE_DC (0x00000001)
#define MCF_USB_HWDEVICE_DEVEP(x) (((x)&0x0000001F)<<1)
/* Bit definitions and macros for MCF_USB_HWTXBUF */
#define MCF_USB_HWTXBUF_TXBURST(x) (((x)&0x000000FF)<<0)
#define MCF_USB_HWTXBUF_TXADD(x) (((x)&0x000000FF)<<8)
#define MCF_USB_HWTXBUF_TXCHANADD(x) (((x)&0x000000FF)<<16)
#define MCF_USB_HWTXBUF_TXLC (0x80000000)
/* Bit definitions and macros for MCF_USB_HWRXBUF */
#define MCF_USB_HWRXBUF_RXBURST(x) (((x)&0x000000FF)<<0)
#define MCF_USB_HWRXBUF_RXADD(x) (((x)&0x000000FF)<<8)
/* Bit definitions and macros for MCF_USB_CAPLENGTH */
#define MCF_USB_CAPLENGTH_CAPLENGTH(x) (((x)&0xFF)<<0)
/* Bit definitions and macros for MCF_USB_HCIVERSION */
#define MCF_USB_HCIVERSION_HCIVERSION(x) (((x)&0xFFFF)<<0)
/* Bit definitions and macros for MCF_USB_HCSPARAMS */
#define MCF_USB_HCSPARAMS_N_PORTS(x) (((x)&0x0000000F)<<0)
#define MCF_USB_HCSPARAMS_PPC (0x00000010)
#define MCF_USB_HCSPARAMS_N_PCC(x) (((x)&0x0000000F)<<8)
#define MCF_USB_HCSPARAMS_N_CC(x) (((x)&0x0000000F)<<12)
#define MCF_USB_HCSPARAMS_PI (0x00010000)
#define MCF_USB_HCSPARAMS_N_PTT(x) (((x)&0x0000000F)<<20)
#define MCF_USB_HCSPARAMS_N_TT(x) (((x)&0x0000000F)<<24)
/* Bit definitions and macros for MCF_USB_HCCPARAMS */
#define MCF_USB_HCCPARAMS_ADC (0x00000001)
#define MCF_USB_HCCPARAMS_PFL (0x00000002)
#define MCF_USB_HCCPARAMS_ASP (0x00000004)
#define MCF_USB_HCCPARAMS_IST(x) (((x)&0x0000000F)<<4)
#define MCF_USB_HCCPARAMS_EECP(x) (((x)&0x000000FF)<<8)
/* Bit definitions and macros for MCF_USB_DCIVERSION */
#define MCF_USB_DCIVERSION_DCIVERSION(x) (((x)&0xFFFF)<<0)
/* Bit definitions and macros for MCF_USB_DCCPARAMS */
#define MCF_USB_DCCPARAMS_DEN(x) (((x)&0x0000001F)<<0)
#define MCF_USB_DCCPARAMS_DC (0x00000080)
#define MCF_USB_DCCPARAMS_HC (0x00000100)
/* Bit definitions and macros for MCF_USB_USBCMD */
#define MCF_USB_USBCMD_RS (0x00000001)
#define MCF_USB_USBCMD_RST (0x00000002)
#define MCF_USB_USBCMD_FS0 (0x00000004)
#define MCF_USB_USBCMD_FS1 (0x00000008)
#define MCF_USB_USBCMD_PSE (0x00000010)
#define MCF_USB_USBCMD_ASE (0x00000020)
#define MCF_USB_USBCMD_IAA (0x00000040)
#define MCF_USB_USBCMD_LR (0x00000080)
#define MCF_USB_USBCMD_ASP(x) (((x)&0x00000003)<<8)
#define MCF_USB_USBCMD_ASPE (0x00000800)
#define MCF_USB_USBCMD_SUTW (0x00002000)
#define MCF_USB_USBCMD_ATDTW (0x00004000)
#define MCF_USB_USBCMD_FS2 (0x00008000)
#define MCF_USB_USBCMD_ITC(x) (((x)&0x000000FF)<<16)
#define MCF_USB_USBCMD_ITC_IMM (0x00000000)
#define MCF_USB_USBCMD_ITC_1 (0x00010000)
#define MCF_USB_USBCMD_ITC_2 (0x00020000)
#define MCF_USB_USBCMD_ITC_4 (0x00040000)
#define MCF_USB_USBCMD_ITC_8 (0x00080000)
#define MCF_USB_USBCMD_ITC_16 (0x00100000)
#define MCF_USB_USBCMD_ITC_32 (0x00200000)
#define MCF_USB_USBCMD_ITC_40 (0x00400000)
#define MCF_USB_USBCMD_FS_1024 (0x00000000)
#define MCF_USB_USBCMD_FS_512 (0x00000004)
#define MCF_USB_USBCMD_FS_256 (0x00000008)
#define MCF_USB_USBCMD_FS_128 (0x0000000C)
#define MCF_USB_USBCMD_FS_64 (0x00008000)
#define MCF_USB_USBCMD_FS_32 (0x00008004)
#define MCF_USB_USBCMD_FS_16 (0x00008008)
#define MCF_USB_USBCMD_FS_8 (0x0000800C)
/* Bit definitions and macros for MCF_USB_USBSTS */
#define MCF_USB_USBSTS_UI (0x00000001)
#define MCF_USB_USBSTS_UEI (0x00000002)
#define MCF_USB_USBSTS_PCI (0x00000004)
#define MCF_USB_USBSTS_FRI (0x00000008)
#define MCF_USB_USBSTS_SEI (0x00000010)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -