/* Get counter value of the specified TMR2 channel.  */
uint32_t TMR2_GetCountValue(const CM_TMR2_TypeDef *TMR2x, uint32_t u32Ch)
/* Get counter value of the specified TMR2 channel.  */
uint32_t TMR2_GetCountValue(const CM_TMR2_TypeDef *TMR2x, uint32_t u32Ch)
{
    __IO uint32_t *reg32CNTR;
    DDL_ASSERT(IS_TMR2_UNIT(TMR2x));
    DDL_ASSERT(IS_TMR2_CH(u32Ch));
    reg32CNTR = (__IO uint32_t *)((uint32_t)&TMR2x->CNTAR);
    return reg32CNTR[u32Ch];
}