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

📄 mpc8xx.h

📁 motorola 针对coldfire 5275 评估板的Dbug bootloader源程序
💻 H
📖 第 1 页 / 共 5 页
字号:
/***********************************************************************/
#ifdef Mpc8xx_portio

/*
 * Input/Output Port, PORTIO
 */
typedef volatile struct
{
    uint16  PADIR;      /* Port A Data Direction Register   */
    uint16  PAPAR;      /* Port A Pin Assignment Register   */
    uint16  PAODR;      /* Port A Open Drain Register       */
    uint16  PADAT;      /* Port A Data Register             */
    uint16  reserved1[4];
    uint16  PCDIR;      /* Port C Data Direction Register   */
    uint16  PCPAR;      /* Port C Pin Assignment Register   */
    uint16  PCSO;       /* Port C Special Options           */
    uint16  PCDAT;      /* Port C Data Register             */
    uint16  PCINT;      /* Port C Interrupt Control Register*/
    uint16  reserved2[3];
    uint16  PDDIR;      /* Port D Data Direction Register   */
    uint16  PDPAR;      /* Port D Pin Assignment Register   */
    uint16  reserved3;
    uint16  PDDAT;      /* Port D Data Register             */
    uint16  reserved4[(1+0x97f-0x978)/2];
} MPC8XX_PORTIO;

#define MPC8XX_PORTIO_PADIR_PA0                 (0x8000)
#define MPC8XX_PORTIO_PADIR_PA1                 (0x4000)
#define MPC8XX_PORTIO_PADIR_PA2                 (0x2000)
#define MPC8XX_PORTIO_PADIR_PA3                 (0x1000)
#define MPC8XX_PORTIO_PADIR_PA4                 (0x0800)
#define MPC8XX_PORTIO_PADIR_PA5                 (0x0400)
#define MPC8XX_PORTIO_PADIR_PA6                 (0x0200)
#define MPC8XX_PORTIO_PADIR_PA7                 (0x0100)
#define MPC8XX_PORTIO_PADIR_PA8                 (0x0080)
#define MPC8XX_PORTIO_PADIR_PA9                 (0x0040)
#define MPC8XX_PORTIO_PADIR_PA10                (0x0020)
#define MPC8XX_PORTIO_PADIR_PA11                (0x0010)
#define MPC8XX_PORTIO_PADIR_PA12                (0x0008)
#define MPC8XX_PORTIO_PADIR_PA13                (0x0004)
#define MPC8XX_PORTIO_PADIR_PA14                (0x0002)
#define MPC8XX_PORTIO_PADIR_PA15                (0x0001)

#define MPC8XX_PORTIO_PAPAR_PA0                 (0x8000)
#define MPC8XX_PORTIO_PAPAR_PA1                 (0x4000)
#define MPC8XX_PORTIO_PAPAR_PA2                 (0x2000)
#define MPC8XX_PORTIO_PAPAR_PA3                 (0x1000)
#define MPC8XX_PORTIO_PAPAR_PA4                 (0x0800)
#define MPC8XX_PORTIO_PAPAR_PA5                 (0x0400)
#define MPC8XX_PORTIO_PAPAR_PA6                 (0x0200)
#define MPC8XX_PORTIO_PAPAR_PA7                 (0x0100)
#define MPC8XX_PORTIO_PAPAR_PA8                 (0x0080)
#define MPC8XX_PORTIO_PAPAR_PA9                 (0x0040)
#define MPC8XX_PORTIO_PAPAR_PA10                (0x0020)
#define MPC8XX_PORTIO_PAPAR_PA11                (0x0010)
#define MPC8XX_PORTIO_PAPAR_PA12                (0x0008)
#define MPC8XX_PORTIO_PAPAR_PA13                (0x0004)
#define MPC8XX_PORTIO_PAPAR_PA14                (0x0002)
#define MPC8XX_PORTIO_PAPAR_PA15                (0x0001)

