diff --git a/boards/b-l072z-lrwan1/include/periph_conf.h b/boards/b-l072z-lrwan1/include/periph_conf.h index 7329dad3f8..82a4ded2b7 100644 --- a/boards/b-l072z-lrwan1/include/periph_conf.h +++ b/boards/b-l072z-lrwan1/include/periph_conf.h @@ -127,7 +127,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1, #ifdef MODULE_PERIPH_DMA @@ -143,7 +146,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_B, 3), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2, #ifdef MODULE_PERIPH_DMA diff --git a/boards/b-l475e-iot01a/include/periph_conf.h b/boards/b-l475e-iot01a/include/periph_conf.h index 674c5cfeec..2d05cd4556 100644 --- a/boards/b-l475e-iot01a/include/periph_conf.h +++ b/boards/b-l475e-iot01a/include/periph_conf.h @@ -206,7 +206,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2, #ifdef MODULE_PERIPH_DMA diff --git a/boards/i-nucleo-lrwan1/include/periph_conf.h b/boards/i-nucleo-lrwan1/include/periph_conf.h index a7fd36791f..576d2a505b 100644 --- a/boards/i-nucleo-lrwan1/include/periph_conf.h +++ b/boards/i-nucleo-lrwan1/include/periph_conf.h @@ -83,7 +83,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_B, 3), .cs_pin = GPIO_PIN(PORT_A, 15), - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2, }, diff --git a/boards/limifrog-v1/include/periph_conf.h b/boards/limifrog-v1/include/periph_conf.h index b85d36527d..e06b41bd80 100644 --- a/boards/limifrog-v1/include/periph_conf.h +++ b/boards/limifrog-v1/include/periph_conf.h @@ -132,7 +132,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -142,7 +145,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_B, 3), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF6, + .mosi_af = GPIO_AF6, + .miso_af = GPIO_AF6, + .sclk_af = GPIO_AF6, + .cs_af = GPIO_AF6, .rccmask = RCC_APB1ENR_SPI3EN, .apbbus = APB1 } diff --git a/boards/lobaro-lorabox/include/periph_conf.h b/boards/lobaro-lorabox/include/periph_conf.h index 0bebb1f232..4417523298 100644 --- a/boards/lobaro-lorabox/include/periph_conf.h +++ b/boards/lobaro-lorabox/include/periph_conf.h @@ -142,7 +142,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_B, 0), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -152,7 +155,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 15), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_PIN(PORT_B, 12), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 } diff --git a/boards/lsn50/include/periph_conf.h b/boards/lsn50/include/periph_conf.h index cebe8d2d7b..d10f2de99b 100644 --- a/boards/lsn50/include/periph_conf.h +++ b/boards/lsn50/include/periph_conf.h @@ -126,7 +126,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2, #ifdef MODULE_PERIPH_DMA diff --git a/boards/msbiot/include/periph_conf.h b/boards/msbiot/include/periph_conf.h index 43d7689d5a..e6fbf4a144 100644 --- a/boards/msbiot/include/periph_conf.h +++ b/boards/msbiot/include/periph_conf.h @@ -173,7 +173,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f030r8/include/periph_conf.h b/boards/nucleo-f030r8/include/periph_conf.h index 860a2c89ed..62573cd378 100644 --- a/boards/nucleo-f030r8/include/periph_conf.h +++ b/boards/nucleo-f030r8/include/periph_conf.h @@ -168,7 +168,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -178,7 +181,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_PIN(PORT_B, 12), - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 }, diff --git a/boards/nucleo-f031k6/include/periph_conf.h b/boards/nucleo-f031k6/include/periph_conf.h index 53f1b81fb5..65f5d01ecf 100644 --- a/boards/nucleo-f031k6/include/periph_conf.h +++ b/boards/nucleo-f031k6/include/periph_conf.h @@ -148,7 +148,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_B, 3), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f042k6/include/periph_conf.h b/boards/nucleo-f042k6/include/periph_conf.h index 18d14eaa50..f0d3edf9f9 100644 --- a/boards/nucleo-f042k6/include/periph_conf.h +++ b/boards/nucleo-f042k6/include/periph_conf.h @@ -158,7 +158,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_B, 3), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f072rb/include/periph_conf.h b/boards/nucleo-f072rb/include/periph_conf.h index 37bda70182..d833f07563 100644 --- a/boards/nucleo-f072rb/include/periph_conf.h +++ b/boards/nucleo-f072rb/include/periph_conf.h @@ -189,7 +189,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -199,7 +202,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_PIN(PORT_B, 12), - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 }, diff --git a/boards/nucleo-f091rc/include/periph_conf.h b/boards/nucleo-f091rc/include/periph_conf.h index cfd67f1d37..465fd154c6 100644 --- a/boards/nucleo-f091rc/include/periph_conf.h +++ b/boards/nucleo-f091rc/include/periph_conf.h @@ -177,7 +177,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_B, 6), - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2, #ifdef MODULE_PERIPH_DMA diff --git a/boards/nucleo-f207zg/include/periph_conf.h b/boards/nucleo-f207zg/include/periph_conf.h index 5c55811445..3bdc1a4895 100644 --- a/boards/nucleo-f207zg/include/periph_conf.h +++ b/boards/nucleo-f207zg/include/periph_conf.h @@ -198,7 +198,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2, #ifdef MODULE_PERIPH_DMA @@ -214,7 +217,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_C, 2), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_PIN(PORT_B, 12), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1, #ifdef MODULE_PERIPH_DMA diff --git a/boards/nucleo-f302r8/include/periph_conf.h b/boards/nucleo-f302r8/include/periph_conf.h index 2b79633a95..f9cb53ce49 100644 --- a/boards/nucleo-f302r8/include/periph_conf.h +++ b/boards/nucleo-f302r8/include/periph_conf.h @@ -154,7 +154,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_PIN(PORT_B, 12), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 } diff --git a/boards/nucleo-f303k8/include/periph_conf.h b/boards/nucleo-f303k8/include/periph_conf.h index b6c2696563..4f8277ee4b 100644 --- a/boards/nucleo-f303k8/include/periph_conf.h +++ b/boards/nucleo-f303k8/include/periph_conf.h @@ -149,7 +149,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_B, 3), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f303re/include/periph_conf.h b/boards/nucleo-f303re/include/periph_conf.h index 190b5246a4..781c8a73cd 100644 --- a/boards/nucleo-f303re/include/periph_conf.h +++ b/boards/nucleo-f303re/include/periph_conf.h @@ -152,7 +152,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -162,7 +165,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_PIN(PORT_B, 12), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 }, @@ -172,7 +178,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_C, 11), .sclk_pin = GPIO_PIN(PORT_C, 10), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF6, + .mosi_af = GPIO_AF6, + .miso_af = GPIO_AF6, + .sclk_af = GPIO_AF6, + .cs_af = GPIO_AF6, .rccmask = RCC_APB1ENR_SPI3EN, .apbbus = APB1 } diff --git a/boards/nucleo-f303ze/include/periph_conf.h b/boards/nucleo-f303ze/include/periph_conf.h index b6d5221def..18123243c6 100644 --- a/boards/nucleo-f303ze/include/periph_conf.h +++ b/boards/nucleo-f303ze/include/periph_conf.h @@ -175,7 +175,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f334r8/include/periph_conf.h b/boards/nucleo-f334r8/include/periph_conf.h index b5e938a540..260e9aee9a 100644 --- a/boards/nucleo-f334r8/include/periph_conf.h +++ b/boards/nucleo-f334r8/include/periph_conf.h @@ -151,7 +151,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f401re/include/periph_conf.h b/boards/nucleo-f401re/include/periph_conf.h index 054eba67eb..2a6d9ef330 100644 --- a/boards/nucleo-f401re/include/periph_conf.h +++ b/boards/nucleo-f401re/include/periph_conf.h @@ -171,7 +171,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -181,7 +184,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_PIN(PORT_B, 12), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 }, @@ -191,7 +197,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_C, 11), .sclk_pin = GPIO_PIN(PORT_C, 10), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF6, + .mosi_af = GPIO_AF6, + .miso_af = GPIO_AF6, + .sclk_af = GPIO_AF6, + .cs_af = GPIO_AF6, .rccmask = RCC_APB1ENR_SPI3EN, .apbbus = APB1 } diff --git a/boards/nucleo-f410rb/include/periph_conf.h b/boards/nucleo-f410rb/include/periph_conf.h index 66f769232b..99f909c293 100644 --- a/boards/nucleo-f410rb/include/periph_conf.h +++ b/boards/nucleo-f410rb/include/periph_conf.h @@ -120,7 +120,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f411re/include/periph_conf.h b/boards/nucleo-f411re/include/periph_conf.h index d281189f6c..afc37c1e1c 100644 --- a/boards/nucleo-f411re/include/periph_conf.h +++ b/boards/nucleo-f411re/include/periph_conf.h @@ -149,7 +149,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f412zg/include/periph_conf.h b/boards/nucleo-f412zg/include/periph_conf.h index 757c24529e..c2ce73dedd 100644 --- a/boards/nucleo-f412zg/include/periph_conf.h +++ b/boards/nucleo-f412zg/include/periph_conf.h @@ -150,7 +150,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f413zh/include/periph_conf.h b/boards/nucleo-f413zh/include/periph_conf.h index a025f0bb5c..309b748923 100644 --- a/boards/nucleo-f413zh/include/periph_conf.h +++ b/boards/nucleo-f413zh/include/periph_conf.h @@ -173,7 +173,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2, #ifdef MODULE_PERIPH_DMA diff --git a/boards/nucleo-f429zi/include/periph_conf.h b/boards/nucleo-f429zi/include/periph_conf.h index c73b3459f0..bd6f165774 100644 --- a/boards/nucleo-f429zi/include/periph_conf.h +++ b/boards/nucleo-f429zi/include/periph_conf.h @@ -129,7 +129,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f446re/include/periph_conf.h b/boards/nucleo-f446re/include/periph_conf.h index 6a73b74a14..8db62f3a5d 100644 --- a/boards/nucleo-f446re/include/periph_conf.h +++ b/boards/nucleo-f446re/include/periph_conf.h @@ -165,7 +165,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -175,7 +178,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_PIN(PORT_B, 12), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 }, @@ -185,7 +191,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_C, 11), .sclk_pin = GPIO_PIN(PORT_C, 10), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF6, + .mosi_af = GPIO_AF6, + .miso_af = GPIO_AF6, + .sclk_af = GPIO_AF6, + .cs_af = GPIO_AF6, .rccmask = RCC_APB1ENR_SPI3EN, .apbbus = APB1 } diff --git a/boards/nucleo-f446ze/include/periph_conf.h b/boards/nucleo-f446ze/include/periph_conf.h index 240d21db6f..70bfcf2c35 100644 --- a/boards/nucleo-f446ze/include/periph_conf.h +++ b/boards/nucleo-f446ze/include/periph_conf.h @@ -129,7 +129,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-f767zi/include/periph_conf.h b/boards/nucleo-f767zi/include/periph_conf.h index 1c73de25c0..2404f4707a 100644 --- a/boards/nucleo-f767zi/include/periph_conf.h +++ b/boards/nucleo-f767zi/include/periph_conf.h @@ -121,7 +121,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -131,7 +134,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_E, 5), .sclk_pin = GPIO_PIN(PORT_E, 2), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI4EN, .apbbus = APB2 } diff --git a/boards/nucleo-l031k6/include/periph_conf.h b/boards/nucleo-l031k6/include/periph_conf.h index 944c3faad5..37bbe9e2df 100644 --- a/boards/nucleo-l031k6/include/periph_conf.h +++ b/boards/nucleo-l031k6/include/periph_conf.h @@ -103,7 +103,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_B, 3), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-l053r8/include/periph_conf.h b/boards/nucleo-l053r8/include/periph_conf.h index 03c8f03fa5..863a16a97b 100644 --- a/boards/nucleo-l053r8/include/periph_conf.h +++ b/boards/nucleo-l053r8/include/periph_conf.h @@ -118,7 +118,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-l073rz/include/periph_conf.h b/boards/nucleo-l073rz/include/periph_conf.h index 9b19df328d..ebb2b0dc3b 100644 --- a/boards/nucleo-l073rz/include/periph_conf.h +++ b/boards/nucleo-l073rz/include/periph_conf.h @@ -136,7 +136,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-l152re/include/periph_conf.h b/boards/nucleo-l152re/include/periph_conf.h index f20fc1d65e..8b81b69e35 100644 --- a/boards/nucleo-l152re/include/periph_conf.h +++ b/boards/nucleo-l152re/include/periph_conf.h @@ -199,7 +199,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2, #ifdef MODULE_PERIPH_DMA diff --git a/boards/nucleo-l432kc/include/periph_conf.h b/boards/nucleo-l432kc/include/periph_conf.h index 6258cde51b..de24a43f8d 100644 --- a/boards/nucleo-l432kc/include/periph_conf.h +++ b/boards/nucleo-l432kc/include/periph_conf.h @@ -162,7 +162,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_B, 3), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-l433rc/include/periph_conf.h b/boards/nucleo-l433rc/include/periph_conf.h index 13b3a94f42..5b858a5639 100644 --- a/boards/nucleo-l433rc/include/periph_conf.h +++ b/boards/nucleo-l433rc/include/periph_conf.h @@ -174,7 +174,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB1ENR1_SPI2EN, .apbbus = APB1 } diff --git a/boards/nucleo-l452re/include/periph_conf.h b/boards/nucleo-l452re/include/periph_conf.h index 5bc7252fd8..53cb47e21a 100644 --- a/boards/nucleo-l452re/include/periph_conf.h +++ b/boards/nucleo-l452re/include/periph_conf.h @@ -175,7 +175,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, diff --git a/boards/nucleo-l476rg/include/periph_conf.h b/boards/nucleo-l476rg/include/periph_conf.h index a61bb2ca1e..37a2b40c24 100644 --- a/boards/nucleo-l476rg/include/periph_conf.h +++ b/boards/nucleo-l476rg/include/periph_conf.h @@ -262,7 +262,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2, #ifdef MODULE_PERIPH_DMA diff --git a/boards/nucleo-l496zg/include/periph_conf.h b/boards/nucleo-l496zg/include/periph_conf.h index ee75247367..72d0870d4c 100644 --- a/boards/nucleo-l496zg/include/periph_conf.h +++ b/boards/nucleo-l496zg/include/periph_conf.h @@ -212,7 +212,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nucleo-l4r5zi/include/periph_conf.h b/boards/nucleo-l4r5zi/include/periph_conf.h index fbf0a15588..adeaaab78f 100644 --- a/boards/nucleo-l4r5zi/include/periph_conf.h +++ b/boards/nucleo-l4r5zi/include/periph_conf.h @@ -159,7 +159,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/nz32-sc151/include/periph_conf.h b/boards/nz32-sc151/include/periph_conf.h index d2b6f87587..d635f7ab8a 100644 --- a/boards/nz32-sc151/include/periph_conf.h +++ b/boards/nz32-sc151/include/periph_conf.h @@ -145,7 +145,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_B, 3), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -155,7 +158,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 }, @@ -165,7 +171,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_C, 11), .sclk_pin = GPIO_PIN(PORT_C, 10), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF6, + .mosi_af = GPIO_AF6, + .miso_af = GPIO_AF6, + .sclk_af = GPIO_AF6, + .cs_af = GPIO_AF6, .rccmask = RCC_APB1ENR_SPI3EN, .apbbus = APB1 } diff --git a/boards/p-l496g-cell02/include/periph_conf.h b/boards/p-l496g-cell02/include/periph_conf.h index 982a64215d..cd969a6341 100644 --- a/boards/p-l496g-cell02/include/periph_conf.h +++ b/boards/p-l496g-cell02/include/periph_conf.h @@ -193,7 +193,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 } diff --git a/boards/pyboard/include/periph_conf.h b/boards/pyboard/include/periph_conf.h index 46aa22ce11..b3a265f232 100644 --- a/boards/pyboard/include/periph_conf.h +++ b/boards/pyboard/include/periph_conf.h @@ -134,7 +134,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2, #ifdef MODULE_PERIPH_DMA diff --git a/boards/stm32f030f4-demo/include/periph_conf.h b/boards/stm32f030f4-demo/include/periph_conf.h index e02cf2f319..ac5548d42b 100644 --- a/boards/stm32f030f4-demo/include/periph_conf.h +++ b/boards/stm32f030f4-demo/include/periph_conf.h @@ -156,7 +156,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_B, 1), - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, diff --git a/boards/stm32f0discovery/include/periph_conf.h b/boards/stm32f0discovery/include/periph_conf.h index f2525adf51..e974581b09 100644 --- a/boards/stm32f0discovery/include/periph_conf.h +++ b/boards/stm32f0discovery/include/periph_conf.h @@ -152,7 +152,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -162,7 +165,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 } diff --git a/boards/stm32f3discovery/include/periph_conf.h b/boards/stm32f3discovery/include/periph_conf.h index 8b9afc56ed..674a50db99 100644 --- a/boards/stm32f3discovery/include/periph_conf.h +++ b/boards/stm32f3discovery/include/periph_conf.h @@ -186,7 +186,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -196,7 +199,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_C, 11), .sclk_pin = GPIO_PIN(PORT_C, 10), .cs_pin = GPIO_PIN(PORT_A, 15), - .af = GPIO_AF6, + .mosi_af = GPIO_AF6, + .miso_af = GPIO_AF6, + .sclk_af = GPIO_AF6, + .cs_af = GPIO_AF6, .rccmask = RCC_APB1ENR_SPI3EN, .apbbus = APB1 } diff --git a/boards/stm32f429i-disc1/include/periph_conf.h b/boards/stm32f429i-disc1/include/periph_conf.h index b3c2f26389..0e1b61145e 100644 --- a/boards/stm32f429i-disc1/include/periph_conf.h +++ b/boards/stm32f429i-disc1/include/periph_conf.h @@ -69,7 +69,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_F, 8), .sclk_pin = GPIO_PIN(PORT_F, 7), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI5EN, .apbbus = APB2 } diff --git a/boards/stm32f4discovery/include/periph_conf.h b/boards/stm32f4discovery/include/periph_conf.h index ba5fff2e56..547ef2c9b6 100644 --- a/boards/stm32f4discovery/include/periph_conf.h +++ b/boards/stm32f4discovery/include/periph_conf.h @@ -168,7 +168,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_A, 6), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_PIN(PORT_A, 4), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -178,7 +181,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_PIN(PORT_B, 12), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 } diff --git a/boards/stm32f723e-disco/include/periph_conf.h b/boards/stm32f723e-disco/include/periph_conf.h index 32a7620e4b..ca523f9d1f 100644 --- a/boards/stm32f723e-disco/include/periph_conf.h +++ b/boards/stm32f723e-disco/include/periph_conf.h @@ -210,7 +210,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_A, 5), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -220,7 +223,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_I, 2), .sclk_pin = GPIO_PIN(PORT_I, 1), .cs_pin = GPIO_PIN(PORT_I, 0), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 }, diff --git a/boards/stm32l0538-disco/include/periph_conf.h b/boards/stm32l0538-disco/include/periph_conf.h index 4a730b84d0..859590db88 100644 --- a/boards/stm32l0538-disco/include/periph_conf.h +++ b/boards/stm32l0538-disco/include/periph_conf.h @@ -124,7 +124,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 4), .sclk_pin = GPIO_PIN(PORT_B, 3), .cs_pin = GPIO_UNDEF, - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB2ENR_SPI1EN, .apbbus = APB2 }, @@ -134,7 +137,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_B, 14), .sclk_pin = GPIO_PIN(PORT_B, 13), .cs_pin = GPIO_PIN(PORT_B, 12), - .af = GPIO_AF0, + .mosi_af = GPIO_AF0, + .miso_af = GPIO_AF0, + .sclk_af = GPIO_AF0, + .cs_af = GPIO_AF0, .rccmask = RCC_APB1ENR_SPI2EN, .apbbus = APB1 }, diff --git a/boards/ublox-c030-u201/include/periph_conf.h b/boards/ublox-c030-u201/include/periph_conf.h index 8604274737..56b4b7aaf2 100644 --- a/boards/ublox-c030-u201/include/periph_conf.h +++ b/boards/ublox-c030-u201/include/periph_conf.h @@ -167,7 +167,10 @@ static const spi_conf_t spi_config[] = { .miso_pin = GPIO_PIN(PORT_E, 5), .sclk_pin = GPIO_PIN(PORT_E, 2), .cs_pin = GPIO_PIN(PORT_E, 11), - .af = GPIO_AF5, + .mosi_af = GPIO_AF5, + .miso_af = GPIO_AF5, + .sclk_af = GPIO_AF5, + .cs_af = GPIO_AF5, .rccmask = RCC_APB2ENR_SPI4EN, .apbbus = APB2 }, diff --git a/cpu/stm32_common/include/periph_cpu_common.h b/cpu/stm32_common/include/periph_cpu_common.h index f56759ff2c..2cc504cb47 100644 --- a/cpu/stm32_common/include/periph_cpu_common.h +++ b/cpu/stm32_common/include/periph_cpu_common.h @@ -489,7 +489,10 @@ typedef struct { gpio_t sclk_pin; /**< SCLK pin */ gpio_t cs_pin; /**< HWCS pin, set to GPIO_UNDEF if not mapped */ #ifndef CPU_FAM_STM32F1 - gpio_af_t af; /**< pin alternate function */ + gpio_af_t mosi_af; /**< MOSI pin alternate function */ + gpio_af_t miso_af; /**< MISO pin alternate function */ + gpio_af_t sclk_af; /**< SCLK pin alternate function */ + gpio_af_t cs_af; /**< HWCS pin alternate function */ #endif uint32_t rccmask; /**< bit in the RCC peripheral enable register */ uint8_t apbbus; /**< APBx bus the device is connected to */ diff --git a/cpu/stm32_common/periph/spi.c b/cpu/stm32_common/periph/spi.c index a3e873de72..ba09d3447f 100644 --- a/cpu/stm32_common/periph/spi.c +++ b/cpu/stm32_common/periph/spi.c @@ -81,9 +81,9 @@ void spi_init_pins(spi_t bus) gpio_init(spi_config[bus].mosi_pin, GPIO_OUT); gpio_init(spi_config[bus].miso_pin, GPIO_IN); gpio_init(spi_config[bus].sclk_pin, GPIO_OUT); - gpio_init_af(spi_config[bus].mosi_pin, spi_config[bus].af); - gpio_init_af(spi_config[bus].miso_pin, spi_config[bus].af); - gpio_init_af(spi_config[bus].sclk_pin, spi_config[bus].af); + gpio_init_af(spi_config[bus].mosi_pin, spi_config[bus].mosi_af); + gpio_init_af(spi_config[bus].miso_pin, spi_config[bus].miso_af); + gpio_init_af(spi_config[bus].sclk_pin, spi_config[bus].sclk_af); #endif } @@ -105,7 +105,7 @@ int spi_init_cs(spi_t bus, spi_cs_t cs) gpio_init_af(spi_config[bus].cs_pin, GPIO_AF_OUT_PP); #else gpio_init(spi_config[bus].cs_pin, GPIO_OUT); - gpio_init_af(spi_config[bus].cs_pin, spi_config[bus].af); + gpio_init_af(spi_config[bus].cs_pin, spi_config[bus].cs_af); #endif } else { @@ -130,9 +130,9 @@ int spi_init_with_gpio_mode(spi_t bus, spi_gpio_mode_t mode) ret += gpio_init(spi_config[bus].mosi_pin, mode.mosi); ret += gpio_init(spi_config[bus].miso_pin, mode.miso); ret += gpio_init(spi_config[bus].sclk_pin, mode.sclk); - gpio_init_af(spi_config[bus].mosi_pin, spi_config[bus].af); - gpio_init_af(spi_config[bus].miso_pin, spi_config[bus].af); - gpio_init_af(spi_config[bus].sclk_pin, spi_config[bus].af); + gpio_init_af(spi_config[bus].mosi_pin, spi_config[bus].mosi_af); + gpio_init_af(spi_config[bus].miso_pin, spi_config[bus].miso_af); + gpio_init_af(spi_config[bus].sclk_pin, spi_config[bus].sclk_af); return ret; #endif }