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

📄 mcf5222x_reg.h

📁 USB 通信,使用的是Freescale公司的CMX协议栈
💻 H
📖 第 1 页 / 共 5 页
字号:
#define MCF_SCM_PPMRL_CDQSPI         (0x00000400)
#define MCF_SCM_PPMRL_CDDTIM0        (0x00002000)
#define MCF_SCM_PPMRL_CDDTIM1        (0x00004000)
#define MCF_SCM_PPMRL_CDDTIM2        (0x00008000)
#define MCF_SCM_PPMRL_CDDTIM3        (0x00010000)
#define MCF_SCM_PPMRL_CDINTC0        (0x00020000)

/* Bit definitions and macros for MCF_SCM_PPMRS */
#define MCF_SCM_PPMRS_DISABLE_ALL    (64)
#define MCF_SCM_PPMRS_DISABLE_CFM    (43)
#define MCF_SCM_PPMRS_DISABLE_CAN    (42)
#define MCF_SCM_PPMRS_DISABLE_PWM    (41)
#define MCF_SCM_PPMRS_DISABLE_GPT    (40)
#define MCF_SCM_PPMRS_DISABLE_ADC    (39)
#define MCF_SCM_PPMRS_DISABLE_PIT1   (36)
#define MCF_SCM_PPMRS_DISABLE_PIT0   (35)
#define MCF_SCM_PPMRS_DISABLE_EPORT  (33)
#define MCF_SCM_PPMRS_DISABLE_PORTS  (32)
#define MCF_SCM_PPMRS_DISABLE_INTC   (17)
#define MCF_SCM_PPMRS_DISABLE_DTIM3  (16)
#define MCF_SCM_PPMRS_DISABLE_DTIM2  (15)
#define MCF_SCM_PPMRS_DISABLE_DTIM1  (14)
#define MCF_SCM_PPMRS_DISABLE_DTIM0  (13)
#define MCF_SCM_PPMRS_DISABLE_QSPI   (10)
#define MCF_SCM_PPMRS_DISABLE_I2C    (9)
#define MCF_SCM_PPMRS_DISABLE_UART2  (7)
#define MCF_SCM_PPMRS_DISABLE_UART1  (6)
#define MCF_SCM_PPMRS_DISABLE_UART0  (5)
#define MCF_SCM_PPMRS_DISABLE_DMA    (4)
#define MCF_SCM_PPMRS_SET_CDG        (1)

/* Bit definitions and macros for MCF_SCM_PPMRC */
#define MCF_SCM_PPMRC_ENABLE_ALL     (64)
#define MCF_SCM_PPMRC_ENABLE_CFM     (43)
#define MCF_SCM_PPMRC_ENABLE_CAN     (42)
#define MCF_SCM_PPMRC_ENABLE_PWM     (41)
#define MCF_SCM_PPMRC_ENABLE_GPT     (40)
#define MCF_SCM_PPMRC_ENABLE_ADC     (39)
#define MCF_SCM_PPMRC_ENABLE_PIT1    (36)
#define MCF_SCM_PPMRC_ENABLE_PIT0    (35)
#define MCF_SCM_PPMRC_ENABLE_EPORT   (33)
#define MCF_SCM_PPMRC_ENABLE_PORTS   (32)
#define MCF_SCM_PPMRC_ENABLE_INTC    (17)
#define MCF_SCM_PPMRC_ENABLE_DTIM3   (16)
#define MCF_SCM_PPMRC_ENABLE_DTIM2   (15)
#define MCF_SCM_PPMRC_ENABLE_DTIM1   (14)
#define MCF_SCM_PPMRC_ENABLE_DTIM0   (13)
#define MCF_SCM_PPMRC_ENABLE_QSPI    (10)
#define MCF_SCM_PPMRC_ENABLE_I2C     (9)
#define MCF_SCM_PPMRC_ENABLE_UART2   (7)
#define MCF_SCM_PPMRC_ENABLE_UART1   (6)
#define MCF_SCM_PPMRC_ENABLE_UART0   (5)
#define MCF_SCM_PPMRC_ENABLE_DMA     (4)
#define MCF_SCM_PPMRC_CLEAR_CDG      (1)

