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

SPI_MASTER_0 not defined

My code is attached but essentially it is saying that SPI_MASTER_0 is not defined when I compile. I have the line:

#define SPI_MASTER_0_ENABLE /**< Enable SPI_MASTER_0 */

included which I believe defines SPI_MASTER_0 according to the spec. The code included is essentially copy-and-pasted out of the "spi master example" included with the SDK 6.1.0 and softdevice S110.

I am including spi_master.h.

partial_code.c

I am guessing I am doing something dumb that I am simply over looking but I can't seem to find it. Does anyone has any suggestions?

I did notice that in the gcc examples you must include a flag like this:

CFLAGS += -DSPI_MASTER_0_ENABLE -DSPI_MASTER_1_ENABLE

Is this true for the Keil examples? How would you do that? I am guessing I am not including the .h file that defines SPI_MASTER_0. It seems like spi_master.h but the compiled doesn't seem to agree.

Related