![]() |
nrfxlib API 3.4.99
|
| nrf_scan_error_t nrf_scan_init | ( | nrf_scan_t const * | p_scan, |
| nrf_scan_event_handler_t | handler, | ||
| void * | p_context ) |
#include <nrf_scan.h>
Initialize the sCAN driver for a given instance.
| [in] | p_scan | Pointer to the sCAN driver instance to initialize. |
| [in] | handler | Event handler callback function. |
| [in] | p_context | User context passed to the event handler. |
| NRF_SCAN_SUCCESS | Initialization successful. |
| NRF_SCAN_UNSUPPORTED | feature unsupported. |
| NRF_SCAN_ERROR_INVALID_PARAM | Invalid or NULL parameter provided. |
| NRF_SCAN_ERROR_INVALID_STATE | nrfx driver state is invalid. |
| NRF_SCAN_ERROR_BUSY | sCAN driver is busy |
SPSYNC.DPPIMAP register while starting, and this driver resets the matching host-side state. Anything published with nrf_scan_dppi_role_map_set or nrf_scan_dppi_subscribe_enable therefore does not survive an uninit/init cycle and has to be published again afterwards, before the first request. Nothing has to be undone before uninit.