/* Sets or Resets the TIM peripheral Capture Compare Preload Control bit.  */
void TIM_CCPreloadControl(TIM_TypeDef *TIMx, FunctionalState NewState)
/* Sets or Resets the TIM peripheral Capture Compare Preload Control bit.  */
void TIM_CCPreloadControl(TIM_TypeDef *TIMx, FunctionalState NewState)
{
    assert_param(IS_TIM_18_PERIPH(TIMx));
    assert_param(IS_FUNCTIONAL_STATE(NewState));
    if (NewState != DISABLE)
    {
        TIMx->CR2 |= CR2_CCPC_Set;
    }
    else
    {
        TIMx->CR2 &= CR2_CCPC_Reset;
    }
}