summaryrefslogtreecommitdiff
path: root/src/stmf0/ao_spi_stm.c
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2017-04-24 18:22:03 -0600
committerBdale Garbee <bdale@gag.com>2017-04-24 18:22:03 -0600
commitb91f67005709cb7f65e0a461b49b5cb0952cb391 (patch)
treee9f6c0f30a81cf30a9cfd52887171168f7830f85 /src/stmf0/ao_spi_stm.c
parent1e956f93e0c9f8ed6180490f80e8aead5538f818 (diff)
parent8a10ddb0bca7d6f6aa4aedda171899abd165fd74 (diff)
Merge branch 'branch-1.7' into debian
Diffstat (limited to 'src/stmf0/ao_spi_stm.c')
-rw-r--r--src/stmf0/ao_spi_stm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stmf0/ao_spi_stm.c b/src/stmf0/ao_spi_stm.c
index 0448ad8c..5e76d6c3 100644
--- a/src/stmf0/ao_spi_stm.c
+++ b/src/stmf0/ao_spi_stm.c
@@ -536,12 +536,18 @@ void
ao_spi_init(void)
{
#if HAS_SPI_1
+#ifndef SPI_1_PA5_PA6_PA7
+#error SPI_1_PA5_PA6_PA7 undefined
+#endif
# if SPI_1_PA5_PA6_PA7
stm_rcc.ahbenr |= (1 << STM_RCC_AHBENR_IOPAEN);
stm_ospeedr_set(&stm_gpioa, 5, SPI_1_OSPEEDR);
stm_ospeedr_set(&stm_gpioa, 6, SPI_1_OSPEEDR);
stm_ospeedr_set(&stm_gpioa, 7, SPI_1_OSPEEDR);
# endif
+# ifndef SPI_1_PB3_PB4_PB5
+# error SPI_1_PB3_PB4_PB5 undefined
+# endif
# if SPI_1_PB3_PB4_PB5
stm_rcc.ahbenr |= (1 << STM_RCC_AHBENR_IOPBEN);
stm_ospeedr_set(&stm_gpiob, 3, SPI_1_OSPEEDR);