CMSIS-RTOS
Version 1.03
Real-Time Operating System: API and RTX Reference Implementation.
|
Wait for a time period or unspecified events. More...
Macros | |
#define | osFeature_Wait 1 |
osWait function: 1=available, 0=not available More... | |
Functions | |
osStatus | osDelay (uint32_t millisec) |
Wait for Timeout (Time Delay). More... | |
osEvent | osWait (uint32_t millisec) |
Wait for Signal, Message, Mail, or Timeout. More... | |
The Generic Wait function group provides means for a time delay and allow to wait for unspecified events.
#define osFeature_Wait 1 |
A CMSIS-RTOS implementation may support the generic wait function osWait.
CMSIS-RTOS RTX Setting: osFeature_Wait is 0
osStatus osDelay | ( | uint32_t | millisec | ) |
[in] | millisec | time delay value |
Wait for a specified time period in millisec.
The millisec value specifies the number of timer ticks and is therefore an upper bound. The exact time delay depends on the actual time elapsed since the last timer tick.
For a value of 1, the system waits until the next timer tick occurs. That means that the actual time delay may be up to one timer tick less.
Code Example
osEvent osWait | ( | uint32_t | millisec | ) |
[in] | millisec | Timout Value or 0 in case of no time-out |
Wait for any event of the type Signal, Message, Mail for a specified time period in millisec. While the system waits, the thread that is calling this function is put into the state WAITING. When millisec is set to osWaitForever, the function will wait for an infinite time until an event occurs.
The osWait function puts a thread into the state WAITING and waits for any of the following events:
Code Example