/* Enable or disable the interrupt of the specified TMR2 channel.  */
void TMR2_IntCmd(CM_TMR2_TypeDef *TMR2x, uint32_t u32IntType, en_functional_state_t enNewState)
/* Enable or disable the interrupt of the specified TMR2 channel.  */
void TMR2_IntCmd(CM_TMR2_TypeDef *TMR2x, uint32_t u32IntType, en_functional_state_t enNewState)
{
    DDL_ASSERT(IS_TMR2_UNIT(TMR2x));
    DDL_ASSERT(IS_TMR2_INT(u32IntType));
    DDL_ASSERT(IS_FUNCTIONAL_STATE(enNewState));
    if (enNewState == ENABLE) {
        SET_REG32_BIT(TMR2x->ICONR, u32IntType);
    } else {
        CLR_REG32_BIT(TMR2x->ICONR, u32IntType);
    }
}