You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The event scheduler is used for transferring execution from the interrupt context to the main context.
11
+
12
+
Overview
13
+
********
14
+
15
+
In some applications it is beneficial to defer the execution of certain interrupts, for example some SoftDevice interrupts, to the main application function.
16
+
This shortens the time spent in the interrupt service routine (ISR) and allows for other (low priority) events to be raised before the previous event is fully processed.
17
+
Note that the application must take care to only defer events that can be interleaved by the processing of other interrupts.
18
+
19
+
Configuration
20
+
*************
21
+
22
+
The library is enabled using the Kconfig system.
23
+
Set the :kconfig:option:`CONFIG_EVENT_SCHEDULER` Kconfig option to enable the library.
24
+
25
+
The size of the event scheduler buffer, that the events are copied into, is set using the :kconfig:option:`CONFIG_EVENT_SCHEDULER_BUF_SIZE` Kconfig option.
26
+
27
+
Initialization
28
+
==============
29
+
30
+
The library is initialized automatically on application startup.
31
+
32
+
Usage
33
+
*****
34
+
35
+
The SoftDevice event handler can call the :c:func:`event_scheduler_defer` function to schedule an event for execution in the main thread.
36
+
The :c:func:`event_scheduler_process` function must be called regulary from the main function to process the deferred events.
37
+
38
+
Dependencies
39
+
************
40
+
41
+
This library does not have any dependencies.
42
+
43
+
API documentation
44
+
*****************
45
+
46
+
|Header file: :file:`include/event_scheduler.h`
47
+
|Source files: :file:`lib/event_scheduler/`
48
+
49
+
:ref:`Event Scheduler library API reference <api_event_scheduler>`
0 commit comments