doc: Add documentation for using private events

This reflects the changes made in commit df6be15aa5...

Change-Id: Ibe1bc167390268c0e335a0b4060a600ef55d1add
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
Allan Stephens 2015-10-30 15:36:48 -04:00 committed by Anas Nashif
commit 935a809cc6

View file

@ -81,7 +81,7 @@ The following parameters must be defined:
...
}
If no event handler is required specify :cpp:macro:`NULL`.
If no event handler is required specify :c:macro:`NULL`.
Public Event
------------
@ -105,8 +105,27 @@ as follows:
A public event can be referenced by name from any source file that includes
the file :file:`zephyr.h`.
.. note::
Private events are not supported by the Zephyr kernel.
Private Event
-------------
Define the event in a source file using the following syntax:
.. code-block:: c
DEFINE_EVENT(name, handler);
For example, the following code defines a private event named ``PRIV_EVENT``,
which has no associated event handler function.
.. code-block:: c
DEFINE_EVENT(PRIV_EVENT, NULL);
To utilize this event from a different source file use the following syntax:
.. code-block:: c
extern const kevent_t PRIV_EVENT;
Example: Signaling an Event from an ISR
========================================