vscode_embedded/vscode_stm32f1_test/hal/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c
/**
  * @brief  Forces the TIMx output 1 waveform to active or inactive level.
  * @param  TIMx: where x can be  1 to 17 except 6 and 7 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 OC1REF
  *     @arg TIM_ForcedAction_InActive: Force inactive level on OC1REF.
  * @retval None
  */
@brief  Forces the TIMx output 1 waveform to active or inactive level.
@param  TIMx: where x can be  1 to 17 except 6 and 7 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 OC1REF
@arg TIM_ForcedAction_InActive: Force inactive level on OC1REF.
@retval None
@brief Forces the TIMx output 1 waveform to active or inactive level . @param TIMx : where x can be 1 to 17 except 6 and 7 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 OC1REF @arg TIM_ForcedAction_InActive : Force inactive level on OC1REF . @retval None
void TIM_ForcedOC1Config(TIM_TypeDef* TIMx, uint16_t TIM_ForcedAction)
{
  uint16_t tmpccmr1 = 0;
  assert_param(IS_TIM_LIST8_PERIPH(TIMx));
  assert_param(IS_TIM_FORCED_ACTION(TIM_ForcedAction));
  tmpccmr1 = TIMx->CCMR1;
  tmpccmr1 &= (uint16_t)~((uint16_t)TIM_CCMR1_OC1M);
  tmpccmr1 |= TIM_ForcedAction;
  TIMx->CCMR1 = tmpccmr1;
}
void TIM_ForcedOC1Config ( TIM_TypeDef * TIMx , uint16_t TIM_ForcedAction ) { uint16_t tmpccmr1 = 0 ; assert_param ( IS_TIM_LIST8_PERIPH ( TIMx ) ) ; assert_param ( IS_TIM_FORCED_ACTION ( TIM_ForcedAction ) ) ; tmpccmr1 = TIMx -> CCMR1 ; tmpccmr1 &= ( uint16_t ) ~ ( ( uint16_t ) TIM_CCMR1_OC1M ) ; tmpccmr1 |= TIM_ForcedAction ; TIMx -> CCMR1 = tmpccmr1 ; }
@brief  Forces the TIMx output 1 waveform to active or inactive level.
@brief Forces the TIMx output 1 waveform to active or inactive level .
/* Check the parameters */ /* Reset the OC1M Bits */ /* Configure The Forced output Mode */ /* Write to TIMx CCMR1 register */