aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/spi.c
diff options
context:
space:
mode:
authorFrederic Morin <frederic.morin.8@gmail.com>2023-03-05 19:15:43 -0500
committerKevinOConnor <kevin@koconnor.net>2023-05-07 11:15:05 -0400
commit33b18fd62ba73c90054a7b94b68c341bb3f40d9a (patch)
tree8a2b11edeaa52ffffa2891412a5f7d6978b8f959 /src/stm32/spi.c
parenta3eebab4f2b90822f76de91487ff3d4158b80494 (diff)
downloadkutter-33b18fd62ba73c90054a7b94b68c341bb3f40d9a.tar.gz
kutter-33b18fd62ba73c90054a7b94b68c341bb3f40d9a.tar.xz
kutter-33b18fd62ba73c90054a7b94b68c341bb3f40d9a.zip
stm32f7: add support for stm32f7 and remram board
Signed-off-by: Frederic Morin <frederic.morin.8@gmail.com>
Diffstat (limited to 'src/stm32/spi.c')
-rw-r--r--src/stm32/spi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/stm32/spi.c b/src/stm32/spi.c
index 17a84232..709055c2 100644
--- a/src/stm32/spi.c
+++ b/src/stm32/spi.c
@@ -86,9 +86,10 @@ spi_setup(uint32_t bus, uint8_t mode, uint32_t rate)
gpio_peripheral(spi_bus[bus].mosi_pin, spi_bus[bus].function, 0);
gpio_peripheral(spi_bus[bus].sck_pin, spi_bus[bus].function, 0);
- // Configure CR2 on stm32 f0/g0/l4/g4
-#if CONFIG_MACH_STM32F0 || CONFIG_MACH_STM32G0 || CONFIG_MACH_STM32L4 \
- || CONFIG_MACH_STM32G4
+ // Configure CR2 on stm32 f0/f7/g0/l4/g4
+#if CONFIG_MACH_STM32F0 || CONFIG_MACH_STM32F7 || \
+ CONFIG_MACH_STM32G0 || CONFIG_MACH_STM32G4 || \
+ CONFIG_MACH_STM32L4
spi->CR2 = SPI_CR2_FRXTH | (7 << SPI_CR2_DS_Pos);
#endif
}