aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-02-12 17:31:32 -0500
committerKevin O'Connor <kevin@koconnor.net>2021-02-12 17:32:54 -0500
commitfc783f9b8350aa0eda3b8de8e5697c1b3ea449e4 (patch)
tree6e1e74d88df1c7fed008ab504f555156b5af8be5 /src
parent6698b249cebfd31b8c0e63e15199794c35e29ce6 (diff)
downloadkutter-fc783f9b8350aa0eda3b8de8e5697c1b3ea449e4.tar.gz
kutter-fc783f9b8350aa0eda3b8de8e5697c1b3ea449e4.tar.xz
kutter-fc783f9b8350aa0eda3b8de8e5697c1b3ea449e4.zip
stm32: Add support for spi bus on stm32f407 pins PI2,PI3,PI1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r--src/stm32/spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stm32/spi.c b/src/stm32/spi.c
index cdc57341..3e9ba71a 100644
--- a/src/stm32/spi.c
+++ b/src/stm32/spi.c
@@ -34,6 +34,9 @@ DECL_CONSTANT_STR("BUS_PINS_spi1", "PA6,PA7,PA5");
#ifdef SPI4
DECL_ENUMERATION("spi_bus", "spi4", 6);
DECL_CONSTANT_STR("BUS_PINS_spi4", "PE13,PE14,PE12");
+ #elif defined(GPIOI)
+ DECL_ENUMERATION("spi_bus", "spi2b", 6);
+ DECL_CONSTANT_STR("BUS_PINS_spi2b", "PI2,PI3,PI1");
#endif
#endif
#endif
@@ -51,6 +54,8 @@ static const struct spi_info spi_bus[] = {
{ SPI3, GPIO('C', 11), GPIO('C', 12), GPIO('C', 10), GPIO_FUNCTION(6) },
#ifdef SPI4
{ SPI4, GPIO('E', 13), GPIO('E', 14), GPIO('E', 12), GPIO_FUNCTION(5) },
+ #elif defined(GPIOI)
+ { SPI2, GPIO('I', 2), GPIO('I', 3), GPIO('I', 1), GPIO_FUNCTION(5) },
#endif
#endif
#endif