Bare Metal scheduler
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 CONFIG_BM_SCHEDULER Kconfig option to enable the library.
Use the 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 bm_scheduler_defer() function to schedule an event for later execution in the main thread.
To process these deferred events, call the bm_scheduler_process() function regularly in the main application loop.
Dependencies
This library has the following dependencies:
Kernel memory pool -
CONFIG_KERNEL_MEM_POOL
API documentation
include/bm/bm_scheduler.hlib/bm_scheduler/