/* Enables or disables TIMx peripheral Preload register on ARR.  */
void TIM_ARRPreloadConfig(TIM_TypeDef *TIMx, FunctionalState NewState)
/* Enables or disables TIMx peripheral Preload register on ARR.  */
void TIM_ARRPreloadConfig(TIM_TypeDef *TIMx, FunctionalState NewState)
{
    assert_param(IS_TIM_ALL_PERIPH(TIMx));
    assert_param(IS_FUNCTIONAL_STATE(NewState));
    if (NewState != DISABLE)
    {
        TIMx->CR1 |= CR1_ARPE_Set;
    }
    else
    {
        TIMx->CR1 &= CR1_ARPE_Reset;
    }
}