mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/rpi-pico: add spi config
This commit is contained in:
parent
6353181c74
commit
776820695e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user