diff options
Diffstat (limited to 'os/kernel/include/chevents.h')
-rw-r--r-- | os/kernel/include/chevents.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/os/kernel/include/chevents.h b/os/kernel/include/chevents.h index ac46ae826..cf7939d57 100644 --- a/os/kernel/include/chevents.h +++ b/os/kernel/include/chevents.h @@ -28,7 +28,7 @@ #ifndef _CHEVENTS_H_
#define _CHEVENTS_H_
-#if CH_USE_EVENTS
+#if CH_USE_EVENTS || defined(__DOXYGEN__)
typedef struct EventListener EventListener;
@@ -91,16 +91,18 @@ typedef struct EventSource { * The value must range between zero and the size, in bit,
* of the @p eventid_t type minus one.
*/
-#define chEvtRegister(esp, elp, eid) chEvtRegisterMask(esp, elp, EVENT_MASK(eid))
+#define chEvtRegister(esp, elp, eid) \
+ chEvtRegisterMask(esp, elp, EVENT_MASK(eid))
/**
* @brief Initializes an Event Source.
- * @note Can be used with interrupts disabled or enabled.
+ * @note This function can be invoked before the kernel is initialized
+ * because it just prepares a @p EventSource structure.
*
* @param[in] esp pointer to the @p EventSource structure
*/
#define chEvtInit(esp) \
- ((esp)->es_next = (EventListener *)(void *)(esp))
+ ((esp)->es_next = (EventListener *)(void *)(esp))
/**
* @brief Verifies if there is at least one @p EventListener registered.
@@ -109,7 +111,7 @@ typedef struct EventSource { * @param[in] esp pointer to the @p EventSource structure
*/
#define chEvtIsListening(esp) \
- ((void *)(esp) != (void *)(esp)->es_next)
+ ((void *)(esp) != (void *)(esp)->es_next)
/**
* @brief Event Handler callback function.
@@ -123,8 +125,8 @@ extern "C" { EventListener *elp,
eventmask_t mask);
void chEvtUnregister(EventSource *esp, EventListener *elp);
- eventmask_t chEvtClear(eventmask_t mask);
- eventmask_t chEvtPend(eventmask_t mask);
+ eventmask_t chEvtClearFlags(eventmask_t mask);
+ eventmask_t chEvtAddFlags(eventmask_t mask);
void chEvtSignal(Thread *tp, eventmask_t mask);
void chEvtSignalI(Thread *tp, eventmask_t mask);
void chEvtBroadcast(EventSource *esp);
|