/* Deinitializes the TIMx peripheral registers to their default reset values.  */
void TIM_DeInit(TIM_TypeDef *TIMx)
/* Deinitializes the TIMx peripheral registers to their default reset values.  */
void TIM_DeInit(TIM_TypeDef *TIMx)
{
  assert_param(IS_TIM_ALL_PERIPH(TIMx));
  if (TIMx == TIM1)
  {
    RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, ENABLE);
    RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, DISABLE);
  }
  else if (TIMx == TIM3)
  {
    RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, ENABLE);
    RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, DISABLE);
  }
  else if (TIMx == TIM6)
  {
    RCC_APB2PeriphResetCmd(RCC_APB1Periph_TIM6, ENABLE);
    RCC_APB2PeriphResetCmd(RCC_APB1Periph_TIM6, DISABLE);
  }
  else
  {
    if (TIMx == TIM7)
    {
      RCC_APB2PeriphResetCmd(RCC_APB1Periph_TIM7, ENABLE);
      RCC_APB2PeriphResetCmd(RCC_APB1Periph_TIM7, DISABLE);
    }
  }
}