www.beck-ipc.com

@CHIP-RTOS C Library - RTOS API


RTX_Wait_For_EventP

The calling task waits until the Event Manager wakes it up (the event has occurred) or the specified timeout is reached.

int RTX_Wait_For_EventP ( unsigned int id, unsigned int mask,
                          unsigned int value, int match,
                          long timeout );

Parameters

id

Event group ID produced by RTX_Create_EventGroup call.

mask

16-Bit mask identifying the flags of interest in the group

value

Event value for the 16 event flag/bits.   Only the bits marked '1' in the mask are relevant here.

match

=0 (OR): only one flag must match with value
!=0 (AND): all flags must match with value

timeout

Positive value -> wait up to this number of milliseconds for an event match
Zero -> wait forever for an event match
Negative value -> No wait, return immediately

Return Value

0 on success else error code.

Comments

Note that the Event Manager's wakeup mechanism is level sensitive (not edge triggered).   Consequently, a task may want to acknowledge an event bit level after a wakeup by negating the flag using the RTX_Signal_Events function following a wakeup.

The function is identical to RTX_Wait_For_Event, except for manner of parameter passing.

The RTX_Get_Saved_Events function can be used to pick up the event states.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Related Topics

RTX API   Overview

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    V1.00V1.00V1.00V0.90V1.00

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document