在线时间37 小时
UID2024419
注册时间2015-3-2
NXP金币0 
 
 
 
该用户从未签到 
中级会员 
   
 
	- 积分
 - 484
 
 
- 最后登录
 - 2016-3-28
  
 
 | 
 
 
发表于 2015-11-13 11:55:09
|
显示全部楼层
 
 
 
相关结构定义: 
- /** PIT - Register Layout Typedef */
 
 - typedef struct {
 
 -   __IO uint32_t MCR;                               /**< PIT Module Control Register, offset: 0x0 */
 
 -        uint8_t RESERVED_0[220];
 
 -   __I  uint32_t LTMR64H;                           /**< PIT Upper Lifetime Timer Register, offset: 0xE0 */
 
 -   __I  uint32_t LTMR64L;                           /**< PIT Lower Lifetime Timer Register, offset: 0xE4 */
 
 -        uint8_t RESERVED_1[24];
 
 -   struct {                                         /* offset: 0x100, array step: 0x10 */
 
 -     __IO uint32_t LDVAL;                             /**< Timer Load Value Register, array offset: 0x100, array step: 0x10 */
 
 -     __I  uint32_t CVAL;                              /**< Current Timer Value Register, array offset: 0x104, array step: 0x10 */
 
 -     __IO uint32_t TCTRL;                             /**< Timer Control Register, array offset: 0x108, array step: 0x10 */
 
 -     __IO uint32_t TFLG;                              /**< Timer Flag Register, array offset: 0x10C, array step: 0x10 */
 
 -   } CHANNEL[2];
 
 - } PIT_Type, *PIT_MemMapPtr;
 
  
 
- #define PIT_TFLG_REG(base,index)                 ((base)->CHANNEL[index].TFLG)
 
  
- /*!
 
 -  * @brief Reads the current timer timeout flag.
 
 -  *
 
 -  * Every time the timer counts to 0, this flag is set.
 
 -  *
 
 -  * @param base Base address for current PIT instance.
 
 -  * @param channel Timer channel number
 
 -  * @return Current status of the timeout flag
 
 -  *         - true:  Timeout has occurred.
 
 -  *         - false: Timeout has not yet occurred.
 
 -  */
 
 - static inline bool PIT_HAL_IsIntPending(PIT_Type * base, uint32_t channel)
 
 - {
 
 -     assert(channel < FSL_FEATURE_PIT_TIMER_COUNT);
 
 -     return PIT_RD_TFLG(base, channel);
 
 - }
 
 
  复制代码 |   
 
 
 
 |