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

◆ bm_spi_mngr_init()

int bm_spi_mngr_init ( struct bm_spi_mngr * mgr,
const nrfx_spim_config_t * default_spim_cfg )

#include <bm_spi_mngr.h>

Initialize the SPI manager and the underlying SPIM driver.

Initializes the transaction queue and calls nrfx_spim_init with the internal event handler. On success, clears the current transaction pointer and stores this SPIM configuration.

Parameters
[in]mgrManager instance to initialize.
[in]default_spim_cfgPointer to the SPIM driver configuration. This configuration will be used whenever the scheduled transaction has required_spim_cfg set to NULL.
Return values
0On success.
-EFAULTIf mgr, default_spim_cfg, the queue, or its buffer is NULL.
-EINVALIf the queue size is zero.
Returns
Negative error code from nrfx_spim_init on failure.