From d906d5aef8409d6b1872ffefd1b64ea47511fee4 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 14 Apr 2020 00:51:38 +0200 Subject: [PATCH] boards/mcb2388: configure second SPI bus SPI0 will always clash with the pins of the LCD display, so if we want to use both SPI and the display we need to use SPI1. --- boards/mcb2388/include/periph_conf.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/boards/mcb2388/include/periph_conf.h b/boards/mcb2388/include/periph_conf.h index ef37190cad..a785f2e7b6 100644 --- a/boards/mcb2388/include/periph_conf.h +++ b/boards/mcb2388/include/periph_conf.h @@ -20,6 +20,7 @@ #define PERIPH_CONF_H #include "periph_cpu.h" +#include "kernel_defines.h" #ifdef __cplusplus extern "C" { @@ -83,9 +84,18 @@ static const spi_conf_t spi_config[] = { .pinsel_msk_miso = (BIT14 | BIT15), /* P1.23 */ .pinsel_msk_clk = (BIT8 | BIT9), /* P1.20 */ }, + { + .dev = SPI1, + .pinsel_mosi = 0, + .pinsel_miso = 0, + .pinsel_clk = 0, + .pinsel_msk_mosi = (BIT19), /* P0.9 */ + .pinsel_msk_miso = (BIT17), /* P0.8 */ + .pinsel_msk_clk = (BIT15), /* P0.7 */ + }, }; -#define SPI_NUMOF (1) +#define SPI_NUMOF ARRAY_SIZE(spi_config) /** @} */ /**