vscode_embedded/vscode_stm32f1_test/hal/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c
/**
  * @brief  Enables or disables the TIMx's DMA Requests.
  * @param  TIMx: where x can be  1, 2, 3, 4, 5, 6, 7, 8, 15, 16 or 17 
  *   to select the TIM peripheral. 
  * @param  TIM_DMASource: specifies the DMA Request sources.
  *   This parameter can be any combination of the following values:
  *     @arg TIM_DMA_Update: TIM update Interrupt source
  *     @arg TIM_DMA_CC1: TIM Capture Compare 1 DMA source
  *     @arg TIM_DMA_CC2: TIM Capture Compare 2 DMA source
  *     @arg TIM_DMA_CC3: TIM Capture Compare 3 DMA source
  *     @arg TIM_DMA_CC4: TIM Capture Compare 4 DMA source
  *     @arg TIM_DMA_COM: TIM Commutation DMA source
  *     @arg TIM_DMA_Trigger: TIM Trigger DMA source
  * @param  NewState: new state of the DMA Request sources.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
@brief  Enables or disables the TIMx's DMA Requests.
@brief Enables or disables the TIMx ' s DMA Requests .
void TIM_DMACmd(TIM_TypeDef* TIMx, uint16_t TIM_DMASource, FunctionalState NewState)
{ 
  assert_param(IS_TIM_LIST9_PERIPH(TIMx));
  assert_param(IS_TIM_DMA_SOURCE(TIM_DMASource));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  if (NewState != DISABLE)
  {
    TIMx->DIER |= TIM_DMASource; 
  }
  else
  {
    TIMx->DIER &= (uint16_t)~TIM_DMASource;
  }
}
void TIM_DMACmd ( TIM_TypeDef * TIMx , uint16_t TIM_DMASource , FunctionalState NewState ) { assert_param ( IS_TIM_LIST9_PERIPH ( TIMx ) ) ; assert_param ( IS_TIM_DMA_SOURCE ( TIM_DMASource ) ) ; assert_param ( IS_FUNCTIONAL_STATE ( NewState ) ) ; if ( NewState != DISABLE ) { TIMx -> DIER |= TIM_DMASource ; } else { TIMx -> DIER &= ( uint16_t ) ~ TIM_DMASource ; } }
@brief  Enables or disables the TIMx's DMA Requests.
@brief Enables or disables the TIMx ' s DMA Requests .
/* Check the parameters */ /* Enable the DMA sources */ /* Disable the DMA sources */