diff --git a/boards/rpi-pico/Kconfig b/boards/rpi-pico/Kconfig index dd6e0d4141..c83fc56a7e 100644 --- a/boards/rpi-pico/Kconfig +++ b/boards/rpi-pico/Kconfig @@ -14,5 +14,6 @@ config BOARD_RPI_PICO select CPU_MODEL_RP2040 select HAS_PERIPH_ADC select HAS_PERIPH_UART + select HAS_PERIPH_SPI select HAVE_SAUL_GPIO diff --git a/boards/rpi-pico/Makefile.features b/boards/rpi-pico/Makefile.features index 57455378e5..a8ac488425 100644 --- a/boards/rpi-pico/Makefile.features +++ b/boards/rpi-pico/Makefile.features @@ -2,5 +2,6 @@ CPU := rpx0xx # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_adc +FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart diff --git a/boards/rpi-pico/include/periph_conf.h b/boards/rpi-pico/include/periph_conf.h index d8f99513cc..aff1c49a3a 100644 --- a/boards/rpi-pico/include/periph_conf.h +++ b/boards/rpi-pico/include/periph_conf.h @@ -48,6 +48,23 @@ static const uart_conf_t uart_config[] = { #define UART_NUMOF ARRAY_SIZE(uart_config) +static const spi_conf_t spi_config[] = { + { + .dev = SPI0, + .miso_pin = GPIO_PIN(0, 4), + .mosi_pin = GPIO_PIN(0, 3), + .clk_pin = GPIO_PIN(0, 2) + }, + { + .dev = SPI1, + .miso_pin = GPIO_PIN(0, 12), + .mosi_pin = GPIO_PIN(0, 11), + .clk_pin = GPIO_PIN(0, 10) + } +}; + +#define SPI_NUMOF ARRAY_SIZE(spi_config) + static const timer_channel_conf_t timer0_channel_config[] = { { .irqn = TIMER_IRQ_0_IRQn