/*********************************************************************
*
* Clock Module (CLOCK)
*
*********************************************************************/

/* Register read/write macros */
#define MCF_CLOCK_SYNCR           (*(hcc_reg16*)(&_IPSBAR[0x120000]))
#define MCF_CLOCK_SYNSR           (*(hcc_reg8 *)(&_IPSBAR[0x120002]))
#define MCF_CLOCK_LPCR            (*(hcc_reg8 *)(&_IPSBAR[0x120007]))
#define MCF_CLOCK_CCHR            (*(hcc_reg8 *)(&_IPSBAR[0x120008]))
#define MCF_CLOCK_RTCDR           (*(hcc_reg32*)(&_IPSBAR[0x12000C]))

/* Bit definitions and macros for MCF_CLOCK_SYNCR */
#define MCF_CLOCK_SYNCR_PLLEN     (0x0001)
#define MCF_CLOCK_SYNCR_PLLMODE   (0x0002)
#define MCF_CLOCK_SYNCR_CLKSRC    (0x0004)
#define MCF_CLOCK_SYNCR_FWKUP     (0x0020)
#define MCF_CLOCK_SYNCR_DISCLK    (0x0040)
#define MCF_CLOCK_SYNCR_LOCEN     (0x0080)
#define MCF_CLOCK_SYNCR_RFD(x)    (((x)&0x0007)<<8)
#define MCF_CLOCK_SYNCR_LOCRE     (0x0800)
#define MCF_CLOCK_SYNCR_MFD(x)    (((x)&0x0007)<<12)
#define MCF_CLOCK_SYNCR_LOLRE     (0x8000)

/* Bit definitions and macros for MCF_CLOCK_SYNSR */
#define MCF_CLOCK_SYNSR_LOCS      (0x04)
#define MCF_CLOCK_SYNSR_LOCK      (0x08)
#define MCF_CLOCK_SYNSR_LOCKS     (0x10)
#define MCF_CLOCK_SYNSR_CRYOSC    (0x20)
#define MCF_CLOCK_SYNSR_OCOSC     (0x40)
#define MCF_CLOCK_SYNSR_EXTOSC    (0x80)

/* Bit definitions and macros for MCF_CLOCK_LPCR */
#define MCF_CLOCK_LPCR_LPD(x)     (((x)&0x0F)<<0)

/* Bit definitions and macros for MCF_CLOCK_CCHR */
#define MCF_CLOCK_CCHR_PFD(x)     (((x)&0x07)<<0)

/* Bit definitions and macros for MCF_CLOCK_RTCDR */
#define MCF_CLOCK_RTCDR_RTCDF(x)  (((x)&0xFFFFFFFF)<<0)


/*********************************************************************
*
* Universal Serial Bus (USB)
*
*********************************************************************/

