README
event
Example Summary
The event example shows how to use the ti.sysbios.knl.Event module
which addresses the problem of a task needing to Wait on Multiple events prior to continuing its’ execution.
Example Usage
- Run the application, two tasks the,
writertask
andreadertask
, will print messages being passed between them to the console.
Application Design Details
A reader task,
readertask
, waits on several events. It needs to wake up when events with IdsEvent_Id_0
andEvent_Id_1
or ifEvent_Id_2
occurs. Theti.sysbios.knl.Event
module provides anEvent_pend()
API that allows a task to specify anAND
mask and anOR
mask. These masks determine which event(s) must occur before returning fromEvent_pend()
.The event related to
Event_Id_0
is posted by a Clock Instance using a call toEvent_post()
. This is an example of the Explicit posting of events.Event_Id_1
is posted from within a Semaphore Instance. This is an example of the Implicit posting of events. This is useful when a task needs to wait on a semaphore and an event which is explicitly posted.Event_id_2
is posted from within a Mailbox Instance which occurs wihtin the context of thewritertask
. This is also an example of Implicit posting of events.
The Semaphore Module does not support events by default, as such, the
Semaphore.supportsEvents
flag is set totrue
within the applications configuration file event.cfg.
References
- For more help, search the SYS/BIOS User Guide.