/* Enables or disables the TIM peripheral Main Outputs.  */
void TIM_CtrlPWMOutputs(TIM_TypeDef *tim, FunctionalState state)
/* Enables or disables the TIM peripheral Main Outputs.  */
void TIM_CtrlPWMOutputs(TIM_TypeDef *tim, FunctionalState state)
{
    (state) ? SET_BIT(tim->BDTR, TIM_BDTR_MOEN) : CLEAR_BIT(tim->BDTR, TIM_BDTR_MOEN);
}