diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-01-23 11:15:07 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-01-23 11:36:28 -0500 |
commit | c8a93cb3bffbb01eaae5afbb46b6f4c7df81ec2d (patch) | |
tree | 98648ee410cb59ed03579194c09270a250db826c | |
parent | 0cd4d5d5ea4617e093319d694ae6f1692d021a6c (diff) | |
download | kutter-c8a93cb3bffbb01eaae5afbb46b6f4c7df81ec2d.tar.gz kutter-c8a93cb3bffbb01eaae5afbb46b6f4c7df81ec2d.tar.xz kutter-c8a93cb3bffbb01eaae5afbb46b6f4c7df81ec2d.zip |
stm32: Don't export spi1a/spi2a on stm32f1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/stm32/spi.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/stm32/spi.c b/src/stm32/spi.c index 419c264a..90d71ffe 100644 --- a/src/stm32/spi.c +++ b/src/stm32/spi.c @@ -17,12 +17,14 @@ struct spi_info { DECL_ENUMERATION("spi_bus", "spi2", 0); DECL_CONSTANT_STR("BUS_PINS_spi2", "PB14,PB15,PB13"); -DECL_ENUMERATION("spi_bus", "spi2a", 1); -DECL_CONSTANT_STR("BUS_PINS_spi2a", "PC2,PC3,PB10"); -DECL_ENUMERATION("spi_bus", "spi1", 2); +DECL_ENUMERATION("spi_bus", "spi1", 1); DECL_CONSTANT_STR("BUS_PINS_spi1", "PA6,PA7,PA5"); +#if CONFIG_MACH_STM32F0 || CONFIG_MACH_STM32F4 +DECL_ENUMERATION("spi_bus", "spi2a", 2); +DECL_CONSTANT_STR("BUS_PINS_spi2a", "PC2,PC3,PB10"); DECL_ENUMERATION("spi_bus", "spi1a", 3); DECL_CONSTANT_STR("BUS_PINS_spi1a", "PB4,PB5,PB3"); +#endif #ifdef SPI3 DECL_ENUMERATION("spi_bus", "spi3", 4); DECL_CONSTANT_STR("BUS_PINS_spi3", "PB4,PB5,PB3"); @@ -36,8 +38,8 @@ DECL_CONSTANT_STR("BUS_PINS_spi3a", "PC11,PC12,PC10"); static const struct spi_info spi_bus[] = { { SPI2, GPIO('B', 14), GPIO('B', 15), GPIO('B', 13), SPI_FUNCTION }, - { SPI2, GPIO('C', 2), GPIO('C', 3), GPIO('B', 10), SPI_FUNCTION }, { SPI1, GPIO('A', 6), GPIO('A', 7), GPIO('A', 5), SPI_FUNCTION }, + { SPI2, GPIO('C', 2), GPIO('C', 3), GPIO('B', 10), SPI_FUNCTION }, { SPI1, GPIO('B', 4), GPIO('B', 5), GPIO('B', 3), SPI_FUNCTION }, #ifdef SPI3 { SPI3, GPIO('B', 4), GPIO('B', 5), GPIO('B', 3), GPIO_FUNCTION(6) }, |