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

📄 c5402reg.h

📁 TLV2544-2548多通道12位串行A-D转换器的原理与应用
💻 H
📖 第 1 页 / 共 3 页
字号:
#define DMFRI1_SUB      0x23
#define DMGSA_SUB       0x24
#define DMGDA_SUB       0x25
#define DMGCR_SUB       0x26
#define DMGFR_SUB       0x27


/* Define the base addresses for auto-incrementing */
/* Autoincrementing addresses will be denotated with a A ending */
#define DMSRC0_BASEA    0x56
#define DMSRC1_BASEA    0x56
#define DMSRC2_BASEA    0x56
#define DMSRC3_BASEA    0x56
#define DMSRC4_BASEA    0x56
#define DMSRC5_BASEA    0x56

#define DMDST0_BASEA    0x56
#define DMDST1_BASEA    0x56
#define DMDST2_BASEA    0x56
#define DMDST3_BASEA    0x56
#define DMDST4_BASEA    0x56
#define DMDST5_BASEA    0x56

#define DMCTR0_BASEA    0x56
#define DMCTR1_BASEA    0x56
#define DMCTR2_BASEA    0x56
#define DMCTR3_BASEA    0x56
#define DMCTR4_BASEA    0x56
#define DMCTR5_BASEA    0x56

#define DMSFC0_BASEA    0x56
#define DMSFC1_BASEA    0x56
#define DMSFC2_BASEA    0x56
#define DMSFC3_BASEA    0x56
#define DMSFC4_BASEA    0x56
#define DMSFC5_BASEA    0x56

#define DMMCR0_BASEA    0x56
#define DMMCR1_BASEA    0x56
#define DMMCR2_BASEA    0x56
#define DMMCR3_BASEA    0x56
#define DMMCR4_BASEA    0x56
#define DMMCR5_BASEA    0x56

#define DMSRCP_BASEA    0x56
#define DMDSTP_BASEA    0x56

#define DMIDX0_BASEA    0x56
#define DMIDX1_BASEA    0x56

#define DMFRI0_BASEA    0x56
#define DMFRI1_BASEA    0x56

#define DMSGA_BASEA             0x56
#define DMGDA_BASEA             0x56
#define DMGCR_BASEA             0x56
#define DMGFR_BASEA             0x56

#define DMSRC0_ADDRA    (*(volatile unsigned int *)     DMSRC0_BASEA)
#define DMSRC1_ADDRA    (*(volatile unsigned int *)     DMSRC1_BASEA)
#define DMSRC2_ADDRA    (*(volatile unsigned int *)     DMSRC2_BASEA)
#define DMSRC3_ADDRA    (*(volatile unsigned int *)     DMSRC3_BASEA)
#define DMSRC4_ADDRA    (*(volatile unsigned int *)     DMSRC4_BASEA)
#define DMSRC5_ADDRA    (*(volatile unsigned int *)     DMSRC5_BASEA)

#define DMDST0_ADDRA    (*(volatile unsigned int *)     DMDST0_BASEA)
#define DMDST1_ADDRA    (*(volatile unsigned int *)     DMDST1_BASEA)
#define DMDST2_ADDRA    (*(volatile unsigned int *)     DMDST2_BASEA)
#define DMDST3_ADDRA    (*(volatile unsigned int *)     DMDST3_BASEA)
#define DMDST4_ADDRA    (*(volatile unsigned int *)     DMDST4_BASEA)
#define DMDST5_ADDRA    (*(volatile unsigned int *)     DMDST5_BASEA)

#define DMCTR0_ADDRA    (*(volatile unsigned int *)     DMCTR0_BASEA)
#define DMCTR1_ADDRA    (*(volatile unsigned int *)     DMCTR0_BASEA)
#define DMCTR2_ADDRA    (*(volatile unsigned int *)     DMCTR0_BASEA)
#define DMCTR3_ADDRA    (*(volatile unsigned int *)     DMCTR0_BASEA)
#define DMCTR4_ADDRA    (*(volatile unsigned int *)     DMCTR0_BASEA)
#define DMCTR5_ADDRA    (*(volatile unsigned int *)     DMCTR0_BASEA)

#define DMSFC0_ADDRA    ((volatile DMSFCn_REG *)        ((char *) DMSFC0_BASEA))
#define DMSFC1_ADDRA    ((volatile DMSFCn_REG *)        ((char *) DMSFC1_BASEA))
#define DMSFC2_ADDRA    ((volatile DMSFCn_REG *)        ((char *) DMSFC2_BASEA))
#define DMSFC3_ADDRA    ((volatile DMSFCn_REG *)        ((char *) DMSFC3_BASEA))
#define DMSFC4_ADDRA    ((volatile DMSFCn_REG *)        ((char *) DMSFC4_BASEA))
#define DMSFC5_ADDRA    ((volatile DMSFCn_REG *)        ((char *) DMSFC5_BASEA))

