From c822f48789882cf73a929711443107a39889c85c Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 10 Apr 2019 16:43:16 +0200 Subject: [PATCH] boards/nrf52dk: Arduino-compatible SPI config Added a SPI config that allows using Arduino-Shields that use SPI via the Arduino-ICSP header --- boards/nrf52dk/include/periph_conf.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/boards/nrf52dk/include/periph_conf.h b/boards/nrf52dk/include/periph_conf.h index 23fd01a278..e41e3b4ba7 100644 --- a/boards/nrf52dk/include/periph_conf.h +++ b/boards/nrf52dk/include/periph_conf.h @@ -28,6 +28,21 @@ extern "C" { #endif +/** + * @name SPI configuration + * @{ + */ +static const spi_conf_t spi_config[] = { + { + .dev = NRF_SPI0, + .sclk = GPIO_PIN(0, 25), + .mosi = GPIO_PIN(0, 23), + .miso = GPIO_PIN(0, 24), + } +}; +#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0])) +/** @} */ + /** * @name UART configuration * @{