![]() |
nRF Connect SDK Bare Metal API 2.0.99
|
| int bm_scheduler_defer | ( | bm_scheduler_fn_t | handler, |
| void * | data, | ||
| size_t | len ) |
#include <bm_scheduler.h>
Schedule an event for execution in the main thread.
This function can be called from an ISR to defer code execution to the main thread.
| handler | Event handler. |
| data | Event data. |
| len | Event data length. |
| 0 | On success. |
| -EFAULT | handler is NULL. |
| -EINVAL | Invalid data and len combination. |
| -ENOMEM | No memory to schedule this event. |