libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/stm32f10x_tim.c
/**
  * @brief  Configures the TIMx Update Request Interrupt source.
  * @param  TIMx: where x can be 1 to 17 to select the TIM peripheral.
  * @param  TIM_UpdateSource: specifies the Update source.
  *   This parameter can be one of the following values:
  *     @arg TIM_UpdateSource_Regular: Source of update is the counter overflow/underflow
                                       or the setting of UG bit, or an update generation
                                       through the slave mode controller.
  *     @arg TIM_UpdateSource_Global: Source of update is counter overflow/underflow.
  * @retval None
  */
@brief  Configures the TIMx Update Request Interrupt source.
@param  TIMx: where x can be 1 to 17 to select the TIM peripheral.
@param  TIM_UpdateSource: specifies the Update source.
This parameter can be one of the following values:
@arg TIM_UpdateSource_Regular: Source of update is the counter overflow/underflow
or the setting of UG bit, or an update generation
through the slave mode controller.
@arg TIM_UpdateSource_Global: Source of update is counter overflow/underflow.
@retval None
@brief Configures the TIMx Update Request Interrupt source . @param TIMx : where x can be 1 to 17 to select the TIM peripheral . @param TIM_UpdateSource : specifies the Update source . This parameter can be one of the following values : @arg TIM_UpdateSource_Regular : Source of update is the counter overflow / underflow or the setting of UG bit or an update generation through the slave mode controller . @arg TIM_UpdateSource_Global : Source of update is counter overflow / underflow . @retval None
void TIM_UpdateRequestConfig(TIM_TypeDef* TIMx, uint16_t TIM_UpdateSource)
{
  assert_param(IS_TIM_ALL_PERIPH(TIMx));
  assert_param(IS_TIM_UPDATE_SOURCE(TIM_UpdateSource));
  if (TIM_UpdateSource != TIM_UpdateSource_Global)
  {
    TIMx->CR1 |= TIM_CR1_URS;
  }
  else
  {
    TIMx->CR1 &= (uint16_t)~((uint16_t)TIM_CR1_URS);
  }
}
void TIM_UpdateRequestConfig ( TIM_TypeDef * TIMx , uint16_t TIM_UpdateSource ) { assert_param ( IS_TIM_ALL_PERIPH ( TIMx ) ) ; assert_param ( IS_TIM_UPDATE_SOURCE ( TIM_UpdateSource ) ) ; if ( TIM_UpdateSource != TIM_UpdateSource_Global ) { TIMx -> CR1 |= TIM_CR1_URS ; } else { TIMx -> CR1 &= ( uint16_t ) ~ ( ( uint16_t ) TIM_CR1_URS ) ; } }
@brief  Configures the TIMx Update Request Interrupt source.
@brief Configures the TIMx Update Request Interrupt source .
/* Check the parameters */ /* Set the URS Bit */ /* Reset the URS Bit */