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.

2812外部中断支持双边沿触发吗?



查看TI给的库函数里,外部中断控制寄存器的头文件里,定义如下所示:

struct XINTCR_BITS {

   Uint16   ENABLE:1;    // 0      enable/disable

   Uint16   rsvd1:1;     // 1      reserved

   Uint16   POLARITY:1;  // 2      pos/neg triggered

   Uint16   rsvd2:12;    // 15:3   reserved

};

union XINTCR_REG {

  Uint16               all;

  struct XINTCR_BITS   bit;

};  

struct XNMICR_BITS {

   Uint16   ENABLE:1;    // 0      enable/disable

   Uint16   SELECT:1;    // 1      Timer 1 or XNMI connected to INT13

   Uint16   POLARITY:1;  // 2      pos/neg triggered

   Uint16   rsvd2:12;    // 15:3   reserved

};

   Uint16   POLARITY:1;  // 2      pos/neg triggered代表触发方式,但是仅仅一位表示,但是所有寄存器位数加起来才15位,少了1位,还有1位到哪里去了;是不是应该POLARITY:2占用两位,支持双边沿触发?