⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mcf5445x_usb.h

📁 Freescale MCF5445evb 参考测试代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * File:    mcf5445x_usb.h * Purpose: Register and bit definitions */#ifndef __MCF5445X_USB_H__#define __MCF5445X_USB_H__/*********************************************************************** USB Controller (USB)**********************************************************************//* Register read/write macros */#define MCF_USB_ID                  (*(vuint32*)(0xFC0B0000))   #define MCF_USB_HWGENERAL           (*(vuint32*)(0xFC0B0004))   #define MCF_USB_HWHOST              (*(vuint32*)(0xFC0B0008))   #define MCF_USB_HWDEVICE            (*(vuint32*)(0xFC0B000C))   #define MCF_USB_HWTXBUF             (*(vuint32*)(0xFC0B0010))   #define MCF_USB_HWRXBUF             (*(vuint32*)(0xFC0B0014))   #define MCF_USB_CAPLENGTH           (*(vuint8 *)(0xFC0B0100))   #define MCF_USB_HCIVERSION          (*(vuint16*)(0xFC0B0102))   #define MCF_USB_HCSPARAMS           (*(vuint32*)(0xFC0B0104))   #define MCF_USB_HCCPARAMS           (*(vuint32*)(0xFC0B0108))   #define MCF_USB_DCIVERSION          (*(vuint16*)(0xFC0B0120))   #define MCF_USB_DCCPARAMS           (*(vuint32*)(0xFC0B0124))   #define MCF_USB_USBCMD              (*(vuint32*)(0xFC0B0140))   #define MCF_USB_USBSTS              (*(vuint32*)(0xFC0B0144))   #define MCF_USB_USBINTR             (*(vuint32*)(0xFC0B0148))   #define MCF_USB_FRINDEX             (*(vuint32*)(0xFC0B014C))   #define MCF_USB_PERIODICLISTBASE    (*(vuint32*)(0xFC0B0154))   #define MCF_USB_DEVICEADDR          (*(vuint32*)(0xFC0B0154))   #define MCF_USB_EPLISTADDR          (*(vuint32*)(0xFC0B0158))   #define MCF_USB_ASYNCLISTADDR       (*(vuint32*)(0xFC0B0158))   #define MCF_USB_ASYNCTTSTS          (*(vuint32*)(0xFC0B015C))   #define MCF_USB_BURSTSIZE           (*(vuint32*)(0xFC0B0160))   #define MCF_USB_TXFILLTUNING        (*(vuint32*)(0xFC0B0164))   #define MCF_USB_TXTTFILLTUNING      (*(vuint32*)(0xFC0B0168))   #define MCF_USB_ULPI_VIEWPORT       (*(vuint32*)(0xFC0B0170))   #define MCF_USB_CONFIGFLAG          (*(vuint32*)(0xFC0B0180))   #define MCF_USB_PORTSC              (*(vuint32*)(0xFC0B0184))   #define MCF_USB_OTGSC               (*(vuint32*)(0xFC0B01A4))   #define MCF_USB_USBMODE             (*(vuint32*)(0xFC0B01A8))   #define MCF_USB_EPSETUPSR           (*(vuint32*)(0xFC0B01AC))   #define MCF_USB_EPPRIME             (*(vuint32*)(0xFC0B01B0))   #define MCF_USB_EPFLUSH             (*(vuint32*)(0xFC0B01B4))   #define MCF_USB_EPSR                (*(vuint32*)(0xFC0B01B8))   #define MCF_USB_EPCOMPLETE          (*(vuint32*)(0xFC0B01BC))   #define MCF_USB_EPCR0               (*(vuint32*)(0xFC0B01C0))   #define MCF_USB_EPCR1               (*(vuint32*)(0xFC0B01C4))   #define MCF_USB_EPCR2               (*(vuint32*)(0xFC0B01C8))   #define MCF_USB_EPCR3               (*(vuint32*)(0xFC0B01CC))   /* Parameterized register read/write macros for multiple registers */#define MCF_USB_EPCR(x)         (*(vuint32*)(0xFC0B01C4 + ((x-1)*0x004)))   /* Bit definitions and macros for ID */#define MCF_USB_ID_ID(x)            (((x)&0x0000003F)   #define MCF_USB_ID_NID(x)           (((x)&0x0000003F)   #define MCF_USB_ID_REVISION(x)      (((x)&0x000000FF)   /* Bit definitions and macros for 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 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 HWDEVICE */#define MCF_USB_HWDEVICE_DC         (0x00000001)            #define MCF_USB_HWDEVICE_DEVEP(x)   (((x)&0x0000001F)<<1)   /* Bit definitions and macros for HWTXBUF */#define MCF_USB_HWTXBUF_TXBURST(x)      (((x)&0x000000FF))      #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 HWRXBUF */#define MCF_USB_HWRXBUF_RXBURST(x)      (((x)&0x000000FF))      #define MCF_USB_HWRXBUF_RXADD(x)        (((x)&0x000000FF)<<8)   /* Bit definitions and macros for CAPLENGTH */#define MCF_USB_CAPLENGTH_CAPLENGTH(x)      (x)     /* Bit definitions and macros for HCIVERSION */#define MCF_USB_HCIVERSION_HCIVERSION(x)    (x)     /* Bit definitions and macros for HCSPARAMS */#define MCF_USB_HCSPARAMS_N_PORTS(x)    (((x)&0x0000000F))      #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 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 DCIVERSION */#define MCF_USB_DCIVERSION_DCIVERSION(x)    (x)     /* Bit definitions and macros for DCCPARAMS */#define MCF_USB_DCCPARAMS_DEN(x)    (((x)&0x0000001F))  #define MCF_USB_DCCPARAMS_DC        (0x00000080)        #define MCF_USB_DCCPARAMS_HC        (0x00000100)        /* Bit definitions and macros for 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 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)    #define MCF_USB_USBSTS_AAI      (0x00000020)    #define MCF_USB_USBSTS_URI      (0x00000040)    #define MCF_USB_USBSTS_SRI      (0x00000080)    #define MCF_USB_USBSTS_SLI      (0x00000100)    #define MCF_USB_USBSTS_HCH      (0x00001000)    #define MCF_USB_USBSTS_RCL      (0x00002000)    #define MCF_USB_USBSTS_PS       (0x00004000)    #define MCF_USB_USBSTS_AS       (0x00008000)    /* Bit definitions and macros for USBINTR */#define MCF_USB_USBINTR_UE      (0x00000001)    #define MCF_USB_USBINTR_UEE     (0x00000002)    #define MCF_USB_USBINTR_PCE     (0x00000004)    #define MCF_USB_USBINTR_FRE     (0x00000008)    #define MCF_USB_USBINTR_SEE     (0x00000010)    #define MCF_USB_USBINTR_AAE     (0x00000020)    #define MCF_USB_USBINTR_URE     (0x00000040)    #define MCF_USB_USBINTR_SRE     (0x00000080)    #define MCF_USB_USBINTR_SLE     (0x00000100)    /* Bit definitions and macros for FRINDEX */#define MCF_USB_FRINDEX_FRINDEX(x)      (((x)&0x00003FFF))  /* Bit definitions and macros for PERIODICLISTBASE */#define MCF_USB_PERIODICLISTBASE_PERBASE(x)     (((x)&0x000FFFFF)<<12)  /* Bit definitions and macros for DEVICEADDR */#define MCF_USB_DEVICEADDR_USBADR(x)    (((x)&0x0000007F)<<25)  /* Bit definitions and macros for EPLISTADDR */#define MCF_USB_EPLISTADDR_EPBASE(x)    (((x)&0x001FFFFF)<<11)  /* Bit definitions and macros for ASYNCLISTADDR */#define MCF_USB_ASYNCLISTADDR_ASYBASE(x)    (((x)&0x07FFFFFF)<<5)   /* Bit definitions and macros for ASYNCTTSTS */#define MCF_USB_ASYNCTTSTS_TTAS     (0x00000001)    #define MCF_USB_ASYNCTTSTS_TTAC     (0x00000002)    /* Bit definitions and macros for BURSTSIZE */#define MCF_USB_BURSTSIZE_RXPBURST(x)   (((x)&0x000000FF))      #define MCF_USB_BURSTSIZE_TXPBURST(x)   (((x)&0x000000FF)<<8)   /* Bit definitions and macros for TXFILLTUNING */#define MCF_USB_TXFILLTUNING_TXSCHOH(x)         (((x)&0x000000FF))      #define MCF_USB_TXFILLTUNING_TXSCHHEALTH(x)     (((x)&0x0000001F)<<8)   #define MCF_USB_TXFILLTUNING_TXFIFOTHRES(x)     (((x)&0x0000003F)<<16)  /* Bit definitions and macros for TXTTFILLTUNING */#define MCF_USB_TXTTFILLTUNING_TXTTSCHOH(x)         (((x)&0x0000001F))      #define MCF_USB_TXTTFILLTUNING_TXTTSCHHEALTH(x)     (((x)&0x0000001F)<<8)   /* Bit definitions and macros for ULPI_VIEWPORT */#define MCF_USB_ULPI_VIEWPORT_ULPI_DATWR(x)     (((x)&0x000000FF))      #define MCF_USB_ULPI_VIEWPORT_ULPI_DATRD(x)     (((x)&0x000000FF)<<8)   #define MCF_USB_ULPI_VIEWPORT_ULPI_ADDR(x)      (((x)&0x000000FF)<<16)  #define MCF_USB_ULPI_VIEWPORT_ULPI_PORT(x)      (((x)&0x00000007)<<24)  #define MCF_USB_ULPI_VIEWPORT_ULPI_SS           (0x08000000)            #define MCF_USB_ULPI_VIEWPORT_ULPI_RW           (0x20000000)            #define MCF_USB_ULPI_VIEWPORT_ULPI_RUN          (0x40000000)            #define MCF_USB_ULPI_VIEWPORT_ULPI_WU           (0x80000000)            /* Bit definitions and macros for CONFIGFLAG */#define MCF_USB_CONFIGFLAG_CONFIGFLAG(x)    (x)     /* Bit definitions and macros for PORTSC */#define MCF_USB_PORTSC_CCS                  (0x20000001)        #define MCF_USB_PORTSC_CSC                  (0x20000002)        

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -