/* Sets or Resets the TIM peripheral Capture Compare Preload Control bit.  */
void TIM_CCPreloadControl(TIM_TypeDef *tim, FunctionalState state)
/* Sets or Resets the TIM peripheral Capture Compare Preload Control bit.  */
void TIM_CCPreloadControl(TIM_TypeDef *tim, FunctionalState state)
{
    (state) ? SET_BIT(tim->CR2, TIM_CR2_CCPC) : CLEAR_BIT(tim->CR2, TIM_CR2_CCPC);
}