| 
    ChibiOS 21.11.4
    
   | 
 

Macro Functions | |
| #define | chEvtObjectInit(esp) | 
| Initializes an Event Source.   | |
| #define | chEvtRegisterMask(esp, elp, events) | 
| Registers an Event Listener on an Event Source.   | |
| #define | chEvtRegister(esp, elp, event) | 
| Registers an Event Listener on an Event Source.   | |
| #define | chEvtIsListeningI(esp) | 
Verifies if there is at least one event_listener_t registered.   | |
| #define | chEvtBroadcast(esp) | 
| Signals all the Event Listeners registered on the specified Event Source.   | |
| #define | chEvtBroadcastI(esp) | 
| Signals all the Event Listeners registered on the specified Event Source.   | |
| #define | chEvtAddEventsI(events) | 
Adds (OR) a set of events to the current thread, this is much faster than using chEvtBroadcast() or chEvtSignal().   | |
| #define | chEvtGetEventsX(void) | 
| Returns the events mask.   | |
| #define | chEvtWaitOne(events) | 
| Waits for exactly one of the specified events.   | |
| #define | chEvtWaitAny(events) | 
| Waits for any of the specified events.   | |
| #define | chEvtWaitAll(events) | 
| Waits for all the specified events.   | |
Data Structures | |
| struct | event_listener | 
| Event Listener structure.  More... | |
| struct | event_source | 
| Event Source structure.  More... | |
Macros | |
| #define | ALL_EVENTS ((eventmask_t)-1) | 
| All events allowed mask.   | |
| #define | EVENT_MASK(eid) | 
| Returns an event mask from an event identifier.   | |
| #define | _EVENTSOURCE_DATA(name) | 
| Data part of a static event source initializer.   | |
| #define | EVENTSOURCE_DECL(name) | 
| Static event source initializer.   | |
Typedefs | |
| typedef struct event_listener | event_listener_t | 
| typedef struct event_source | event_source_t | 
| Event Source structure.   | |
| typedef void(* | evhandler_t) (eventid_t id) | 
| Event Handler callback function.   | |
Functions | |
| void | chEvtRegisterMaskWithFlags (event_source_t *esp, event_listener_t *elp, eventmask_t events, eventflags_t wflags) | 
| Registers an Event Listener on an Event Source.   | |
| void | chEvtUnregister (event_source_t *esp, event_listener_t *elp) | 
| Unregisters an Event Listener from its Event Source.   | |
| eventmask_t | chEvtGetAndClearEventsI (eventmask_t events) | 
| Clears the pending events specified in the events mask.   | |
| eventmask_t | chEvtGetAndClearEvents (eventmask_t events) | 
| Clears the pending events specified in the events mask.   | |
| eventmask_t | chEvtAddEvents (eventmask_t events) | 
Adds (OR) a set of events to the current thread, this is much faster than using chEvtBroadcast() or chEvtSignal().   | |
| void | chEvtBroadcastFlagsI (event_source_t *esp, eventflags_t flags) | 
| Signals all the Event Listeners registered on the specified Event Source.   | |
| eventflags_t | chEvtGetAndClearFlags (event_listener_t *elp) | 
Returns the flags associated to an event_listener_t.   | |
| void | chEvtSignal (thread_t *tp, eventmask_t events) | 
Adds a set of event flags directly to the specified thread_t.   | |
| void | chEvtSignalI (thread_t *tp, eventmask_t events) | 
Adds a set of event flags directly to the specified thread_t.   | |
| void | chEvtBroadcastFlags (event_source_t *esp, eventflags_t flags) | 
| Signals all the Event Listeners registered on the specified Event Source.   | |
| eventflags_t | chEvtGetAndClearFlagsI (event_listener_t *elp) | 
Returns the unmasked flags associated to an event_listener_t.   | |
| void | chEvtDispatch (const evhandler_t *handlers, eventmask_t events) | 
| Invokes the event handlers associated to an event flags mask.   | |
| eventmask_t | chEvtWaitOneTimeout (eventmask_t events, sysinterval_t timeout) | 
| Waits for exactly one of the specified events.   | |
| eventmask_t | chEvtWaitAnyTimeout (eventmask_t mask, sysinterval_t timeout) | 
| Waits for any of the specified events.   | |
| eventmask_t | chEvtWaitAllTimeout (eventmask_t mask, sysinterval_t timeout) | 
| Waits for all the specified events.   | |
| #define ALL_EVENTS ((eventmask_t)-1) | 
| #define EVENT_MASK | ( | eid | ) | 
Returns an event mask from an event identifier.
| #define _EVENTSOURCE_DATA | ( | name | ) | 
Data part of a static event source initializer.
This macro should be used when statically initializing an event source that is part of a bigger structure.
| name | the name of the event source variable | 
| #define EVENTSOURCE_DECL | ( | name | ) | 
Static event source initializer.
Statically initialized event sources require no explicit initialization using chEvtInit().
| name | the name of the event source variable | 
| #define chEvtObjectInit | ( | esp | ) | 
Initializes an Event Source.
event_source_t structure.| [in] | esp | pointer to the event_source_t structure | 
| #define chEvtRegisterMask | ( | esp, | |
| elp, | |||
| events ) | 
Registers an Event Listener on an Event Source.
Once a thread has registered as listener on an event source it will be notified of all events broadcasted there.
| [in] | esp | pointer to the event_source_t structure  | 
| [out] | elp | pointer to the event_listener_t structure  | 
| [in] | events | the mask of events to be ORed to the thread when the event source is broadcasted | 
Definition at line 144 of file chevt.h.
Referenced by chEvtRegister().
| #define chEvtRegister | ( | esp, | |
| elp, | |||
| event ) | 
Registers an Event Listener on an Event Source.
| [in] | esp | pointer to the event_source_t structure  | 
| [out] | elp | pointer to the event_listener_t structure  | 
| [in] | event | numeric identifier assigned to the Event Listener. The value must range between zero and the size, in bit, of the eventmask_t type minus one. | 
| #define chEvtIsListeningI | ( | esp | ) | 
Verifies if there is at least one event_listener_t registered. 
| [in] | esp | pointer to the event_source_t structure  | 
| #define chEvtBroadcast | ( | esp | ) | 
Signals all the Event Listeners registered on the specified Event Source.
| [in] | esp | pointer to the event_source_t structure | 
| #define chEvtBroadcastI | ( | esp | ) | 
Signals all the Event Listeners registered on the specified Event Source.
| [in] | esp | pointer to the event_source_t structure | 
| #define chEvtAddEventsI | ( | events | ) | 
Adds (OR) a set of events to the current thread, this is much faster than using chEvtBroadcast() or chEvtSignal(). 
| [in] | events | the events to be added | 
Definition at line 206 of file chevt.h.
Referenced by chEvtAddEvents().
| #define chEvtGetEventsX | ( | void | ) | 
Returns the events mask.
The pending events mask is returned but not altered in any way.
| #define chEvtWaitOne | ( | events | ) | 
Waits for exactly one of the specified events.
The function waits for one event among those specified in events to become pending then the event is cleared and returned. 
| [in] | events | events that the function should wait for, ALL_EVENTS enables all the events  | 
| 0 | if the operation has timed out. | 
| #define chEvtWaitAny | ( | events | ) | 
Waits for any of the specified events.
The function waits for any event among those specified in mask to become pending then the events are cleared and returned.
| [in] | events | events that the function should wait for, ALL_EVENTS enables all the events  | 
| 0 | if the operation has timed out. | 
| #define chEvtWaitAll | ( | events | ) | 
Waits for all the specified events.
The function waits for all the events specified in mask to become pending then the events are cleared and returned.
| [in] | events | events that the function should wait for, ALL_EVENTS enables all the events  | 
| 0 | if the operation has timed out. | 
| typedef struct event_listener event_listener_t | 
| typedef struct event_source event_source_t | 
Event Source structure.
| typedef void(* evhandler_t) (eventid_t id) | 
| void chEvtRegisterMaskWithFlags | ( | event_source_t * | esp, | 
| event_listener_t * | elp, | ||
| eventmask_t | events, | ||
| eventflags_t | wflags ) | 
Registers an Event Listener on an Event Source.
Once a thread has registered as listener on an event source it will be notified of all events broadcasted there.
| [in] | esp | pointer to the event_source_t structure  | 
| [in] | elp | pointer to the event_listener_t structure  | 
| [in] | events | events to be ORed to the thread when the event source is broadcasted | 
| [in] | wflags | mask of flags the listening thread is interested in | 
Definition at line 71 of file chevt.c.
References chDbgCheck, chSysLock, chSysUnlock, chThdGetSelfX, event_listener::events, event_listener::flags, event_listener::listener, event_listener::next, event_source::next, and event_listener::wflags.
| void chEvtUnregister | ( | event_source_t * | esp, | 
| event_listener_t * | elp ) | 
Unregisters an Event Listener from its Event Source.
| [in] | esp | pointer to the event_source_t structure  | 
| [in] | elp | pointer to the event_listener_t structure | 
Definition at line 101 of file chevt.c.
References chDbgCheck, chSysLock, chSysUnlock, and event_listener::next.
| eventmask_t chEvtGetAndClearEventsI | ( | eventmask_t | events | ) | 
Clears the pending events specified in the events mask.
| [in] | events | the events to be cleared | 
Definition at line 130 of file chevt.c.
References chThdGetSelfX.
Referenced by chEvtGetAndClearEvents().
| eventmask_t chEvtGetAndClearEvents | ( | eventmask_t | events | ) | 
Clears the pending events specified in the events mask.
| [in] | events | the events to be cleared | 
Definition at line 147 of file chevt.c.
References chEvtGetAndClearEventsI(), chSysLock, and chSysUnlock.

