This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52 SDK SPIS Example SPIS INSTANCE config

Hi, 

As mentioned in the subject, I am confused with the SPIS example from nRF52 SDK 15.3.0. I wonder where NRFX_SPIS and _INST_IDX are defined in the header file?

SPIS example main.c:

static const nrf_drv_spis_t spis = NRF_DRV_SPIS_INSTANCE(SPIS_INSTANCE);

from the above code, refering to the macro NRF_DRV_SPIS(param) --> 

/** @brief Macro for forwarding the new implementation. */
#define NRF_DRV_SPIS_INSTANCE   NRFX_SPIS_INSTANCE

from the above macro again refering to the macro NRFX_SPIS_INSTANCE

/** @brief Macro for creating an SPI slave driver instance. */
#define NRFX_SPIS_INSTANCE(id) \
{ \
.p_reg = NRFX_CONCAT_2(NRF_SPIS, id), \
.drv_inst_idx = NRFX_CONCAT_3(NRFX_SPIS, id, _INST_IDX), \
}

My question where NRFX_SPIS and _INST_IDX are defined in the header file?

I tried finding it in code, documentation and online with no luck.

So Kindly provide some insightful suggestion in this matter!

Appreciate help!

Parents Reply Children
Related