aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/spi.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-09-16 11:45:36 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-10-23 21:19:03 -0400
commit2c535106ee5bbbcc019cb0820d1a5fcf0639eb9e (patch)
treea3a3cbf9f03ab5ed0b2d63600ed205561796ee27 /src/stm32/spi.c
parent7e090a996a85016b2e72fa5d426ba95fe8bdc703 (diff)
downloadkutter-2c535106ee5bbbcc019cb0820d1a5fcf0639eb9e.tar.gz
kutter-2c535106ee5bbbcc019cb0820d1a5fcf0639eb9e.tar.xz
kutter-2c535106ee5bbbcc019cb0820d1a5fcf0639eb9e.zip
stm32: Initial support for stm32f070
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32/spi.c')
-rw-r--r--src/stm32/spi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stm32/spi.c b/src/stm32/spi.c
index 1b6d8606..5aa19e33 100644
--- a/src/stm32/spi.c
+++ b/src/stm32/spi.c
@@ -27,9 +27,11 @@ DECL_CONSTANT_STR("BUS_PINS_spi3a", "PC11,PC12,PC10");
#endif
#endif
+#define SPI_FUNCTION GPIO_FUNCTION(CONFIG_MACH_STM32F0 ? 0 : 5)
+
static const struct spi_info spi_bus[] = {
- { SPI2, GPIO('B', 14), GPIO('B', 15), GPIO('B', 13), GPIO_FUNCTION(5) },
- { SPI1, GPIO('A', 6), GPIO('A', 7), GPIO('A', 5), GPIO_FUNCTION(5) },
+ { SPI2, GPIO('B', 14), GPIO('B', 15), GPIO('B', 13), SPI_FUNCTION },
+ { SPI1, GPIO('A', 6), GPIO('A', 7), GPIO('A', 5), SPI_FUNCTION },
#ifdef SPI3
{ SPI3, GPIO('B', 4), GPIO('B', 5), GPIO('B', 3), GPIO_FUNCTION(6) },
#if CONFIG_MACH_STM32F4