OS Utils

API 介绍

This section introduces the UTILS module's functions and how to use this driver.

Functions

void os_utils_init(uint32_t stack_top)

This function is used to init the utils module.

参数:

stack_top -- is os set stack.

uint32_t os_boot_time32(void)

This function is used to get the time since boot up in ms. uint32_t time value will overflow in 49.71 days.

返回:

uint32_t duration in milliseconds since the system boot up

uint32_t os_rand(void)

This function is used to get a pseudo random number.

返回:

uint32_t a pseudo random number

uint32_t os_delay(uint32_t millisec)

This function is used to wait for timeout (Time Delay)

参数:

millisec -- is time delay value

返回:

uint32_t 0.

uint32_t os_get_ticks(void)

This function is used to query ticks counter.

返回:

uint32_t return ticks.

uint64_t os_boot_time64(void)

This function is used to get the time since boot up in ms.

返回:

uint64_t duration in milliseconds since the system boot up