ChibiOS/RT Architecture - Reference Manual - Guides |
Events macros and structures. More...
Go to the source code of this file.
Data Structures | |
struct | EventListener |
Event Listener structure. More... | |
struct | EventSource |
Event Source structure. More... | |
Defines | |
#define | _EVENTSOURCE_DATA(name) {(void *)(&name)} |
Data part of a static event source initializer. | |
#define | EVENTSOURCE_DECL(name) EventSource name = _EVENTSOURCE_DATA(name) |
Static event source initializer. | |
#define | ALL_EVENTS ((eventmask_t)-1) |
#define | EVENT_MASK(eid) ((eventmask_t)(1 << (eid))) |
#define | chEvtRegister(esp, elp, eid) chEvtRegisterMask(esp, elp, EVENT_MASK(eid)) |
Registers an Event Listener on an Event Source. | |
#define | chEvtInit(esp) ((esp)->es_next = (EventListener *)(void *)(esp)) |
Initializes an Event Source. | |
#define | chEvtIsListening(esp) ((void *)(esp) != (void *)(esp)->es_next) |
Verifies if there is at least one EventListener registered. | |
Typedefs | |
typedef struct EventSource | EventSource |
Event Source structure. | |
typedef void(* | evhandler_t )(eventid_t) |
Event Handler callback function. | |
Functions | |
void | chEvtRegisterMask (EventSource *esp, EventListener *elp, eventmask_t mask) |
Registers an Event Listener on an Event Source. | |
void | chEvtUnregister (EventSource *esp, EventListener *elp) |
Unregisters an Event Listener from its Event Source. | |
eventmask_t | chEvtClear (eventmask_t mask) |
Clears the pending events specified in the mask. | |
eventmask_t | chEvtPend (eventmask_t mask) |
Pends a set of event flags on the current thread, this is much faster than using chEvtBroadcast() or chEvtSignal() . | |
void | chEvtSignal (Thread *tp, eventmask_t mask) |
Pends a set of event flags on the specified Thread . | |
void | chEvtSignalI (Thread *tp, eventmask_t mask) |
Pends a set of event flags on the specified Thread . | |
void | chEvtBroadcast (EventSource *esp) |
Signals all the Event Listeners registered on the specified Event Source. | |
void | chEvtBroadcastI (EventSource *esp) |
Signals all the Event Listeners registered on the specified Event Source. | |
void | chEvtDispatch (const evhandler_t *handlers, eventmask_t mask) |
Invokes the event handlers associated to an event flags mask. | |
eventmask_t | chEvtWaitOneTimeout (eventmask_t mask, systime_t time) |
Waits for exactly one of the specified events. | |
eventmask_t | chEvtWaitAnyTimeout (eventmask_t mask, systime_t time) |
Waits for any of the specified events. | |
eventmask_t | chEvtWaitAllTimeout (eventmask_t mask, systime_t time) |
Waits for all the specified events. |
Events macros and structures.
Definition in file chevents.h.