/* Clears or safeguards the OCREF4 signal on an external event.  */
void TIM_ClearOC4Ref(TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
/* Clears or safeguards the OCREF4 signal on an external event.  */
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)~TIM_CCMR2_OC4CE;
  tmpccmr2 |= (uint16_t)(TIM_OCClear << 8);
  TIMx->CCMR2 = tmpccmr2;
}