#define MPC8XX_PORTIO_PAODR_PA9                 (0x0040)
#define MPC8XX_PORTIO_PAODR_PA10                (0x0020)
#define MPC8XX_PORTIO_PAODR_PA11                (0x0010)
#define MPC8XX_PORTIO_PAODR_PA12                (0x0008)
#define MPC8XX_PORTIO_PAODR_PA14                (0x0002)

#define MPC8XX_PORTIO_PADAT_PA0                 (0x8000)
#define MPC8XX_PORTIO_PADAT_PA1                 (0x4000)
#define MPC8XX_PORTIO_PADAT_PA2                 (0x2000)
#define MPC8XX_PORTIO_PADAT_PA3                 (0x1000)
#define MPC8XX_PORTIO_PADAT_PA4                 (0x0800)
#define MPC8XX_PORTIO_PADAT_PA5                 (0x0400)
#define MPC8XX_PORTIO_PADAT_PA6                 (0x0200)
#define MPC8XX_PORTIO_PADAT_PA7                 (0x0100)
#define MPC8XX_PORTIO_PADAT_PA8                 (0x0080)
#define MPC8XX_PORTIO_PADAT_PA9                 (0x0040)
#define MPC8XX_PORTIO_PADAT_PA10                (0x0020)
#define MPC8XX_PORTIO_PADAT_PA11                (0x0010)
#define MPC8XX_PORTIO_PADAT_PA12                (0x0008)
#define MPC8XX_PORTIO_PADAT_PA13                (0x0004)
#define MPC8XX_PORTIO_PADAT_PA14                (0x0002)
#define MPC8XX_PORTIO_PADAT_PA15                (0x0001)

#define MPC8XX_PORTIO_PCDIR_PC4                 (0x0800)
#define MPC8XX_PORTIO_PCDIR_PC5                 (0x0400)
#define MPC8XX_PORTIO_PCDIR_PC6                 (0x0200)
#define MPC8XX_PORTIO_PCDIR_PC7                 (0x0100)
#define MPC8XX_PORTIO_PCDIR_PC8                 (0x0080)
#define MPC8XX_PORTIO_PCDIR_PC9                 (0x0040)
#define MPC8XX_PORTIO_PCDIR_PC10                (0x0020)
#define MPC8XX_PORTIO_PCDIR_PC11                (0x0010)
#define MPC8XX_PORTIO_PCDIR_PC12                (0x0008)
#define MPC8XX_PORTIO_PCDIR_PC13                (0x0004)
#define MPC8XX_PORTIO_PCDIR_PC14                (0x0002)
#define MPC8XX_PORTIO_PCDIR_PC15                (0x0001)

#define MPC8XX_PORTIO_PCPAR_PC4                 (0x0800)
#define MPC8XX_PORTIO_PCPAR_PC5                 (0x0400)
#define MPC8XX_PORTIO_PCPAR_PC6                 (0x0200)
#define MPC8XX_PORTIO_PCPAR_PC7                 (0x0100)
#define MPC8XX_PORTIO_PCPAR_PC8                 (0x0080)
#define MPC8XX_PORTIO_PCPAR_PC9                 (0x0040)
#define MPC8XX_PORTIO_PCPAR_PC10                (0x0020)
#define MPC8XX_PORTIO_PCPAR_PC11                (0x0010)
#define MPC8XX_PORTIO_PCPAR_PC12                (0x0008)
#define MPC8XX_PORTIO_PCPAR_PC13                (0x0004)
#define MPC8XX_PORTIO_PCPAR_PC14                (0x0002)
#define MPC8XX_PORTIO_PCPAR_PC15                (0x0001)

