📄 mcf548x_usb.h
字号:
#define MCF_USB_EP5LWFP (*(vuint32*)(void*)(&__MBAR[0x00B55C]))
#define MCF_USB_EP6LWFP (*(vuint32*)(void*)(&__MBAR[0x00B58C]))
#define MCF_USB_EPnLWFP(x) (*(vuint32*)(void*)(&__MBAR[0x00B46C+((x)*0x030)]))
/* Bit definitions and macros for MCF_USB_USBAISR */
#define MCF_USB_USBAISR_SETUP (0x01)
#define MCF_USB_USBAISR_IN (0x02)
#define MCF_USB_USBAISR_OUT (0x04)
#define MCF_USB_USBAISR_EPHALT (0x08)
#define MCF_USB_USBAISR_TRANSERR (0x10)
#define MCF_USB_USBAISR_ACK (0x20)
#define MCF_USB_USBAISR_CTROVFL (0x40)
#define MCF_USB_USBAISR_EPSTALL (0x80)
/* Bit definitions and macros for MCF_USB_USBAIMR */
#define MCF_USB_USBAIMR_SETUPEN (0x01)
#define MCF_USB_USBAIMR_INEN (0x02)
#define MCF_USB_USBAIMR_OUTEN (0x04)
#define MCF_USB_USBAIMR_EPHALTEN (0x08)
#define MCF_USB_USBAIMR_TRANSERREN (0x10)
#define MCF_USB_USBAIMR_ACKEN (0x20)
#define MCF_USB_USBAIMR_CTROVFLEN (0x40)
#define MCF_USB_USBAIMR_EPSTALLEN (0x80)
/* Bit definitions and macros for MCF_USB_EPINFO */
#define MCF_USB_EPINFO_EPDIR (0x01)
#define MCF_USB_EPINFO_EPNUM(x) (((x)&0x07)<<1)
/* Bit definitions and macros for MCF_USB_CFGAR */
#define MCF_USB_CFGAR_RESERVED (0xA0)
#define MCF_USB_CFGAR_RMTWKEUP (0xE0)
/* Bit definitions and macros for MCF_USB_SPEEDR */
#define MCF_USB_SPEEDR_HS (0x01)
#define MCF_USB_SPEEDR_FS (0x02)
/* Bit definitions and macros for MCF_USB_FRMNUMR */
#define MCF_USB_FRMNUMR_FRMNUM(x) (((x)&0x0FFF)<<0)
/* Bit definitions and macros for MCF_USB_EPTNR */
#define MCF_USB_EPTNR_EP1T(x) (((x)&0x0003)<<0)
#define MCF_USB_EPTNR_EP2T(x) (((x)&0x0003)<<2)
#define MCF_USB_EPTNR_EP3T(x) (((x)&0x0003)<<4)
#define MCF_USB_EPTNR_EP4T(x) (((x)&0x0003)<<6)
#define MCF_USB_EPTNR_EP5T(x) (((x)&0x0003)<<8)
#define MCF_USB_EPTNR_EP6T(x) (((x)&0x0003)<<10)
#define MCF_USB_EPTNR_EPnT1 (0)
#define MCF_USB_EPTNR_EPnT2 (1)
#define MCF_USB_EPTNR_EPnT3 (2)
/* Bit definitions and macros for MCF_USB_IFUR */
#define MCF_USB_IFUR_ALTSET(x) (((x)&0x00FF)<<0)
#define MCF_USB_IFUR_IFNUM(x) (((x)&0x00FF)<<8)
/* Bit definitions and macros for MCF_USB_IFRn */
#define MCF_USB_IFRn_ALTSET(x) (((x)&0x00FF)<<0)
#define MCF_USB_IFRn_IFNUM(x) (((x)&0x00FF)<<8)
/* Bit definitions and macros for MCF_USB_CNTOVR */
#define MCF_USB_CNTOVR_PPCNT (0x01)
#define MCF_USB_CNTOVR_DPCNT (0x02)
#define MCF_USB_CNTOVR_CRCECNT (0x04)
#define MCF_USB_CNTOVR_BSECNT (0x08)
#define MCF_USB_CNTOVR_PIDECNT (0x10)
#define MCF_USB_CNTOVR_FRMECNT (0x20)
#define MCF_USB_CNTOVR_TXPCNT (0x40)
/* Bit definitions and macros for MCF_USB_EP0ACR */
#define MCF_USB_EP0ACR_TTYPE(x) (((x)&0x03)<<0)
#define MCF_USB_EP0ACR_TTYPE_CTRL (0)
#define MCF_USB_EP0ACR_TTYPE_ISOC (1)
#define MCF_USB_EP0ACR_TTYPE_BULK (2)
#define MCF_USB_EP0ACR_TTYPE_INT (3)
/* Bit definitions and macros for MCF_USB_EP0MPSR */
#define MCF_USB_EP0MPSR_MAXPKTSZ(x) (((x)&0x07FF)<<0)
#define MCF_USB_EP0MPSR_ADDTRANS(x) (((x)&0x0003)<<11)
/* Bit definitions and macros for MCF_USB_EP0SR */
#define MCF_USB_EP0SR_HALT (0x01)
#define MCF_USB_EP0SR_ACTIVE (0x02)
#define MCF_USB_EP0SR_PSTALL (0x04)
#define MCF_USB_EP0SR_CCOMP (0x08)
#define MCF_USB_EP0SR_TXZERO (0x20)
#define MCF_USB_EP0SR_INT (0x80)
/* Bit definitions and macros for MCF_USB_BMRTR */
#define MCF_USB_BMRTR_DIR (0x80)
#define MCF_USB_BMRTR_TYPE_STANDARD (0x00)
#define MCF_USB_BMRTR_TYPE_CLASS (0x20)
#define MCF_USB_BMRTR_TYPE_VENDOR (0x40)
#define MCF_USB_BMRTR_REC_DEVICE (0x00)
#define MCF_USB_BMRTR_REC_INTERFACE (0x01)
#define MCF_USB_BMRTR_REC_ENDPOINT (0x02)
#define MCF_USB_BMRTR_REC_OTHER (0x03)
/* Bit definitions and macros for MCF_USB_EPnOUTACR */
#define MCF_USB_EPnOUTACR_TTYPE(x) (((x)&0x03)<<0)
/* Bit definitions and macros for MCF_USB_EPnOUTMPSR */
#define MCF_USB_EPnOUTMPSR_MAXPKTSZ(x) (((x)&0x07FF)<<0)
#define MCF_USB_EPnOUTMPSR_ADDTRANS(x) (((x)&0x0003)<<11)
/* Bit definitions and macros for MCF_USB_EPnOUTSR */
#define MCF_USB_EPnOUTSR_HALT (0x01)
#define MCF_USB_EPnOUTSR_ACTIVE (0x02)
#define MCF_USB_EPnOUTSR_PSTALL (0x04)
#define MCF_USB_EPnOUTSR_CCOMP (0x08)
#define MCF_USB_EPnOUTSR_TXZERO (0x20)
#define MCF_USB_EPnOUTSR_INT (0x80)
/* Bit definitions and macros for MCF_USB_EPnOUTSFR */
#define MCF_USB_EPnOUTSFR_FRMNUM(x) (((x)&0x07FF)<<0)
/* Bit definitions and macros for MCF_USB_EPnINACR */
#define MCF_USB_EPnINACR_TTYPE(x) (((x)&0x03)<<0)
/* Bit definitions and macros for MCF_USB_EPnINMPSR */
#define MCF_USB_EPnINMPSR_MAXPKTSZ(x) (((x)&0x07FF)<<0)
#define MCF_USB_EPnINMPSR_ADDTRANS(x) (((x)&0x0003)<<11)
/* Bit definitions and macros for MCF_USB_EPnINSR */
#define MCF_USB_EPnINSR_HALT (0x01)
#define MCF_USB_EPnINSR_ACTIVE (0x02)
#define MCF_USB_EPnINSR_PSTALL (0x04)
#define MCF_USB_EPnINSR_CCOMP (0x08)
#define MCF_USB_EPnINSR_TXZERO (0x20)
#define MCF_USB_EPnINSR_INT (0x80)
/* Bit definitions and macros for MCF_USB_EPnINSFR */
#define MCF_USB_EPnINSFR_FRMNUM(x) (((x)&0x07FF)<<0)
/* Bit definitions and macros for MCF_USB_USBSR */
#define MCF_USB_USBSR_SUSP (0x00000080)
#define MCF_USB_USBSR_ISOERREP (0x0000000F)
/* Bit definitions and macros for MCF_USB_USBCR */
#define MCF_USB_USBCR_RESUME (0x00000001)
#define MCF_USB_USBCR_APPLOCK (0x00000002)
#define MCF_USB_USBCR_RST (0x00000004)
#define MCF_USB_USBCR_RAMEN (0x00000008)
#define MCF_USB_USBCR_RAMSPLIT (0x00000020)
/* Bit definitions and macros for MCF_USB_DRAMCR */
#define MCF_USB_DRAMCR_DADR(x) (((x)&0x000003FF)<<0)
#define MCF_USB_DRAMCR_DSIZE(x) (((x)&0x000007FF)<<16)
#define MCF_USB_DRAMCR_BSY (0x40000000)
#define MCF_USB_DRAMCR_START (0x80000000)
/* Bit definitions and macros for MCF_USB_DRAMDR */
#define MCF_USB_DRAMDR_DDAT(x) (((x)&0x000000FF)<<0)
/* Bit definitions and macros for MCF_USB_USBISR */
#define MCF_USB_USBISR_ISOERR (0x00000001)
#define MCF_USB_USBISR_FTUNLCK (0x00000002)
#define MCF_USB_USBISR_SUSP (0x00000004)
#define MCF_USB_USBISR_RES (0x00000008)
#define MCF_USB_USBISR_UPDSOF (0x00000010)
#define MCF_USB_USBISR_RSTSTOP (0x00000020)
#define MCF_USB_USBISR_SOF (0x00000040)
#define MCF_USB_USBISR_MSOF (0x00000080)
/* Bit definitions and macros for MCF_USB_USBIMR */
#define MCF_USB_USBIMR_ISOERR (0x00000001)
#define MCF_USB_USBIMR_FTUNLCK (0x00000002)
#define MCF_USB_USBIMR_SUSP (0x00000004)
#define MCF_USB_USBIMR_RES (0x00000008)
#define MCF_USB_USBIMR_UPDSOF (0x00000010)
#define MCF_USB_USBIMR_RSTSTOP (0x00000020)
#define MCF_USB_USBIMR_SOF (0x00000040)
#define MCF_USB_USBIMR_MSOF (0x00000080)
/* Bit definitions and macros for MCF_USB_EPnSTAT */
#define MCF_USB_EPnSTAT_RST (0x00000001)
#define MCF_USB_EPnSTAT_FLUSH (0x00000002)
#define MCF_USB_EPnSTAT_DIR (0x00000080)
#define MCF_USB_EPnSTAT_BYTECNT(x) (((x)&0x00000FFF)<<16)
/* Bit definitions and macros for MCF_USB_EPnISR */
#define MCF_USB_EPnISR_EOF (0x00000001)
#define MCF_USB_EPnISR_EOT (0x00000004)
#define MCF_USB_EPnISR_FIFOLO (0x00000010)
#define MCF_USB_EPnISR_FIFOHI (0x00000020)
#define MCF_USB_EPnISR_ERR (0x00000040)
#define MCF_USB_EPnISR_EMT (0x00000080)
#define MCF_USB_EPnISR_FU (0x00000100)
/* Bit definitions and macros for MCF_USB_EPnIMR */
#define MCF_USB_EPnIMR_EOF (0x00000001)
#define MCF_USB_EPnIMR_EOT (0x00000004)
#define MCF_USB_EPnIMR_FIFOLO (0x00000010)
#define MCF_USB_EPnIMR_FIFOHI (0x00000020)
#define MCF_USB_EPnIMR_ERR (0x00000040)
#define MCF_USB_EPnIMR_EMT (0x00000080)
#define MCF_USB_EPnIMR_FU (0x00000100)
/* Bit definitions and macros for MCF_USB_EPnFRCFGR */
#define MCF_USB_EPnFRCFGR_DEPTH(x) (((x)&0x00001FFF)<<0)
#define MCF_USB_EPnFRCFGR_BASE(x) (((x)&0x00000FFF)<<16)
/* Bit definitions and macros for MCF_USB_EPnFSR */
#define MCF_USB_EPnFSR_EMT (0x00010000)
#define MCF_USB_EPnFSR_ALRM (0x00020000)
#define MCF_USB_EPnFSR_FR (0x00040000)
#define MCF_USB_EPnFSR_FU (0x00080000)
#define MCF_USB_EPnFSR_OF (0x00100000)
#define MCF_USB_EPnFSR_UF (0x00200000)
#define MCF_USB_EPnFSR_RXW (0x00400000)
#define MCF_USB_EPnFSR_FAE (0x00800000)
#define MCF_USB_EPnFSR_FRM(x) (((x)&0x0000000F)<<24)
#define MCF_USB_EPnFSR_TXW (0x40000000)
#define MCF_USB_EPnFSR_IP (0x80000000)
/* Bit definitions and macros for MCF_USB_EPnFCR */
#define MCF_USB_EPnFCR_COUNTER(x) (((x)&0x0000FFFF)<<0)
#define MCF_USB_EPnFCR_TXWMSK (0x00040000)
#define MCF_USB_EPnFCR_OFMSK (0x00080000)
#define MCF_USB_EPnFCR_UFMSK (0x00100000)
#define MCF_USB_EPnFCR_RXWMSK (0x00200000)
#define MCF_USB_EPnFCR_FAEMSK (0x00400000)
#define MCF_USB_EPnFCR_IPMSK (0x00800000)
#define MCF_USB_EPnFCR_GR(x) (((x)&0x00000007)<<24)
#define MCF_USB_EPnFCR_FRM (0x08000000)
#define MCF_USB_EPnFCR_TMR (0x10000000)
#define MCF_USB_EPnFCR_WFR (0x20000000)
#define MCF_USB_EPnFCR_SHAD (0x80000000)
/* Bit definitions and macros for MCF_USB_EPnFAR */
#define MCF_USB_EPnFAR_ALRMP(x) (((x)&0x00000FFF)<<0)
/* Bit definitions and macros for MCF_USB_EPnFRP */
#define MCF_USB_EPnFRP_RP(x) (((x)&0x00000FFF)<<0)
/* Bit definitions and macros for MCF_USB_EPnFWP */
#define MCF_USB_EPnFWP_WP(x) (((x)&0x00000FFF)<<0)
/* Bit definitions and macros for MCF_USB_EPnLRFP */
#define MCF_USB_EPnLRFP_LRFP(x) (((x)&0x00000FFF)<<0)
/* Bit definitions and macros for MCF_USB_EPnLWFP */
#define MCF_USB_EPnLWFP_LWFP(x) (((x)&0x00000FFF)<<0)
/********************************************************************/
#endif /* __MCF548X_USB_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -