/* This function provides accurate delay (in microseconds) based on variable incremented.  */
__weak void ald_delay_1us(__IO uint32_t delay)
/* This function provides accurate delay (in microseconds) based on variable incremented.  */
__weak void ald_delay_1us(__IO uint32_t delay)
{
    uint32_t start, now, delta, us_tick;
    start = CORET->MTIME;
    us_tick = ald_cmu_get_sys_clock() / 1000000UL;
    do
    {
        now = CORET->MTIME;
        delta = now - start;
    }
    while (delta <  (us_tick * delay));
}