#define MPC8XX_PORTIO_PCSO_PC4                  (0x0800)
#define MPC8XX_PORTIO_PCSO_PC5                  (0x0400)
#define MPC8XX_PORTIO_PCSO_PC6                  (0x0200)
#define MPC8XX_PORTIO_PCSO_PC7                  (0x0100)
#define MPC8XX_PORTIO_PCSO_PC8                  (0x0080)
#define MPC8XX_PORTIO_PCSO_PC9                  (0x0040)
#define MPC8XX_PORTIO_PCSO_PC10                 (0x0020)
#define MPC8XX_PORTIO_PCSO_PC11                 (0x0010)
#define MPC8XX_PORTIO_PCSO_PC14                 (0x0002)
#define MPC8XX_PORTIO_PCSO_PC15                 (0x0001)

#define MPC8XX_PORTIO_PCSO_CD4                  (0x0800)
#define MPC8XX_PORTIO_PCSO_CTS4                 (0x0400)
#define MPC8XX_PORTIO_PCSO_CD3                  (0x0200)
#define MPC8XX_PORTIO_PCSO_CTS3                 (0x0100)
#define MPC8XX_PORTIO_PCSO_CD2                  (0x0080)
#define MPC8XX_PORTIO_PCSO_CTS2                 (0x0040)
#define MPC8XX_PORTIO_PCSO_CD1                  (0x0020)
#define MPC8XX_PORTIO_PCSO_CTS1                 (0x0010)
#define MPC8XX_PORTIO_PCSO_DREQ1                (0x0002)
#define MPC8XX_PORTIO_PCSO_DREQ0                (0x0001)

#define MPC8XX_PORTIO_PCDAT_PC4                 (0x0800)
#define MPC8XX_PORTIO_PCDAT_PC5                 (0x0400)
#define MPC8XX_PORTIO_PCDAT_PC6                 (0x0200)
#define MPC8XX_PORTIO_PCDAT_PC7                 (0x0100)
#define MPC8XX_PORTIO_PCDAT_PC8                 (0x0080)
#define MPC8XX_PORTIO_PCDAT_PC9                 (0x0040)
#define MPC8XX_PORTIO_PCDAT_PC10                (0x0020)
#define MPC8XX_PORTIO_PCDAT_PC11                (0x0010)
#define MPC8XX_PORTIO_PCDAT_PC12                (0x0008)
#define MPC8XX_PORTIO_PCDAT_PC13                (0x0004)
#define MPC8XX_PORTIO_PCDAT_PC14                (0x0002)
#define MPC8XX_PORTIO_PCDAT_PC15                (0x0001)

#define MPC8XX_PORTIO_PCINT_PC4                 (0x0800)
#define MPC8XX_PORTIO_PCINT_PC5                 (0x0400)
#define MPC8XX_PORTIO_PCINT_PC6                 (0x0200)
#define MPC8XX_PORTIO_PCINT_PC7                 (0x0100)
#define MPC8XX_PORTIO_PCINT_PC8                 (0x0080)
#define MPC8XX_PORTIO_PCINT_PC9                 (0x0040)
#define MPC8XX_PORTIO_PCINT_PC10                (0x0020)
#define MPC8XX_PORTIO_PCINT_PC11                (0x0010)
#define MPC8XX_PORTIO_PCINT_PC12                (0x0008)
#define MPC8XX_PORTIO_PCINT_PC13                (0x0004)
#define MPC8XX_PORTIO_PCINT_PC14                (0x0002)
#define MPC8XX_PORTIO_PCINT_PC15                (0x0001)

#define MPC8XX_PORTIO_PCINT_EDM4                (0x0800)
#define MPC8XX_PORTIO_PCINT_EDM5                (0x0400)
#define MPC8XX_PORTIO_PCINT_EDM6                (0x0200)
#define MPC8XX_PORTIO_PCINT_EDM7                (0x0100)
#define MPC8XX_PORTIO_PCINT_EDM8                (0x0080)
#define MPC8XX_PORTIO_PCINT_EDM9                (0x0040)
#define MPC8XX_PORTIO_PCINT_EDM10               (0x0020)
#define MPC8XX_PORTIO_PCINT_EDM11               (0x0010)
#define MPC8XX_PORTIO_PCINT_EDM12               (0x0008)
#define MPC8XX_PORTIO_PCINT_EDM13               (0x0004)
#define MPC8XX_PORTIO_PCINT_EDM14               (0x0002)
#define MPC8XX_PORTIO_PCINT_EDM15               (0x0001)

