Looking at
\NORDIC\SDK\examples\peripheral\spi\pca10040\blank\config\sdk_config.h
These lines repeat over and over. Was there a reason for this? The first time the infdef runs it'll define a value, then the rest will get ignored. Is this just a sloppy copy and paste job - or is there something else going on here?
#ifndef SPI_MISO_PIN
#define SPI_MISO_PIN 28
#endif
...
#ifndef SPI_MISO_PIN
#define SPI_MISO_PIN 31
#endif
...
#ifndef SPI_MISO_PIN
#define SPI_MISO_PIN 31
#endif
...
<occurs a total of 9 times in the same file>