/* Clears or safeguards the OCREF2 signal on an external event.  */
void TIM_ClearOC2Ref(TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
/* Clears or safeguards the OCREF2 signal on an external event.  */
void TIM_ClearOC2Ref(TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
{
  uint16_t tmpccmr1 = 0;
  assert_param(IS_TIM_LIST2_PERIPH(TIMx));
  assert_param(IS_TIM_OCCLEAR_STATE(TIM_OCClear));
  tmpccmr1 = TIMx->CCMR1;
  tmpccmr1 &= (uint16_t)~TIM_CCMR1_OC2CE;
  tmpccmr1 |= (uint16_t)(TIM_OCClear << 8);
  TIMx->CCMR1 = tmpccmr1;
}