Infineon Logo AIROC BTSDK v4.2 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Sleep

Sleep management functions. More...

Functions

wiced_result_t wiced_rtos_delay_milliseconds (uint32_t milliseconds, wiced_delay_type_t delay_type)
 Sleep for a given period of milliseconds. More...
 
wiced_result_t wiced_rtos_delay_microseconds (uint32_t microseconds)
 Delay for a given period of microseconds. More...
 

Detailed Description

Sleep management functions.

Function Documentation

wiced_result_t wiced_rtos_delay_microseconds ( uint32_t  microseconds)

Delay for a given period of microseconds.

Causes the current thread to block for AT LEAST the specified number of microseconds. If the processor is heavily loaded with higher priority tasks, the delay may be much longer than requested.

NOTE: All threads with equal or lower priority than the current thread will not be able to run while the delay is occurring.

Parameters
microseconds: the time to delay in microseconds
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred
wiced_result_t wiced_rtos_delay_milliseconds ( uint32_t  milliseconds,
wiced_delay_type_t  delay_type 
)

Sleep for a given period of milliseconds.

Causes 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
delay_type: delay type to be used during the duration of the delay. Use the delay type as ALLOW_THREAD_TO_SLEEP to allow the current running thread to sleep or as KEEP_THREAD_ACTIVE to keep the current running thread active
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred