/* Change Logs: Date Author Notes  charlown first version  */
void rt_hw_us_delay(rt_uint32_t us)
/* Change Logs: Date Author Notes  charlown first version  */
void rt_hw_us_delay(rt_uint32_t us)
{
    rt_uint32_t start, now, delta, reload, us_tick;
    start = SysTick->VAL;
    reload = SysTick->LOAD;
    us_tick = SystemCoreClock / 1000000UL;
    do
    {
        now = SysTick->VAL;
        delta = start > now ? start - now : reload + start - now;
    } while (delta < us_tick * us);
}