
------------------------------------------------------------------------------
8. Wait for being signaled <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
os_wait_flg
[Syntax]
#include <oscall.h>
unsigned short os_wait_flg( unsigned char event_flag_id,
unsigned long wait_message,
unsigned short and_or, long wait_limit,
unsigned long *return_message ) ;
[Argument]
event_flag_id event flag ID
wait_message wait message
and_or AND -- 0, OR -- 1
wait_limit Set 0.
return_message
[Return]
0 successful completion
EC_FLGID Event-flag ID error
EC_NXSTFLG Non-existent event-flag
EC_DELFLG Event-flag was deleted
EC_TIMOUT Time out
[Description]
Waits for specified signals to be signaled.
When the value of the argument "and_or" is AND_W(0), this function
suspends the calling task and waits for all the signals specified by
wait_message to be signaled. This is referred to as "AND wait" mode.
Always, "0" is returned as return_message in this mode..
When the value of the argument "and_or" is OR_W(1), this function
suspends the calling task and waits for at least one of the signals
specified by wait_message to be signaled. This is referred to as
"OR wait" mode. Signaled flag is returned as return_message in this
mode..