/* Set counter value for the specified TMR2 channel.  */
void TMR2_SetCountValue(CM_TMR2_TypeDef *TMR2x, uint32_t u32Ch, uint32_t u32Value)
/* Set counter value for the specified TMR2 channel.  */
void TMR2_SetCountValue(CM_TMR2_TypeDef *TMR2x, uint32_t u32Ch, uint32_t u32Value)
{
    __IO uint32_t *reg32CNTR;
    DDL_ASSERT(IS_TMR2_UNIT(TMR2x));
    DDL_ASSERT(IS_TMR2_CH(u32Ch));
    DDL_ASSERT(IS_TMR2_VALID_VAL(u32Value));
    reg32CNTR = (__IO uint32_t *)((uint32_t)&TMR2x->CNTAR);
    WRITE_REG32(reg32CNTR[u32Ch], u32Value);
}