Hi all,
I wrote a nice library for using an offboard SPI flash chip and am now trying to port it to our master code which runs on freertos.. I wrote the library starting with the spi example in the sdk15.. and it works great. I did this because the freertos code that we already have is built on sdk15 and I thought it would be simple to port.. anyways I keep getting this 'NRF_DRV_SPI_INSTANCE_0 undeclared here' error in nrf_drv_spi.h even though I think I've set up sdk.config exactly the same(with respect to spi) as in the example.. I've spent a lot of time playing with the definitions in sdk_config, commenting and uncommenting and re-defining the sections for mspi, spi, and nrfx_spi... to no avail..
it almost seems as if the sdk_config doesen't affect the defines in_nrf_drv_spi.h.. I am looking at the lines in nrf_drv_spi.h.. I can't seem to get the bottom 3 lines to be black..
***************************************************************************************
#define NRF_DRV_SPI_INSTANCE(id) NRF_DRV_SPI_INSTANCE_(id)
#define NRF_DRV_SPI_INSTANCE_(id) NRF_DRV_SPI_INSTANCE_ ## id
/*colin If I add this in here, the bottom becomes defined, but I enter a whole other pool of undefined errors.. this is not how I'm supposed to do this...
#define NRF_DRV_SPI_INSTANCE_0 \
{ 0, { .spim = NRFX_SPIM_INSTANCE(0) }, true }
//end colin*/
#if NRFX_CHECK(NRFX_SPIM0_ENABLED)
#define NRF_DRV_SPI_INSTANCE_0 \
{ 0, { .spim = NRFX_SPIM_INSTANCE(0) }, true }
****************************************************************************************
I've seen a bunch of people on here with the same or similar error.. it's got something to do with the new spi stuff... I just don't really know what the 'propper' way to do this is...
I'm including my sdk config as a seperate (obnoxiously long) file...
Any addvice appreciated.. spent a while on this one.. ;)
thx-colin