FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/ST_Code/Libraries/STM32L1xx_StdPeriph_Driver/src/stm32l1xx_tim.c
/**
  * @brief  Forces the TIMx output 4 waveform to active or inactive level.
  * @param  TIMx: where x can be 2, 3, 4 or 5 to select the TIM peripheral.
  * @param  TIM_ForcedAction: specifies the forced Action to be set to the output waveform.
  *   This parameter can be one of the following values:
  *     @arg TIM_ForcedAction_Active: Force active level on OC4REF.
  *     @arg TIM_ForcedAction_InActive: Force inactive level on OC4REF.
  * @retval None
  */
@brief  Forces the TIMx output 4 waveform to active or inactive level.
@param  TIMx: where x can be 2, 3, 4 or 5 to select the TIM peripheral.
@param  TIM_ForcedAction: specifies the forced Action to be set to the output waveform.
This parameter can be one of the following values:
@arg TIM_ForcedAction_Active: Force active level on OC4REF.
@arg TIM_ForcedAction_InActive: Force inactive level on OC4REF.
@retval None
@brief Forces the TIMx output 4 waveform to active or inactive level . @param TIMx : where x can be 2 3 4 or 5 to select the TIM peripheral . @param TIM_ForcedAction : specifies the forced Action to be set to the output waveform . This parameter can be one of the following values : @arg TIM_ForcedAction_Active : Force active level on OC4REF . @arg TIM_ForcedAction_InActive : Force inactive level on OC4REF . @retval None
void TIM_ForcedOC4Config(TIM_TypeDef* TIMx, uint16_t TIM_ForcedAction)
{
  uint16_t tmpccmr2 = 0;
  assert_param(IS_TIM_LIST3_PERIPH(TIMx));
  assert_param(IS_TIM_FORCED_ACTION(TIM_ForcedAction));
  tmpccmr2 = TIMx->CCMR2;
  tmpccmr2 &= (uint16_t)~((uint16_t)TIM_CCMR2_OC4M);
  tmpccmr2 |= (uint16_t)(TIM_ForcedAction << 8);
  TIMx->CCMR2 = tmpccmr2;
}
void TIM_ForcedOC4Config ( TIM_TypeDef * TIMx , uint16_t TIM_ForcedAction ) { uint16_t tmpccmr2 = 0 ; assert_param ( IS_TIM_LIST3_PERIPH ( TIMx ) ) ; assert_param ( IS_TIM_FORCED_ACTION ( TIM_ForcedAction ) ) ; tmpccmr2 = TIMx -> CCMR2 ; tmpccmr2 &= ( uint16_t ) ~ ( ( uint16_t ) TIM_CCMR2_OC4M ) ; tmpccmr2 |= ( uint16_t ) ( TIM_ForcedAction << 8 ) ; TIMx -> CCMR2 = tmpccmr2 ; }
@brief  Forces the TIMx output 4 waveform to active or inactive level.
@brief Forces the TIMx output 4 waveform to active or inactive level .
/* Check the parameters */ /* Reset the OC2M Bits */ /* Configure The Forced output Mode */ /* Write to TIMx CCMR2 register */