bsp/rv32m1_vega_hybrid/risc-v/sdk/multicore_2.3.1/rpmsg_lite/lib/rpmsg_lite/porting/platform/rv32m1/rpmsg_platform.c
/**
 * platform_time_delay
 *
 * @param num_msec Delay time in ms.
 *
 * This is not an accurate delay, it ensures at least num_msec passed when return.
 */
platform_time_delay
@param num_msec Delay time in ms.

This is not an accurate delay, it ensures at least num_msec passed when return.
platform_time_delay @param num_msec Delay time in ms . This is not an accurate delay it ensures at least num_msec passed when return .
void platform_time_delay(int num_msec)
{
    uint32_t loop;
    SystemCoreClockUpdate();
    loop = SystemCoreClock / 3 / 1000 * num_msec;
    while (loop)
    {
        __NOP();
        loop--;
    }
}
void platform_time_delay ( int num_msec ) { uint32_t loop ; SystemCoreClockUpdate ( ) ; loop = SystemCoreClock / 3 / 1000 * num_msec ; while ( loop ) { __NOP ( ) ; loop -- ; } }
platform_time_delay
 @param num_msec Delay time in ms.
platform_time_delay @param num_msec Delay time in ms .
/* Recalculate the CPU frequency */ /* Calculate the CPU loops to delay, each loop has 3 cycles */ /* There's some difference among toolchains, 3 or 4 cycles each loop */