#define DMMCR0_ADDRA    ((volatile DMMCRn_REG *)        ((char *) DMMCR0_BASEA))
#define DMMCR1_ADDRA    ((volatile DMMCRn_REG *)        ((char *) DMMCR1_BASEA))
#define DMMCR2_ADDRA    ((volatile DMMCRn_REG *)        ((char *) DMMCR2_BASEA))
#define DMMCR3_ADDRA    ((volatile DMMCRn_REG *)        ((char *) DMMCR3_BASEA))
#define DMMCR4_ADDRA    ((volatile DMMCRn_REG *)        ((char *) DMMCR4_BASEA))
#define DMMCR5_ADDRA    ((volatile DMMCRn_REG *)        ((char *) DMMCR5_BASEA))

#define DMSRCP_ADDRA    ((volatile DMSRCP_REG *)        ((char *) DMSRCP_BASEA))
#define DMDSTP_ADDRA    ((volatile DMDSTP_REG *)        ((char *) DMDSTP_BASEA))

#define DMIDX0_ADDRA    (*(volatile unsigned int *)     DMIDX0_BASEA)
#define DMIDX1_ADDRA    (*(volatile unsigned int *)     DMIDX1_BASEA)
                                                                
#define DMFRI0_ADDRA    (*(volatile unsigned int *)     DMFRI0_BASEA)
#define DMFRI1_ADDRA    (*(volatile unsigned int *)     DMFRI1_BASEA)

#define DMSGA_ADDRA             (*(volatile unsigned int *)     DMSGA_BASEA)
#define DMGDA_ADDRA             (*(volatile unsigned int *)     DMGDA_BASEA)
#define DMGCR_ADDRA             (*(volatile unsigned int *)     DMGCR_BASEA)
#define DMGFR_ADDRA             (*(volatile unsigned int *)     DMGFR_BASEA)


/* Define the base addresses without auto-incrementing  */
#define DMSRC0_BASE     0x57
#define DMSRC1_BASE     0x57
#define DMSRC2_BASE     0x57
#define DMSRC3_BASE     0x57
#define DMSRC4_BASE     0x57
#define DMSRC5_BASE     0x57

#define DMDST0_BASE     0x57
#define DMDST1_BASE     0x57
#define DMDST2_BASE     0x57
#define DMDST3_BASE     0x57
#define DMDST4_BASE     0x57
#define DMDST5_BASE     0x57

#define DMCTR0_BASE     0x57
#define DMCTR1_BASE     0x57
#define DMCTR2_BASE     0x57
#define DMCTR3_BASE     0x57
#define DMCTR4_BASE     0x57
#define DMCTR5_BASE     0x57

#define DMSFC0_BASE     0x57
#define DMSFC1_BASE     0x57
#define DMSFC2_BASE     0x57
#define DMSFC3_BASE     0x57
#define DMSFC4_BASE     0x57
#define DMSFC5_BASE     0x57

#define DMMCR0_BASE     0x57
#define DMMCR1_BASE     0x57
#define DMMCR2_BASE     0x57
#define DMMCR3_BASE     0x57
#define DMMCR4_BASE     0x57
#define DMMCR5_BASE     0x57

#define DMSRCP_BASE     0x57
#define DMDSTP_BASE     0x57

#define DMIDX0_BASE     0x57
#define DMIDX1_BASE     0x57

#define DMFRI0_BASE     0x57
#define DMFRI1_BASE     0x57

#define DMSGA_BASE      0x57
#define DMGDA_BASE      0x57
#define DMGCR_BASE      0x57
#define DMGFR_BASE      0x57

#define DMSRC0_ADDR     (*(volatile unsigned int *)     DMSRC0_BASE)
#define DMSRC1_ADDR     (*(volatile unsigned int *)     DMSRC1_BASE)
#define DMSRC2_ADDR     (*(volatile unsigned int *)     DMSRC2_BASE)
#define DMSRC3_ADDR     (*(volatile unsigned int *)     DMSRC3_BASE)
#define DMSRC4_ADDR     (*(volatile unsigned int *)     DMSRC4_BASE)
#define DMSRC5_ADDR     (*(volatile unsigned int *)     DMSRC5_BASE)
                                                           
#define DMDST0_ADDR     (*(volatile unsigned int *)     DMDST0_BASE)
#define DMDST1_ADDR     (*(volatile unsigned int *)     DMDST1_BASE)
#define DMDST2_ADDR     (*(volatile unsigned int *)     DMDST2_BASE)
#define DMDST3_ADDR     (*(volatile unsigned int *)     DMDST3_BASE)
#define DMDST4_ADDR     (*(volatile unsigned int *)     DMDST4_BASE)
#define DMDST5_ADDR     (*(volatile unsigned int *)     DMDST5_BASE)
                                                           
