Lines Matching +full:input +full:- +full:event +full:- +full:code

6 An :dfn:`event object` is a kernel object that implements traditional events.
15 Any number of event objects can be defined (limited only by available RAM). Each
16 event object is referenced by its memory address. One or more threads may wait
17 on an event object until the desired set of events has been delivered to the
18 event object. When new events are delivered to the event object, all threads
21 An event object has the following key properties:
23 * A 32-bit value that tracks which events have been delivered to it.
25 An event object must be initialized before it can be used.
32 conditions of multiple threads waiting on the event object. All threads whose
37 have the option of resetting the current set of events tracked by the event
39 threads wait on the same event object.
42 The kernel does allow an ISR to query an event object, however the ISR must
48 Defining an Event Object
51 An event object is defined using a variable of type :c:struct:`k_event`.
54 The following code defines an event object.
56 .. code-block:: c
62 Alternatively, an event object can be defined and initialized at compile time
65 The following code has the same effect as the code segment above.
67 .. code-block:: c
74 Events in an event object are set by calling :c:func:`k_event_set`.
76 The following code builds on the example above, and sets the events tracked by
77 the event object to 0x001.
79 .. code-block:: c
93 Events are posted to an event object by calling :c:func:`k_event_post`.
95 The following code builds on the example above, and posts a set of events to
96 the event object.
98 .. code-block:: c
116 The following code builds on the example above, and waits up to 50 milliseconds
120 .. code-block:: c
128 printk("No input devices are available!");
130 /* Access the desired input device(s) */
139 .. code-block:: c
147 printk("At least one input device is not available!");
149 /* Access the desired input devices */