Delay Routines. More...
|void||gos_wait_microseconds (uint32_t microseconds)|
|Delay for specified microseconds. More...|
|void||gos_wait_milliseconds (uint32_t milliseconds)|
|Delay for specified milliseconds. More...|
|void||gos_microsecond_timer_init (gos_microsecond_timer_t *timer, uint32_t timeout_microseconds)|
|Initialize a microsecond timer context. More...|
|bool||gos_microsecond_timer_expired (gos_microsecond_timer_t *timer)|
|Determine if a microsecond timer has expired. More...|
|bool gos_microsecond_timer_expired||(||gos_microsecond_timer_t *||)|
Determine if a microsecond timer has expired.
gos_microsecond_timer_init() should be used to initialize the gos_microsecond_timer_t context. Once the context is initialized, periodically call this API to determine when the specified number of microseconds has elapsed.
- true if the specified number of microseconds has elapsed, false else
|void gos_microsecond_timer_init||(||gos_microsecond_timer_t *||
Initialize a microsecond timer context.
This initializes a microsecond timer for the specified number of microseconds. After the context is initialized, periodically call gos_microsecond_timer_expired() to determine when the timer has expired.
Microsecond timer context [in]
Number of microseconds until the timer expires
Delay for specified microseconds.
Delay for specified microseconds. This function runs with interrupts enabled, so the delay time will not be exact.
- This function has a 31 microsecond resolution. For example, requesting a 20 microsecond delay results in a 31 microsecond delay. Requesting a 40 microsecond delay results in a 62 microsecond delay. If your application requires higher resolution, contact Silabs support. A higher resolution delay has a significant cost in power consumption. For delays longer than 1ms it is strongly recommended to use the gos_wait_milliseconds() API. The gos_wait_milliseconds() API yields the calling thread and allows other threads in the system to run.
Time in microseconds to wait (dependent on timing accuracy)
Delay for specified milliseconds.
Pause the calling thread for the specified number of milliseconds. This will yield the calling thread and allow other threads in the system to run. If no threads need to run then the system will be put into a low power state until the delay expires.
- This has the exact same functionality as gos_rtos_delay_milliseconds()
Time in milliseconds to wait