vscode_embedded/vscode_stm32f1_test/hal/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c
/**
  * @brief  Clears or safeguards the OCREF4 signal on an external event
  * @param  TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM peripheral.
  * @param  TIM_OCClear: new state of the Output Compare Clear Enable Bit.
  *   This parameter can be one of the following values:
  *     @arg TIM_OCClear_Enable: TIM Output clear enable
  *     @arg TIM_OCClear_Disable: TIM Output clear disable
  * @retval None
  */
@brief  Clears or safeguards the OCREF4 signal on an external event
@param  TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM peripheral.
@param  TIM_OCClear: new state of the Output Compare Clear Enable Bit.
This parameter can be one of the following values:
@arg TIM_OCClear_Enable: TIM Output clear enable
@arg TIM_OCClear_Disable: TIM Output clear disable
@retval None
@brief Clears or safeguards the OCREF4 signal on an external event @param TIMx : where x can be 1 2 3 4 5 or 8 to select the TIM peripheral . @param TIM_OCClear : new state of the Output Compare Clear Enable Bit . This parameter can be one of the following values : @arg TIM_OCClear_Enable : TIM Output clear enable @arg TIM_OCClear_Disable : TIM Output clear disable @retval None
void TIM_ClearOC4Ref(TIM_TypeDef* TIMx, uint16_t TIM_OCClear)
{
  uint16_t tmpccmr2 = 0;
  assert_param(IS_TIM_LIST3_PERIPH(TIMx));
  assert_param(IS_TIM_OCCLEAR_STATE(TIM_OCClear));
  tmpccmr2 = TIMx->CCMR2;
  tmpccmr2 &= (uint16_t)~((uint16_t)TIM_CCMR2_OC4CE);
  tmpccmr2 |= (uint16_t)(TIM_OCClear << 8);
  TIMx->CCMR2 = tmpccmr2;
}
void TIM_ClearOC4Ref ( TIM_TypeDef * TIMx , uint16_t TIM_OCClear ) { uint16_t tmpccmr2 = 0 ; assert_param ( IS_TIM_LIST3_PERIPH ( TIMx ) ) ; assert_param ( IS_TIM_OCCLEAR_STATE ( TIM_OCClear ) ) ; tmpccmr2 = TIMx -> CCMR2 ; tmpccmr2 &= ( uint16_t ) ~ ( ( uint16_t ) TIM_CCMR2_OC4CE ) ; tmpccmr2 |= ( uint16_t ) ( TIM_OCClear << 8 ) ; TIMx -> CCMR2 = tmpccmr2 ; }
@brief  Clears or safeguards the OCREF4 signal on an external event
 @param  TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM peripheral.
@brief Clears or safeguards the OCREF4 signal on an external event @param TIMx : where x can be 1 2 3 4 5 or 8 to select the TIM peripheral .
/* Check the parameters */ /* Reset the OC4CE Bit */ /* Enable or Disable the Output Compare Clear Bit */ /* Write to TIMx CCMR2 register */