ChibiOS/RT 7.0.5
chevents.h File Reference

Events macros and structures. More...

Go to the source code of this file.

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.
#define chEvtWaitOne(mask)
#define chEvtWaitAny(mask)
#define chEvtWaitAll(mask)

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 chEvtRegisterMaskWithFlagsI (event_source_t *esp, event_listener_t *elp, eventmask_t events, eventflags_t wflags)
 Registers an Event Listener on an Event Source.
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().
eventflags_t chEvtGetAndClearFlagsI (event_listener_t *elp)
 Returns the unmasked flags associated to an event_listener_t.
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.
void chEvtBroadcastFlagsI (event_source_t *esp, eventflags_t flags)
 Signals all the Event Listeners registered on the specified Event Source.
void chEvtDispatch (const evhandler_t *handlers, eventmask_t events)
 Invokes the event handlers associated to an event flags mask.
eventmask_t chEvtWaitOne (eventmask_t events)
 Waits for exactly one of the specified events.
eventmask_t chEvtWaitAny (eventmask_t events)
 Waits for any of the specified events.
eventmask_t chEvtWaitAll (eventmask_t events)
 Waits for all the specified events.
eventmask_t chEvtWaitOneTimeout (eventmask_t events, sysinterval_t timeout)
 Waits for exactly one of the specified events.
eventmask_t chEvtWaitAnyTimeout (eventmask_t events, sysinterval_t timeout)
 Waits for any of the specified events.
eventmask_t chEvtWaitAllTimeout (eventmask_t events, sysinterval_t timeout)
 Waits for all the specified events.
static void chEvtObjectInit (event_source_t *esp)
 Initializes an Event Source.
static void chEvtRegisterMask (event_source_t *esp, event_listener_t *elp, eventmask_t events)
 Registers an Event Listener on an Event Source.
static void chEvtRegister (event_source_t *esp, event_listener_t *elp, eventid_t event)
 Registers an Event Listener on an Event Source.
static bool chEvtIsListeningI (event_source_t *esp)
 Verifies if there is at least one event_listener_t registered.
static void chEvtBroadcast (event_source_t *esp)
 Signals all the Event Listeners registered on the specified Event Source.
static void chEvtBroadcastI (event_source_t *esp)
 Signals all the Event Listeners registered on the specified Event Source.
static eventmask_t chEvtAddEventsI (eventmask_t events)
 Adds (OR) a set of events to the current thread, this is much faster than using chEvtBroadcast() or chEvtSignal().
static eventmask_t chEvtGetEventsX (void)
 Returns the events mask.

Detailed Description

Events macros and structures.

Definition in file chevents.h.