nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ NRF_MODEM_LIB_ON_INIT

#define NRF_MODEM_LIB_ON_INIT ( name,
_callback,
_context )

#include <include/modem/nrf_modem_lib.h>

Value:
static void _callback(int ret, void *ctx); \
STRUCT_SECTION_ITERABLE(nrf_modem_lib_init_cb, nrf_modem_hook_##name) = { \
.callback = _callback, \
.context = _context, \
};
Modem library initialization callback struct.
Definition nrf_modem_lib.h:109

Define a callback for nrf_modem_lib_init calls.

The callback function _callback is invoked after the library has been initialized.

Note
The NRF_MODEM_LIB_ON_INIT callback can be used to perform modem and library configurations that require the modem to be turned on in offline mode. It cannot be used to change the modem functional mode. Calls to lte_lc_connect and CFUN AT calls are not allowed, and must be done after nrf_modem_lib_init has returned. If a library needs to perform operations after the link is up, it can subscribe to a NRF_MODEM_LIB_ON_CFUN callback.
Parameters
nameCallback name
_callbackCallback function name
_contextUser-defined context for the callback