#define MPC8XX_PORTIO_PDDIR_PD0             (0x8000)
#define MPC8XX_PORTIO_PDDIR_PD1             (0x4000)
#define MPC8XX_PORTIO_PDDIR_PD2             (0x2000)
#define MPC8XX_PORTIO_PDDIR_PD3             (0x1000)
#define MPC8XX_PORTIO_PDDIR_PD4             (0x0800)
#define MPC8XX_PORTIO_PDDIR_PD5             (0x0400)
#define MPC8XX_PORTIO_PDDIR_PD6             (0x0200)
#define MPC8XX_PORTIO_PDDIR_PD7             (0x0100)
#define MPC8XX_PORTIO_PDDIR_PD8             (0x0080)
#define MPC8XX_PORTIO_PDDIR_PD9             (0x0040)
#define MPC8XX_PORTIO_PDDIR_PD10            (0x0020)
#define MPC8XX_PORTIO_PDDIR_PD11            (0x0010)
#define MPC8XX_PORTIO_PDDIR_PD12            (0x0008)
#define MPC8XX_PORTIO_PDDIR_PD13            (0x0004)
#define MPC8XX_PORTIO_PDDIR_PD14            (0x0002)
#define MPC8XX_PORTIO_PDDIR_PD15            (0x0001)

#define MPC8XX_PORTIO_PDPAR_PD0             (0x8000)
#define MPC8XX_PORTIO_PDPAR_PD1             (0x4000)
#define MPC8XX_PORTIO_PDPAR_PD2             (0x2000)
#define MPC8XX_PORTIO_PDPAR_PD3             (0x1000)
#define MPC8XX_PORTIO_PDPAR_PD4             (0x0800)
#define MPC8XX_PORTIO_PDPAR_PD5             (0x0400)
#define MPC8XX_PORTIO_PDPAR_PD6             (0x0200)
#define MPC8XX_PORTIO_PDPAR_PD7             (0x0100)
#define MPC8XX_PORTIO_PDPAR_PD8             (0x0080)
#define MPC8XX_PORTIO_PDPAR_PD9             (0x0040)
#define MPC8XX_PORTIO_PDPAR_PD10            (0x0020)
#define MPC8XX_PORTIO_PDPAR_PD11            (0x0010)
#define MPC8XX_PORTIO_PDPAR_PD12            (0x0008)
#define MPC8XX_PORTIO_PDPAR_PD13            (0x0004)
#define MPC8XX_PORTIO_PDPAR_PD14            (0x0002)
#define MPC8XX_PORTIO_PDPAR_PD15            (0x0001)

#define MPC8XX_PORTIO_PDDAT_PD0             (0x8000)
#define MPC8XX_PORTIO_PDDAT_PD1             (0x4000)
#define MPC8XX_PORTIO_PDDAT_PD2             (0x2000)
#define MPC8XX_PORTIO_PDDAT_PD3             (0x1000)
#define MPC8XX_PORTIO_PDDAT_PD4             (0x0800)
#define MPC8XX_PORTIO_PDDAT_PD5             (0x0400)
#define MPC8XX_PORTIO_PDDAT_PD6             (0x0200)
#define MPC8XX_PORTIO_PDDAT_PD7             (0x0100)
#define MPC8XX_PORTIO_PDDAT_PD8             (0x0080)
#define MPC8XX_PORTIO_PDDAT_PD9             (0x0040)
#define MPC8XX_PORTIO_PDDAT_PD10            (0x0020)
#define MPC8XX_PORTIO_PDDAT_PD11            (0x0010)
#define MPC8XX_PORTIO_PDDAT_PD12            (0x0008)
#define MPC8XX_PORTIO_PDDAT_PD13            (0x0004)
#define MPC8XX_PORTIO_PDDAT_PD14            (0x0002)
#define MPC8XX_PORTIO_PDDAT_PD15            (0x0001)