#define DMCTR0_ADDR     (*(volatile unsigned int *)     DMCTR0_BASE)
#define DMCTR1_ADDR     (*(volatile unsigned int *)     DMCTR1_BASE)
#define DMCTR2_ADDR     (*(volatile unsigned int *)     DMCTR2_BASE)
#define DMCTR3_ADDR     (*(volatile unsigned int *)     DMCTR3_BASE)
#define DMCTR4_ADDR     (*(volatile unsigned int *)     DMCTR4_BASE)
#define DMCTR5_ADDR     (*(volatile unsigned int *)     DMCTR5_BASE)

#define DMSFC0_ADDR     ((volatile DMSFCn_REG *)        ((char *) DMSFC0_BASE))
#define DMSFC1_ADDR     ((volatile DMSFCn_REG *)        ((char *) DMSFC1_BASE))
#define DMSFC2_ADDR     ((volatile DMSFCn_REG *)        ((char *) DMSFC2_BASE))
#define DMSFC3_ADDR     ((volatile DMSFCn_REG *)        ((char *) DMSFC3_BASE))
#define DMSFC4_ADDR     ((volatile DMSFCn_REG *)        ((char *) DMSFC4_BASE))
#define DMSFC5_ADDR     ((volatile DMSFCn_REG *)        ((char *) DMSFC5_BASE))

#define DMMCR0_ADDR     ((volatile DMMCRn_REG *)        ((char *) DMMCR0_BASE))
#define DMMCR1_ADDR     ((volatile DMMCRn_REG *)        ((char *) DMMCR1_BASE))
#define DMMCR2_ADDR     ((volatile DMMCRn_REG *)        ((char *) DMMCR2_BASE))
#define DMMCR3_ADDR     ((volatile DMMCRn_REG *)        ((char *) DMMCR3_BASE))
#define DMMCR4_ADDR     ((volatile DMMCRn_REG *)        ((char *) DMMCR4_BASE))
#define DMMCR5_ADDR     ((volatile DMMCRn_REG *)        ((char *) DMMCR5_BASE))

#define DMSRCP_ADDR     ((volatile DMSRCP_REG *)        ((char *) DMSRCP_BASE))
#define DMDSTP_ADDR     ((volatile DMDSTP_REG *)        ((char *) DMDSTP_BASE))

#define DMIDX0_ADDR     (*(volatile unsigned int *)     DMIDX0_BASE)
#define DMIDX1_ADDR     (*(volatile unsigned int *)     DMIDX1_BASE)
                                                           
#define DMFRI0_ADDR     (*(volatile unsigned int *)     DMFRI0_BASE)
#define DMFRI1_ADDR     (*(volatile unsigned int *)     DMFRI1_BASE)

#define DMSGA_ADDR      (*(volatile unsigned int *)     DMSGA_BASE)
#define DMGDA_ADDR      (*(volatile unsigned int *)     DMGDA_BASE)
#define DMGCR_ADDR      (*(volatile unsigned int *)     DMGCR_BASE)
#define DMGFR_ADDR      (*(volatile unsigned int *)     DMGFR_BASE)



/*-------------------------------------------------------------------*/
/* DMPREC */
/*-------------------------------------------------------------------*/
typedef union {
        struct {
                unsigned int free:1;
                unsigned int rsvd:1;
                unsigned int dprc:6;
                unsigned int intosel:2;
                unsigned int de:6;
                } bitval;
        unsigned int value;
} DMPREC_REG;

/*-------------------------------------------------------------------*/
/* DMFCn */
/*-------------------------------------------------------------------*/
typedef union {
        struct {
                unsigned int dsyn:4;
                unsigned int dblw:1;
                unsigned int rsrvd:3;
                unsigned int framecount:8;
                } bitval;
        unsigned int value;
} DMSFCn_REG;

/*-------------------------------------------------------------------*/
/* DMMCRn */
/*-------------------------------------------------------------------*/
typedef union {
        struct {
                unsigned int autoinit:1;
                unsigned int dinm:1;
                unsigned int imod:1;
                unsigned int ctmod:1;
                unsigned int rsrvd1:1;
                unsigned int sind:2;
                unsigned int dms:2;
                unsigned int rsrvd2:1;
                unsigned int dind:3;
                unsigned int dmd:2;
                } bitval;
        unsigned int value;
} DMMCRn_REG;


/*-------------------------------------------------------------------*/
/* DMSRCP */
/*-------------------------------------------------------------------*/
typedef union {
        struct {
                unsigned int rsvd       :9;
                unsigned int source     :7;
                } bitval;
        unsigned int value;
} DMSRCP_REG;

/*-------------------------------------------------------------------*/
/* DMDSTP */
/*-------------------------------------------------------------------*/
typedef union {
        struct {
                unsigned int rsvd       :9;
                unsigned int dest       :7;
                } bitval;
        unsigned int value;
} DMDSTP_REG;

⌨️ 快捷键说明

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