aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD
diff options
context:
space:
mode:
authorNicolas Reinecke <nr@das-labor.org>2016-04-29 14:14:51 +0200
committerNicolas Reinecke <nr@das-labor.org>2016-04-29 14:14:51 +0200
commit409a3f226db366ec2918970b732e0ed26dbf173e (patch)
tree36f337dc78aa137f9b942b4e0c17f164408da12b /os/hal/ports/STM32/LLD
parent14dc50c95da6e16d56b5bc0a1c9750b38dcbf680 (diff)
downloadChibiOS-Contrib-409a3f226db366ec2918970b732e0ed26dbf173e.tar.gz
ChibiOS-Contrib-409a3f226db366ec2918970b732e0ed26dbf173e.tar.bz2
ChibiOS-Contrib-409a3f226db366ec2918970b732e0ed26dbf173e.zip
FSMC: fix build on stm32f1x and stm32f3
STM32F1,3 has no fsmc reset function so make it optional
Diffstat (limited to 'os/hal/ports/STM32/LLD')
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c b/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c
index fe48696..8b1082c 100644
--- a/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c
+++ b/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c
@@ -120,7 +120,9 @@ void fsmc_start(FSMCDriver *fsmcp) {
/* Enables the peripheral.*/
#if STM32_FSMC_USE_FSMC1
if (&FSMCD1 == fsmcp) {
+#ifdef rccResetFSMC
rccResetFSMC();
+#endif
rccEnableFSMC(FALSE);
#if (!STM32_NAND_USE_EXT_INT && HAL_USE_NAND)
nvicEnableVector(STM32_FSMC_NUMBER, STM32_FSMC_FSMC1_IRQ_PRIORITY);
@@ -143,7 +145,9 @@ void fsmc_stop(FSMCDriver *fsmcp) {
if (fsmcp->state == FSMC_READY) {
/* Resets the peripheral.*/
+#ifdef rccResetFSMC
rccResetFSMC();
+#endif
/* Disables the peripheral.*/
#if STM32_FSMC_USE_FSMC1