This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于CpuTimer2Regs.TIMH.all



       请问为什么我用CCS识别不了CpuTimer2Regs.TIMH.all寄存器,却识别的了CpuTimer2Regs.TIM.all,如果我想读取CpuTimer2Regs.TIMH.all的值应该怎么写呢。

  • TIMH应该是TIM的一部分,寄存器就只分了LSW和MSW,你读取MSW就可以。

    // TIM, TIMH: Timer register definitions:
    struct TIM_REG {
    Uint16 LSW;
    Uint16 MSW;
    };

    union TIM_GROUP {
    Uint32 all;
    struct TIM_REG half;
    };

    寄存器定义时这样的