/* Register read/write macros */
#define MCF_USB_PER_ID                       (*(hcc_reg8 *)(&_IPSBAR[0x1C0000]))
#define MCF_USB_IP_COMP                      (*(hcc_reg8 *)(&_IPSBAR[0x1C0004]))
#define MCF_USB_REV                          (*(hcc_reg8 *)(&_IPSBAR[0x1C0008]))
#define MCF_USB_ADD_INFO                     (*(hcc_reg8 *)(&_IPSBAR[0x1C000C]))
#define MCF_USB_OTG_INT_STAT                 (*(hcc_reg8 *)(&_IPSBAR[0x1C0010]))
#define MCF_USB_OTG_INT_EN                   (*(hcc_reg8 *)(&_IPSBAR[0x1C0014]))
#define MCF_USB_OTG_STATUS                   (*(hcc_reg8 *)(&_IPSBAR[0x1C0018]))
#define MCF_USB_OTG_CTRL                     (*(hcc_reg8 *)(&_IPSBAR[0x1C001C]))
#define MCF_USB_INT_STAT                     (*(hcc_reg8 *)(&_IPSBAR[0x1C0080]))
#define MCF_USB_INT_ENB                      (*(hcc_reg8 *)(&_IPSBAR[0x1C0084]))
#define MCF_USB_ERR_STAT                     (*(hcc_reg8 *)(&_IPSBAR[0x1C0088]))
#define MCF_USB_ERR_ENB                      (*(hcc_reg8 *)(&_IPSBAR[0x1C008C]))
#define MCF_USB_STAT                         (*(hcc_reg8 *)(&_IPSBAR[0x1C0090]))
#define MCF_USB_CTL                          (*(hcc_reg8 *)(&_IPSBAR[0x1C0094]))
#define MCF_USB_ADDR                         (*(hcc_reg8 *)(&_IPSBAR[0x1C0098]))
#define MCF_USB_BDT_PAGE_01                  (*(hcc_reg8 *)(&_IPSBAR[0x1C009C]))
#define MCF_USB_FRM_NUML                     (*(hcc_reg8 *)(&_IPSBAR[0x1C00A0]))
#define MCF_USB_FRM_NUMH                     (*(hcc_reg8 *)(&_IPSBAR[0x1C00A4]))
#define MCF_USB_FRM_NUM       (MCF_USB_INT_STAT=MCF_USB_INT_STAT_SOF_TOK ,MCF_USB_FRM_NUML | (((hcc_u16)MCF_USB_FRM_NUMH)<<8))
#define MCF_USB_TOKEN                        (*(hcc_reg8 *)(&_IPSBAR[0x1C00A8]))
#define MCF_USB_SOF_THLDL                    (*(hcc_reg8 *)(&_IPSBAR[0x1C00AC]))
#define MCF_USB_BDT_PAGE_02                  (*(hcc_reg8 *)(&_IPSBAR[0x1C00B0]))
#define MCF_USB_BDT_PAGE_03                  (*(hcc_reg8 *)(&_IPSBAR[0x1C00B4]))
#define MCF_USB_ENDPT0                       (*(hcc_reg8 *)(&_IPSBAR[0x1C00C0]))
#define MCF_USB_ENDPT1                       (*(hcc_reg8 *)(&_IPSBAR[0x1C00C4]))
#define MCF_USB_ENDPT2                       (*(hcc_reg8 *)(&_IPSBAR[0x1C00C8]))
#define MCF_USB_ENDPT3                       (*(hcc_reg8 *)(&_IPSBAR[0x1C00CC]))
#define MCF_USB_ENDPT4                       (*(hcc_reg8 *)(&_IPSBAR[0x1C00D0]))
#define MCF_USB_ENDPT5                       (*(hcc_reg8 *)(&_IPSBAR[0x1C00D4]))
#define MCF_USB_ENDPT6                       (*(hcc_reg8 *)(&_IPSBAR[0x1C00D8]))
#define MCF_USB_ENDPT7                       (*(hcc_reg8 *)(&_IPSBAR[0x1C00DC]))
#define MCF_USB_ENDPT8                       (*(hcc_reg8 *)(&_IPSBAR[0x1C00E0]))
#define MCF_USB_ENDPT9                       (*(hcc_reg8 *)(&_IPSBAR[0x1C00E4]))
#define MCF_USB_ENDPT10                      (*(hcc_reg8 *)(&_IPSBAR[0x1C00E8]))
#define MCF_USB_ENDPT11                      (*(hcc_reg8 *)(&_IPSBAR[0x1C00EC]))
#define MCF_USB_ENDPT12                      (*(hcc_reg8 *)(&_IPSBAR[0x1C00F0]))
#define MCF_USB_ENDPT13                      (*(hcc_reg8 *)(&_IPSBAR[0x1C00F4]))
#define MCF_USB_ENDPT14                      (*(hcc_reg8 *)(&_IPSBAR[0x1C00F8]))
#define MCF_USB_ENDPT15                      (*(hcc_reg8 *)(&_IPSBAR[0x1C00FC]))
#define MCF_USB_USB_CTRL                     (*(hcc_reg8 *)(&_IPSBAR[0x1C0100]))
#define MCF_USB_USB_OTG_OBSERVE              (*(hcc_reg8 *)(&_IPSBAR[0x1C0104]))
#define MCF_USB_USB_OTG_CONTROL              (*(hcc_reg8 *)(&_IPSBAR[0x1C0108]))

