/* Enable or disable the TMR4 PWM main output function.  */
void TMR4_PWM_MainOutputCmd(CM_TMR4_TypeDef *TMR4x, en_functional_state_t enNewState)
/* Enable or disable the TMR4 PWM main output function.  */
void TMR4_PWM_MainOutputCmd(CM_TMR4_TypeDef *TMR4x, en_functional_state_t enNewState)
{
    DDL_ASSERT(IS_TMR4_UNIT(TMR4x));
    DDL_ASSERT(IS_FUNCTIONAL_STATE(enNewState));
    if (ENABLE == enNewState) {
        SET_REG32_BIT(TMR4x->PSCR, TMR4_PSCR_MOE);
    } else {
        CLR_REG32_BIT(TMR4x->PSCR, TMR4_PSCR_MOE);
    }
}