-
Notifications
You must be signed in to change notification settings - Fork 27
lib: event_scheduler: rename to bm_scheduler #491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| .. _lib_bm_scheduler: | ||
|
|
||
| Bare Metal scheduler | ||
| #################### | ||
|
|
||
| .. contents:: | ||
| :local: | ||
| :depth: 2 | ||
|
|
||
| The Bare Metal scheduler is a library for scheduling functions to run on the main thread. | ||
|
|
||
| Overview | ||
| ******** | ||
|
|
||
| This library enables queuing and execution of functions in the main-thread context. | ||
| It can be used, for example, to defer the execution of operations from an ISR to the main thread. | ||
| This shortens the time spent in the interrupt service routine (ISR). | ||
|
|
||
| Configuration | ||
| ************* | ||
|
|
||
| The library is enabled using the Kconfig system. | ||
| Set the :kconfig:option:`CONFIG_BM_SCHEDULER` Kconfig option to enable the library. | ||
|
|
||
| Use the :kconfig:option:`CONFIG_BM_SCHEDULER_BUF_SIZE` Kconfig option to set the size of the event scheduler buffer that the events are copied into. | ||
|
|
||
| Initialization | ||
| ============== | ||
|
|
||
| The library is initialized automatically on application startup. | ||
|
|
||
| Usage | ||
| ***** | ||
|
|
||
| The SoftDevice event handler can call the :c:func:`bm_scheduler_defer` function to schedule an event for later execution in the main thread. | ||
|
|
||
| To process these deferred events, call the :c:func:`bm_scheduler_process` function regularly in the main application loop. | ||
|
|
||
| Dependencies | ||
| ************ | ||
|
|
||
| This library does not have any dependencies. | ||
|
|
||
| API documentation | ||
| ***************** | ||
|
|
||
| | Header file: :file:`include/bm/bm_scheduler.h` | ||
| | Source files: :file:`lib/bm_scheduler/` | ||
|
|
||
| :ref:`Bare Metal scheduler library API reference <api_bm_scheduler>` |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,22 +3,22 @@ | |
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| # | ||
| menuconfig EVENT_SCHEDULER | ||
| menuconfig BM_SCHEDULER | ||
| bool "Event scheduler" | ||
| help | ||
| A library to defer event processing to main(). | ||
|
|
||
| if EVENT_SCHEDULER | ||
| if BM_SCHEDULER | ||
|
|
||
| config EVENT_SCHEDULER_BUF_SIZE | ||
| config BM_SCHEDULER_BUF_SIZE | ||
| int "Event buffer size" | ||
| # Maximum BLE event length is 500 (w/ 247 MTU) | ||
| default 512 | ||
| help | ||
| Size of the buffer that events will be copied into. | ||
| This is a dedicated heap. | ||
|
|
||
| module=EVENT_SCHEDULER | ||
| module=BM_SCHEDULER | ||
| module-str=Event scheduler | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be renamed too? Same for the prompt at the top
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe, timer and buttons say: "Buttons library" and "Timer library" |
||
| source "$(ZEPHYR_BASE)/subsys/logging/Kconfig.template.log_config" | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check event handler typedef above.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be called something else than
evt_handler_t, it is a bit too generic in my opinion.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump