Provides functionality to trigger multiple events at once.
More...
Provides functionality to trigger multiple events at once.
Event Source API
- Author
- Benjamin Valentin benja.nosp@m.min..nosp@m.valen.nosp@m.tin@.nosp@m.ml-pa.nosp@m..com
Definition in file source.h.
#include "event.h"
#include "list.h"
#include "irq.h"
Go to the source code of this file.
◆ EVENT_SOURCE_INIT
#define EVENT_SOURCE_INIT { 0 } |
Initialize an event source.
Definition at line 52 of file source.h.
◆ EVENT_SOURCE_SUBSCRIBER_INIT
#define EVENT_SOURCE_SUBSCRIBER_INIT |
( |
|
e, |
|
|
|
q |
|
) |
| { .event = (event_t *)e, .queue = q } |
Initialize an event source subscriber.
- Parameters
-
[in] | e | The event to trigger |
[in] | q | The event queue to use for the event |
Definition at line 60 of file source.h.
◆ event_source_attach()
Attach an event to an event source.
- Parameters
-
[in] | source | The event list to attach the event to |
[in] | event | The new event subscription |
Definition at line 68 of file source.h.
◆ event_source_detach()
Remove a subscription from the event source.
- Parameters
-
[in] | source | The event list to remove the event from |
[in] | event | The event to remove |
Definition at line 84 of file source.h.
◆ event_source_trigger()
Trigger all events registered on the event source.
- Parameters
-
[in] | source | The event list to trigger |
Definition at line 99 of file source.h.