aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/events.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/events.h')
-rw-r--r--src/include/events.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/include/events.h b/src/include/events.h
index ae5d8c740..2f3eda366 100644
--- a/src/include/events.h
+++ b/src/include/events.h
@@ -52,9 +52,13 @@ typedef struct EventSource {
EventListener *es_next;
} EventSource;
-/** Returns the event mask from the event identifier.*/
+/** Returns the event mask from the event identifier.
+ * @deprecated use EVENT_MASK() instead.*/
#define EventMask(eid) (1 << (eid))
+/** Returns the event mask from the event identifier.*/
+#define EVENT_MASK(eid) (1 << (eid))
+
/**
* Initializes an Event Source.
* @param esp pointer to the \p EventSource structure
@@ -85,6 +89,7 @@ extern "C" {
eventmask_t chEvtPend(eventmask_t mask);
void chEvtBroadcast(EventSource *esp);
void chEvtBroadcastI(EventSource *esp);
+ void chEvtDispatch(const evhandler_t handlers[], eventmask_t mask);
#if defined(CH_OPTIMIZE_SPEED) || !defined(CH_USE_EVENT_TIMEOUT)
eventmask_t chEvtWaitOne(eventmask_t ewmask);
eventmask_t chEvtWaitAny(eventmask_t ewmask);
@@ -115,7 +120,7 @@ extern "C" {
* @note Multiple Event Listeners can use the same event identifier, the
* listener will share the callback function.
*/
-#define chEvtRegister(esp, elp, eid) chEvtRegisterMask(esp, elp, EventMask(eid))
+#define chEvtRegister(esp, elp, eid) chEvtRegisterMask(esp, elp, EVENT_MASK(eid))
#if !defined(CH_OPTIMIZE_SPEED) && defined(CH_USE_EVENT_TIMEOUT)
#define chEvtWaitOne(ewmask) chEvtWaitOneTimeout(ewmask, TIME_INFINITE)