src/system_mt7687.c
static uint32_t SysTick_Set(uint32_t ticks)
{
    uint32_t val;

    if ((ticks - 1) > SysTick_LOAD_RELOAD_Msk) {
        return (1);    /* Reload value impossible */
    }

    val = SysTick->CTRL;                                   /* backup CTRL register */

    SysTick->CTRL &= ~(SysTick_CTRL_TICKINT_Msk |          /* disable sys_tick */
                       SysTick_CTRL_ENABLE_Msk);

    SysTick->LOAD  = ticks - 1;                            /* set reload register */
    SysTick->VAL   = 0;                                    /* Load the SysTick Counter Value */

    SysTick->CTRL = val;                                   /* restore CTRL register */

    return (0);                                            /* Function successful */
}
/**
  * @brief  systick reload value reloaded via this function.
  *         This function can be called in init stage and system runtime.
  * @param  ticks value to be set
  * @retval 0 means successful
  */
@brief  systick reload value reloaded via this function.
This function can be called in init stage and system runtime.
@param  ticks value to be set
@retval 0 means successful
@brief systick reload value reloaded via this function . This function can be called in init stage and system runtime . @param ticks value to be set @retval 0 means successful
static uint32_t SysTick_Set(uint32_t ticks)
{
    uint32_t val;
    if ((ticks - 1) > SysTick_LOAD_RELOAD_Msk) {
        return (1);    
    }
    val = SysTick->CTRL;                                   
    SysTick->CTRL &= ~(SysTick_CTRL_TICKINT_Msk |          
                       SysTick_CTRL_ENABLE_Msk);
    SysTick->LOAD  = ticks - 1;                            
    SysTick->VAL   = 0;                                    
    SysTick->CTRL = val;                                   
    return (0);                                            
}
static uint32_t SysTick_Set ( uint32_t ticks ) { uint32_t val ; if ( ( ticks - 1 ) > SysTick_LOAD_RELOAD_Msk ) { return ( 1 ) ; } val = SysTick -> CTRL ; SysTick -> CTRL &= ~ ( SysTick_CTRL_TICKINT_Msk | SysTick_CTRL_ENABLE_Msk ) ; SysTick -> LOAD = ticks - 1 ; SysTick -> VAL = 0 ; SysTick -> CTRL = val ; return ( 0 ) ; }
@brief  systick reload value reloaded via this function.
@brief systick reload value reloaded via this function .
/* Reload value impossible */ /* backup CTRL register */ /* disable sys_tick */ /* set reload register */ /* Load the SysTick Counter Value */ /* restore CTRL register */ /* Function successful */