/* HRPWM function enable or disable for specified channel.  */
void HRPWM_ChCmd(uint32_t u32Ch, en_functional_state_t enNewState)
/* HRPWM function enable or disable for specified channel.  */
void HRPWM_ChCmd(uint32_t u32Ch, en_functional_state_t enNewState)
{
    __IO uint32_t *CRx;
    DDL_ASSERT(IS_VALID_HRPWM_CH(u32Ch));
    DDL_ASSERT(IS_FUNCTIONAL_STATE(enNewState));
    CRx = (__IO uint32_t *)(((uint32_t)&CM_HRPWM->CR1) + 4UL * (u32Ch - 1UL));
    if (ENABLE == enNewState) {
        SET_REG32_BIT(*CRx, HRPWM_CR_EN);
    } else {
        CLR_REG32_BIT(*CRx, HRPWM_CR_EN);
    }
}