libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/stm32f10x_tim.c
/**
  * @brief  Selects the TIMx Slave Mode.
  * @param  TIMx: where x can be 1, 2, 3, 4, 5, 8, 9, 12 or 15 to select the TIM peripheral.
  * @param  TIM_SlaveMode: specifies the Timer Slave Mode.
  *   This parameter can be one of the following values:
  *     @arg TIM_SlaveMode_Reset: Rising edge of the selected trigger signal (TRGI) re-initializes
  *                               the counter and triggers an update of the registers.
  *     @arg TIM_SlaveMode_Gated:     The counter clock is enabled when the trigger signal (TRGI) is high.
  *     @arg TIM_SlaveMode_Trigger:   The counter starts at a rising edge of the trigger TRGI.
  *     @arg TIM_SlaveMode_External1: Rising edges of the selected trigger (TRGI) clock the counter.
  * @retval None
  */
@brief  Selects the TIMx Slave Mode.
@param  TIMx: where x can be 1, 2, 3, 4, 5, 8, 9, 12 or 15 to select the TIM peripheral.
@param  TIM_SlaveMode: specifies the Timer Slave Mode.
This parameter can be one of the following values:
@arg TIM_SlaveMode_Reset: Rising edge of the selected trigger signal (TRGI) re-initializes
the counter and triggers an update of the registers.
@arg TIM_SlaveMode_Gated:     The counter clock is enabled when the trigger signal (TRGI) is high.
@arg TIM_SlaveMode_Trigger:   The counter starts at a rising edge of the trigger TRGI.
@arg TIM_SlaveMode_External1: Rising edges of the selected trigger (TRGI) clock the counter.
@retval None
@brief Selects the TIMx Slave Mode . @param TIMx : where x can be 1 2 3 4 5 8 9 12 or 15 to select the TIM peripheral . @param TIM_SlaveMode : specifies the Timer Slave Mode . This parameter can be one of the following values : @arg TIM_SlaveMode_Reset : Rising edge of the selected trigger signal ( TRGI ) re - initializes the counter and triggers an update of the registers . @arg TIM_SlaveMode_Gated : The counter clock is enabled when the trigger signal ( TRGI ) is high . @arg TIM_SlaveMode_Trigger : The counter starts at a rising edge of the trigger TRGI . @arg TIM_SlaveMode_External1 : Rising edges of the selected trigger ( TRGI ) clock the counter . @retval None
void TIM_SelectSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_SlaveMode)
{
  assert_param(IS_TIM_LIST6_PERIPH(TIMx));
  assert_param(IS_TIM_SLAVE_MODE(TIM_SlaveMode));
  TIMx->SMCR &= (uint16_t)~((uint16_t)TIM_SMCR_SMS);
  TIMx->SMCR |= TIM_SlaveMode;
}
void TIM_SelectSlaveMode ( TIM_TypeDef * TIMx , uint16_t TIM_SlaveMode ) { assert_param ( IS_TIM_LIST6_PERIPH ( TIMx ) ) ; assert_param ( IS_TIM_SLAVE_MODE ( TIM_SlaveMode ) ) ; TIMx -> SMCR &= ( uint16_t ) ~ ( ( uint16_t ) TIM_SMCR_SMS ) ; TIMx -> SMCR |= TIM_SlaveMode ; }
@brief  Selects the TIMx Slave Mode.
@brief Selects the TIMx Slave Mode .
/* Check the parameters */ /* Reset the SMS Bits */ /* Select the Slave Mode */