| eventmask_t chEvtAddEvents | ( | eventmask_t | events | ) | 
Adds (OR) a set of events to the current thread, this is much faster than using chEvtBroadcast() or chEvtSignal(). 
| [in] | events | the events to be added | 
Definition at line 166 of file chevt.c.
References chEvtAddEventsI, chSysLock, and chSysUnlock.
| void chEvtBroadcastFlagsI | ( | event_source_t * | esp, | 
| eventflags_t | flags ) | 
Signals all the Event Listeners registered on the specified Event Source.
This function variants ORs the specified event flags to all the threads registered on the event_source_t in addition to the event flags specified by the threads themselves in the event_listener_t objects. 
| [in] | esp | pointer to the event_source_t structure  | 
| [in] | flags | the flags set to be added to the listener flags mask | 
Definition at line 193 of file chevt.c.
References chDbgCheck, chDbgCheckClassI, chEvtSignalI(), event_listener::events, event_listener::flags, event_listener::listener, event_listener::next, event_source::next, and event_listener::wflags.
Referenced by chEvtBroadcastFlags().

| eventflags_t chEvtGetAndClearFlags | ( | event_listener_t * | elp | ) | 
Returns the flags associated to an event_listener_t. 
The flags are returned and the event_listener_t flags mask is cleared.
| [in] | elp | pointer to the event_listener_t structure  | 
Definition at line 225 of file chevt.c.
References chSysLock, chSysUnlock, event_listener::flags, and event_listener::wflags.
| void chEvtSignal | ( | thread_t * | tp, | 
| eventmask_t | events ) | 
Adds a set of event flags directly to the specified thread_t. 
| [in] | tp | the thread to be signaled | 
| [in] | events | the event flags set to be ORed | 
Definition at line 244 of file chevt.c.
References chEvtSignalI(), chSchRescheduleS(), chSysLock, and chSysUnlock.

