Keil RTX51 Manual page 37

Table of Contents

Advertisement

RTX Tiny
os_wait2
Summary:
Description:
Return Value:
#include <rtx51tny.h>
char os_wait2 (
unsigned char event_sel,
unsigned char ticks);
The os_wait2 function halts the current task and waits for one or
several events such as a time interval, a time-out, or a signal from
another task or interrupt. The event_sel argument specifies the
event or events to wait for and can be any combination of the fol-
lowing manifest constants:
Event constant
Description
K_IVL
Wait for a timer tick interval.
K_SIG
Wait for a signal.
K_TMO
Wait for a time
The above events can be logically ORed using the vertical bar
character ( | ). For example, K_TMO | K_SIG, specifies that the
task wait for a time-out or for a signal.
The ticks argument specifies the number of timer ticks to wait for
an interval event ( K_IVL ) or a time-out event ( K_TMO ).
When one of the specified events occurs, the task is enabled for
execution. Execution is restored and the manifest constant that
identifies the event that restarted the task is returned by the
os_wait2 function. Possible return values are:
/* events to wait for */
/* timer ticks to wait */
-
out.
37
4

Advertisement

Table of Contents
loading

Table of Contents