/* Bit definitions and macros for MCF_USB_PER_ID */
#define MCF_USB_PER_ID_ID(x)                 (((x)&0x3F)<<0)

/* Bit definitions and macros for MCF_USB_IP_COMP */
#define MCF_USB_IP_COMP_NID(x)               (((x)&0x3F)<<0)

/* Bit definitions and macros for MCF_USB_REV */
#define MCF_USB_REV_REV(x)                   (((x)&0xFF)<<0)

/* Bit definitions and macros for MCF_USB_ADD_INFO */
#define MCF_USB_ADD_INFO_HOST                (0x01)
#define MCF_USB_ADD_INFO_IRQ_NUM(x)          (((x)&0x1F)<<3)

/* Bit definitions and macros for MCF_USB_OTG_INT_STAT */
#define MCF_USB_OTG_INT_STAT_A_VBUS_VLD_CHG  (0x01)
#define MCF_USB_OTG_INT_STAT_B_SESS_END_CHG  (0x04)
#define MCF_USB_OTG_INT_STAT_SESS_VLD_CHG    (0x08)
#define MCF_USB_OTG_INT_STAT_LINE_STATE      (0x20)
#define MCF_USB_OTG_INT_STAT_1_MSEC          (0x40)
#define MCF_USB_OTG_INT_STAT_ID_CHG          (0x80)

/* Bit definitions and macros for MCF_USB_OTG_INT_EN */
#define MCF_USB_OTG_INT_EN_A_VBUS_VLD_EN     (0x01)
#define MCF_USB_OTG_INT_EN_B_SESS_END_EN     (0x04)
#define MCF_USB_OTG_INT_EN_SESS_VLD_EN       (0x08)
#define MCF_USB_OTG_INT_EN_LINE_STATE        (0x20)
#define MCF_USB_OTG_INT_EN_1_MSEC_EN         (0x40)
#define MCF_USB_OTG_INT_EN_ID_EN             (0x80)

/* Bit definitions and macros for MCF_USB_OTG_STATUS */
#define MCF_USB_OTG_STATUS_A_VBUS_VLD        (0x01)
#define MCF_USB_OTG_STATUS_B_SESS_END        (0x04)
#define MCF_USB_OTG_STATUS_SESS_VLD          (0x08)
#define MCF_USB_OTG_STATUS_LINE_STATE        (0x20)
#define MCF_USB_OTG_STATUS_1_MSEC            (0x40)
#define MCF_USB_OTG_STATUS_ID                (0x80)

/* Bit definitions and macros for MCF_USB_OTG_CTRL */
#define MCF_USB_OTG_CTRL_VBUS_DSCHG          (0x01)
#define MCF_USB_OTG_CTRL_VBUS_CHG            (0x02)
#define MCF_USB_OTG_CTRL_OTG_EN              (0x04)
#define MCF_USB_OTG_CTRL_VBUS_ON             (0x08)
#define MCF_USB_OTG_CTRL_DM_LOW              (0x10)
#define MCF_USB_OTG_CTRL_DP_LOW              (0x20)
#define MCF_USB_OTG_CTRL_DM_HIGH             (0x40)
#define MCF_USB_OTG_CTRL_DP_HIGH             (0x80)

