/* Enables or disables TIMx peripheral Preload register on AR.  */
void TIM_ConfigArPreload(TIM_Module *TIMx, FunctionalState Cmd)
/* Enables or disables TIMx peripheral Preload register on AR.  */
void TIM_ConfigArPreload(TIM_Module *TIMx, FunctionalState Cmd)
{
    assert_param(IsTimAllModule(TIMx));
    assert_param(IS_FUNCTIONAL_STATE(Cmd));
    if (Cmd != DISABLE)
    {
        TIMx->CTRL1 |= TIM_CTRL1_ARPEN;
    }
    else
    {
        TIMx->CTRL1 &= (uint32_t) ~((uint32_t)TIM_CTRL1_ARPEN);
    }
}