nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ bm_scheduler_defer()

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.

Parameters
handlerEvent handler.
dataEvent data.
lenEvent data length.
Return values
0On success.
-EFAULThandler is NULL.
-EINVALInvalid data and len combination.
-ENOMEMNo memory to schedule this event.