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,
writertaskandreadertask, 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_0andEvent_Id_1or ifEvent_Id_2occurs. Theti.sysbios.knl.Eventmodule provides anEvent_pend()API that allows a task to specify anANDmask and anORmask. These masks determine which event(s) must occur before returning fromEvent_pend().The event related to
Event_Id_0is posted by a Clock Instance using a call toEvent_post(). This is an example of the Explicit posting of events.Event_Id_1is 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_2is 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.supportsEventsflag is set totruewithin the applications configuration file event.cfg.
References
- For more help, search the SYS/BIOS User Guide.