/* Selects the tim peripheral Capture Compare DMA source.  */
void TIM_SelectCCDMA(TIM_TypeDef *tim, FunctionalState state)
/* Selects the tim peripheral Capture Compare DMA source.  */
void TIM_SelectCCDMA(TIM_TypeDef *tim, FunctionalState state)
{
    (state) ? SET_BIT(tim->CR2, TIM_CR2_CCDS) : CLEAR_BIT(tim->CR2, TIM_CR2_CCDS);
}