| void chEvtSignalI | ( | thread_t * | tp, | 
| eventmask_t | events ) | 
Adds a set of event flags directly to the specified thread_t. 
| [in] | tp | the thread to be signaled | 
| [in] | events | the event flags set to be ORed | 
Definition at line 264 of file chevt.c.
References chDbgCheck, chDbgCheckClassI, chSchReadyI(), ch_thread::ewmask, MSG_OK, NIL_THD_IS_WTANDEVT, and NIL_THD_IS_WTOREVT.
Referenced by chEvtBroadcastFlagsI(), and chEvtSignal().

| void chEvtBroadcastFlags | ( | event_source_t * | esp, | 
| eventflags_t | flags ) | 
Signals all the Event Listeners registered on the specified Event Source.
This function variants ORs the specified event flags to all the threads registered on the event_source_t in addition to the event flags specified by the threads themselves in the event_listener_t objects.
| [in] | esp | pointer to the event_source_t structure  | 
| [in] | flags | the flags set to be added to the listener flags mask | 
Definition at line 291 of file chevt.c.
References chEvtBroadcastFlagsI(), chSchRescheduleS(), chSysLock, and chSysUnlock.

| eventflags_t chEvtGetAndClearFlagsI | ( | event_listener_t * | elp | ) | 
Returns the unmasked flags associated to an event_listener_t. 
The flags are returned and the event_listener_t flags mask is cleared.
| [in] | elp | pointer to the event_listener_t structure  | 
Definition at line 310 of file chevt.c.
References event_listener::flags, and event_listener::wflags.
| void chEvtDispatch | ( | const evhandler_t * | handlers, | 
| eventmask_t | events ) | 
Invokes the event handlers associated to an event flags mask.
| [in] | events | mask of events to be dispatched | 
| [in] | handlers | an array of evhandler_t. The array must have size equal to the number of bits in eventmask_t. | 
Definition at line 328 of file chevt.c.
References chDbgAssert, chDbgCheck, and EVENT_MASK.
| eventmask_t chEvtWaitOneTimeout | ( | eventmask_t | events, | 
| sysinterval_t | timeout ) | 
Waits for exactly one of the specified events.
The function waits for one event among those specified in events to become pending then the event is cleared and returned. 
| [in] | events | events that the function should wait for, ALL_EVENTS enables all the events  | 
| [in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
  | 
| 0 | if the operation has timed out. | 
Definition at line 366 of file chevt.c.
References chSchGoSleepTimeoutS(), chSysLock, chSysUnlock, ch_thread::ewmask, MSG_OK, nil, NIL_STATE_WTOREVT, and TIME_IMMEDIATE.

| eventmask_t chEvtWaitAnyTimeout | ( | eventmask_t | mask, | 
| sysinterval_t | timeout ) | 
Waits for any of the specified events.
The function waits for any event among those specified in mask to become pending then the events are cleared and returned.
| [in] | mask | mask of the event flags that the function should wait for, ALL_EVENTS enables all the events  | 
| [in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
  | 
| 0 | if the operation has timed out. | 
Definition at line 411 of file chevt.c.
References chSchGoSleepTimeoutS(), chSysLock, chSysUnlock, ch_thread::ewmask, MSG_OK, nil, NIL_STATE_WTOREVT, and TIME_IMMEDIATE.

| eventmask_t chEvtWaitAllTimeout | ( | eventmask_t | mask, | 
| sysinterval_t | timeout ) | 
Waits for all the specified events.
The function waits for all the events specified in mask to become pending then the events are cleared and returned.
| [in] | mask | mask of the event flags that the function should wait for, ALL_EVENTS enables all the events  | 
| [in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
  | 
| 0 | if the operation has timed out. | 
Definition at line 453 of file chevt.c.
References chSchGoSleepTimeoutS(), chSysLock, chSysUnlock, ch_thread::ewmask, MSG_OK, nil, NIL_STATE_WTANDEVT, and TIME_IMMEDIATE.
