aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/stm32f2-f4/fsmc.c
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2015-03-02 23:57:13 -0800
committerbnewbold <bnewbold@robocracy.org>2015-03-03 00:15:30 -0800
commit9ffadc10ab4afe50833915e9c2df0c87a4ceb718 (patch)
treeac80a21a8367dcb124e55cfa7bd8dea5294c67b6 /libmaple/stm32f2-f4/fsmc.c
parentc5d73925fcc06ec03fe21b290e2783e3e07ba9f1 (diff)
downloadlibrambutan-9ffadc10ab4afe50833915e9c2df0c87a4ceb718.tar.gz
librambutan-9ffadc10ab4afe50833915e9c2df0c87a4ceb718.zip
stm32f4: don't try to build FSMC and Timers that hardware doesn't support
Diffstat (limited to 'libmaple/stm32f2-f4/fsmc.c')
-rw-r--r--libmaple/stm32f2-f4/fsmc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libmaple/stm32f2-f4/fsmc.c b/libmaple/stm32f2-f4/fsmc.c
index ec41720..4ee23fa 100644
--- a/libmaple/stm32f2-f4/fsmc.c
+++ b/libmaple/stm32f2-f4/fsmc.c
@@ -30,6 +30,10 @@
* @brief STM32F2 FSMC support.
*/
+#include <libmaple/stm32.h>
+
+#if STM32_HAVE_FSMC /* Don't try building the rest for MCUs without FSMC */
+
#include <libmaple/fsmc.h>
#include <libmaple/gpio.h>
@@ -88,3 +92,5 @@ void fsmc_sram_init_gpios(void) {
CONFIG_GPIO(GPIOE, 0);
CONFIG_GPIO(GPIOE, 1);
}
+
+#endif /* STM32_HAVE_FSMC */