/* Bit definitions and macros for MCF_USB_INT_STAT */
#define MCF_USB_INT_STAT_USB_RST             (0x01)
#define MCF_USB_INT_STAT_ERROR               (0x02)
#define MCF_USB_INT_STAT_SOF_TOK             (0x04)
#define MCF_USB_INT_STAT_TOK_DNE             (0x08)
#define MCF_USB_INT_STAT_SLEEP               (0x10)
#define MCF_USB_INT_STAT_RESUME              (0x20)
#define MCF_USB_INT_STAT_ATTACH              (0x40)
#define MCF_USB_INT_STAT_STALL               (0x80)

/* Bit definitions and macros for MCF_USB_INT_ENB */
#define MCF_USB_INT_ENB_USB_RST              (0x01)
#define MCF_USB_INT_ENB_ERROR                (0x02)
#define MCF_USB_INT_ENB_SOF_TOK              (0x04)
#define MCF_USB_INT_ENB_TOK_DNE              (0x08)
#define MCF_USB_INT_ENB_SLEEP                (0x10)
#define MCF_USB_INT_ENB_RESUME               (0x20)
#define MCF_USB_INT_ENB_ATTACH               (0x40)
#define MCF_USB_INT_ENB_STALL                (0x80)

/* Bit definitions and macros for MCF_USB_ERR_STAT */
#define MCF_USB_ERR_STAT_PID_ERR             (0x01)
#define MCF_USB_ERR_STAT_CRC5_EOF            (0x02)
#define MCF_USB_ERR_STAT_CRC16               (0x04)
#define MCF_USB_ERR_STAT_DFN8                (0x08)
#define MCF_USB_ERR_STAT_BTO_ERR             (0x10)
#define MCF_USB_ERR_STAT_DMA_ERR             (0x20)
#define MCF_USB_ERR_STAT_BTS_ERR             (0x80)

/* Bit definitions and macros for MCF_USB_ERR_ENB */
#define MCF_USB_ERR_ENB_PID_ERR              (0x01)
#define MCF_USB_ERR_ENB_CRC5_EOF             (0x02)
#define MCF_USB_ERR_ENB_CRC16                (0x04)
#define MCF_USB_ERR_ENB_DFN8                 (0x08)
#define MCF_USB_ERR_ENB_BTO_ERR              (0x10)
#define MCF_USB_ERR_ENB_DMA_ERR              (0x20)
#define MCF_USB_ERR_ENB_BTS_ERR              (0x80)

/* Bit definitions and macros for MCF_USB_STAT */
#define MCF_USB_STAT_ODD                     (0x04)
#define MCF_USB_STAT_TX                      (0x08)
#define MCF_USB_STAT_ENDP(x)                 (((x)&0x0F)<<4)

/* Bit definitions and macros for MCF_USB_CTL */
#define MCF_USB_CTL_USB_EN_SOF_EN            (0x01)
#define MCF_USB_CTL_ODD_RST                  (0x02)
#define MCF_USB_CTL_RESUME                   (0x04)
#define MCF_USB_CTL_HOST_MODE_EN             (0x08)
#define MCF_USB_CTL_RESET                    (0x10)
#define MCF_USB_CTL_TXDSUSPEND_TOKBUSY       (0x20)
#define MCF_USB_CTL_SE0                      (0x40)
#define MCF_USB_CTL_JSTATE                   (0x80)

/* Bit definitions and macros for MCF_USB_ADDR */
#define MCF_USB_ADDR_ADDR(x)                 (((x)&0x7F)<<0)
#define MCF_USB_ADDR_LS_EN                   (0x80)

/* Bit definitions and macros for MCF_USB_BDT_PAGE_01 */
#define MCF_USB_BDT_PAGE_01_BDT_BA9          (0x02)

⌨️ 快捷键说明

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