注册 登录
编程论坛 单片机编程

TMS320F28035头文件疑惑

ffxlg 发布于 2011-04-02 13:19, 1182 次点击
问一下在TMS38025头文件中
struct ADCCTL1_BITS {      // bits  description
    Uint16  TEMPCONV:1;    // 0     Temperature sensor connection
    Uint16  VREFLOCONV:1;  // 1     VSSA connection
    Uint16  INTPULSEPOS:1; // 2     INT pulse generation control
    Uint16  ADCREFSEL:1;   // 3     Internal/external reference select
    Uint16  rsvd1:1;       // 4     reserved
    Uint16  ADCREFPWD:1;   // 5     Reference buffers powerdown
    Uint16  ADCBGPWD:1;    // 6     ADC bandgap powerdown
    Uint16  ADCPWDN:1;     // 7     ADC powerdown
    Uint16  ADCBSYCHN:5;   // 12:8  ADC busy on a channel
    Uint16  ADCBSY:1;      // 13    ADC busy signal
    Uint16  ADCENABLE:1;   // 14    ADC enable
    Uint16  RESET:1;       // 15    ADC master reset
};

union ADCCTL1_REG {
   Uint16                all;
   struct ADCCTL1_BITS   bit;
};


struct ADC_REGS {
        union  ADCCTL1_REG           ADCCTL1;         // ADC Control 1
        Uint16                       rsvd1[3];        // reserved
                        }

volatile struct ADC_REGS AdcRegs;

在实际使用中
AdcRegs.ADCTRL1.bit.SEQ_CASC = 0;

我想知道这个语句被编译后如何和DSP内部寄存器相对应的?编译器通过什么和DSP内部寄存器对应的?如果我想改变寄存器ADCCTL1中的变量,用ADCCTL1&=0X55;  这个为什么不能直接使用呢?
0 回复
1