|
在飞思卡尔mke02系列中,pit.h中没有FTMX_CVAL定义,不知道如何添加?求指点,本人是菜鸟,第一次想用c语言写程序,更别说c++了,所以,官方提供的程序也不太看得懂。不知道下面的添加是否有效
typedef struct
{
uint8_t bFreeze : 1; /*!< 1: stop in debug mode, 0: run in debug mode */
uint8_t bModuleDis : 1; /*!< 1: PIT module is disable, 0: PIT module is enable */
uint8_t bReserved0 : 1; /*!< reserved bit */
uint8_t bReserved1 : 5; /*!< reserved bit */
uint8_t bTimerEn : 1; /*!< 1: channel timer is enable, 0: channel timer is disable */
uint8_t bInterruptEn : 1; /*!< 1: channel timer interrupt is enable, 0: channel timer interrupt is disable */
uint8_t bChainMode : 1; /*!< 1: chain mode is enable, 0: chain mode is disable */
uint8_t bReserved2 : 5; /*!< reserved bit */
uint8_t bFlag : 1; /*!< 1: flag is set,and write 1 to clear flag, 0: no flag is set */
uint8_t bReserved3 : 7; /*!< reserved bit */
uint32_t u32LoadValue ; /*!< 32-bit channel load value */
uint32_t u32CVAL;// 这是我添加的,可在主函数中读出来的值始终为0,
} PIT_ConfigType, *PIT_ConfigPtr; |
|