/* Enables or disables tim peripheral Preload register on ARR.  */
void TIM_ARRPreloadConfig(TIM_TypeDef *tim, FunctionalState state)
/* Enables or disables tim peripheral Preload register on ARR.  */
void TIM_ARRPreloadConfig(TIM_TypeDef *tim, FunctionalState state)
{
    (state) ? SET_BIT(tim->CR1, TIM_CR1_ARPEN) : CLEAR_BIT(tim->CR1, TIM_CR1_ARPEN);
}