#endif /* Mpc8xx_portio */

/***********************************************************************/
#ifdef Mpc8xx_cpmtimer

/*
 * CPM Timers, CPMTIMER
 */
typedef volatile struct
{
    uint16  TGCR;       /* Timer Global Configuration Register  */
    uint16  reserved1[(1+0x98f-0x982)/2];
    uint16  TMR1;       /* Timer 1 Mode Register                */
    uint16  TMR2;       /* Timer 2 Mode Register                */
    uint16  TRR1;       /* Timer 1 Reference Register           */
    uint16  TRR2;       /* Timer 2 Reference Register           */
    uint16  TCR1;       /* Timer 1 Capture Register             */
    uint16  TCR2;       /* Timer 2 Capture Register             */
    uint16  TCN1;       /* Timer 1 Counter Register             */
    uint16  TCN2;       /* Timer 2 Counter Register             */
    uint16  TMR3;       /* Timer 3 Mode Register                */
    uint16  TMR4;       /* Timer 4 Mode Register                */
    uint16  TRR3;       /* Timer 3 Reference Register           */
    uint16  TRR4;       /* Timer 4 Reference Register           */
    uint16  TCR3;       /* Timer 3 Capture Register             */
    uint16  TCR4;       /* Timer 4 Capture Register             */
    uint16  TCN3;       /* Timer 3 Counter Register             */
    uint16  TCN4;       /* Timer 4 Counter Register             */
    uint16  TER1;       /* Timer 1 Event Register               */
    uint16  TER2;       /* Timer 2 Event Register               */
    uint16  TER3;       /* Timer 3 Event Register               */
    uint16  TER4;       /* Timer 4 Event Register               */
    uint16  reserved[(1+0x9bf-0x9b8)/2];
} MPC8XX_CPMTIMER;

#define MPC8XX_CPMTIMER_TGCR_CAS4       (0x8000)
#define MPC8XX_CPMTIMER_TGCR_FRZ4       (0x4000)
#define MPC8XX_CPMTIMER_TGCR_STP4       (0x2000)
#define MPC8XX_CPMTIMER_TGCR_RST4       (0x1000)
#define MPC8XX_CPMTIMER_TGCR_GM2        (0x0800)
#define MPC8XX_CPMTIMER_TGCR_FRZ3       (0x0400)
#define MPC8XX_CPMTIMER_TGCR_STP3       (0x0200)
#define MPC8XX_CPMTIMER_TGCR_RST3       (0x0100)
#define MPC8XX_CPMTIMER_TGCR_CAS2       (0x0080)
#define MPC8XX_CPMTIMER_TGCR_FRZ2       (0x0040)
#define MPC8XX_CPMTIMER_TGCR_STP2       (0x0020)
#define MPC8XX_CPMTIMER_TGCR_RST2       (0x0010)
#define MPC8XX_CPMTIMER_TGCR_GM1        (0x0008)
#define MPC8XX_CPMTIMER_TGCR_FRZ1       (0x0004)
#define MPC8XX_CPMTIMER_TGCR_STP1       (0x0002)
#define MPC8XX_CPMTIMER_TGCR_RST1       (0x0001)

#define MPC8XX_CPMTIMER_TMR_PS(X)       (((X)&0x00FF)<<8)
#define MPC8XX_CPMTIMER_TMR_CE_NONE     (0x0000)
#define MPC8XX_CPMTIMER_TMR_CE_R

⌨️ 快捷键说明

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