Miscellaneous

RTOS miscellaneous functions. More...

Functions

uint32_t zn_rtos_get_time (void)
 Get the current system tick count. More...
 
zos_result_t zn_rtos_delay_milliseconds (uint32_t milliseconds)
 Sleep for a given periodCauses the current thread to sleep for AT LEAST the specified number of milliseconds. More...
 

Detailed Description

RTOS miscellaneous functions.

Function Documentation

zos_result_t zn_rtos_delay_milliseconds ( uint32_t  milliseconds)

Sleep for a given periodCauses the current thread to sleep for AT LEAST the specified number of milliseconds.

If the processor is heavily loaded with higher priority tasks, the delay may be much longer than requested.

Parameters
milliseconds: the time to sleep in milliseconds
Returns
ZOS_SUCCESS : on success.
ZOS_ERROR : if an error occurred
Examples:
basic/spi_stream/spi_stream.c, and nxp/lcd_scan/main.c.
uint32_t zn_rtos_get_time ( void  )

Get the current system tick count.

Note
The system tick counter increments every millisecond
Examples:
basic/ftp_upload/ftp_upload.c, basic/scan/scan.c, basic/spi_stream/spi_stream.c, demo/pong/game_server.c, nxp/lcd_scan/main.c, and nxp/nfc3d/nfc_tag.c.