aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32
diff options
context:
space:
mode:
authorbarthess <barthess@yandex.ru>2015-10-14 17:46:40 +0300
committerbarthess <barthess@yandex.ru>2015-10-14 17:46:40 +0300
commita2f9bc469a30a16b125d7f1a01f9bd2fbfc7eeac (patch)
treed3b55196a18b494f91352470cbd4f0f879d502c6 /os/hal/ports/STM32
parent9345056eac6fe4bb9ef78ce20295c07ca27685a4 (diff)
downloadChibiOS-Contrib-a2f9bc469a30a16b125d7f1a01f9bd2fbfc7eeac.tar.gz
ChibiOS-Contrib-a2f9bc469a30a16b125d7f1a01f9bd2fbfc7eeac.tar.bz2
ChibiOS-Contrib-a2f9bc469a30a16b125d7f1a01f9bd2fbfc7eeac.zip
FSMC code cleanup
Diffstat (limited to 'os/hal/ports/STM32')
-rw-r--r--os/hal/ports/STM32/LLD/CRCv1/crc_lld.c2
-rw-r--r--os/hal/ports/STM32/LLD/CRCv1/crc_lld.h2
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/fsmc.c9
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/fsmc.h7
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.c2
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.h2
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c2
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.h2
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/nand_lld.c2
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/nand_lld.h2
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/eicu_lld.c2
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/eicu_lld.h2
12 files changed, 14 insertions, 22 deletions
diff --git a/os/hal/ports/STM32/LLD/CRCv1/crc_lld.c b/os/hal/ports/STM32/LLD/CRCv1/crc_lld.c
index 4bcb771..aaa52e9 100644
--- a/os/hal/ports/STM32/LLD/CRCv1/crc_lld.c
+++ b/os/hal/ports/STM32/LLD/CRCv1/crc_lld.c
@@ -24,7 +24,7 @@
#include "hal.h"
-#if HAL_USE_CRC || defined(__DOXYGEN__)
+#if (HAL_USE_CRC = TRUE) || defined(__DOXYGEN__)
/**
* Allow CRC Software override for ST drivers. Some ST CRC implimentations
diff --git a/os/hal/ports/STM32/LLD/CRCv1/crc_lld.h b/os/hal/ports/STM32/LLD/CRCv1/crc_lld.h
index 6f70b42..ec9904c 100644
--- a/os/hal/ports/STM32/LLD/CRCv1/crc_lld.h
+++ b/os/hal/ports/STM32/LLD/CRCv1/crc_lld.h
@@ -25,7 +25,7 @@
#ifndef _CRC_LLD_H_
#define _CRC_LLD_H_
-#if HAL_USE_CRC || defined(__DOXYGEN__)
+#if (HAL_USE_CRC = TRUE) || defined(__DOXYGEN__)
/*
* This error check must occur outsite of CRCSW_USE_CRC1 to check if
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/fsmc.c b/os/hal/ports/STM32/LLD/FSMCv1/fsmc.c
index 63f4af1..27bc429 100644
--- a/os/hal/ports/STM32/LLD/FSMCv1/fsmc.c
+++ b/os/hal/ports/STM32/LLD/FSMCv1/fsmc.c
@@ -24,8 +24,7 @@
#include "hal.h"
#include "fsmc.h"
-#if (HAL_USE_NAND || STM32_USE_FSMC_SRAM || STM32_USE_FSMC_SDRAM) || \
- defined(__DOXYGEN__)
+#if (HAL_USE_FSMC == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
@@ -96,10 +95,6 @@ void fsmc_init(void) {
FSMCD1.nand2 = (FSMC_NAND_TypeDef *)FSMC_Bank3_R_BASE;
#endif
-#if STM32_USE_FSMC_PCCARD
- FSMCD1.pccard = (FSMC_PCCARD_TypeDef *)FSMC_Bank4_R_BASE;
-#endif
-
#if (defined(STM32F427xx) || defined(STM32F437xx) || \
defined(STM32F429xx) || defined(STM32F439xx))
#if STM32_USE_FSMC_SDRAM
@@ -187,6 +182,6 @@ CH_IRQ_HANDLER(STM32_FSMC_HANDLER) {
}
#endif /* !STM32_NAND_USE_EXT_INT */
-#endif /* HAL_USE_FSMC || STM32_USE_FSMC_SRAM || STM32_USE_FSMC_SDRAM */
+#endif /* HAL_USE_FSMC */
/** @} */
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/fsmc.h b/os/hal/ports/STM32/LLD/FSMCv1/fsmc.h
index c21884c..7889b01 100644
--- a/os/hal/ports/STM32/LLD/FSMCv1/fsmc.h
+++ b/os/hal/ports/STM32/LLD/FSMCv1/fsmc.h
@@ -25,7 +25,7 @@
#ifndef _FSMC_H_
#define _FSMC_H_
-#if HAL_USE_NAND || STM32_USE_FSMC_SRAM || STM32_USE_FSMC_SDRAM || defined(__DOXYGEN__)
+#if (HAL_USE_FSMC == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
@@ -302,9 +302,6 @@ struct FSMCDriver {
#if STM32_NAND_USE_FSMC_NAND2
FSMC_NAND_TypeDef *nand2;
#endif
-#if STM32_USE_FSMC_PCCARD
- FSMC_PCCard_TypeDef *pccard;
-#endif
#if (defined(STM32F427xx) || defined(STM32F437xx) || \
defined(STM32F429xx) || defined(STM32F439xx))
#if STM32_USE_FSMC_SDRAM
@@ -335,7 +332,7 @@ extern "C" {
}
#endif
-#endif /* HAL_USE_NAND || STM32_USE_FSMC_SRAM || STM32_USE_FSMC_SDRAM */
+#endif /* HAL_USE_FSMC */
#endif /* _FSMC_H_ */
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.c b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.c
index 33b9e80..d8db8a6 100644
--- a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.c
+++ b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.c
@@ -30,7 +30,7 @@
#if (defined(STM32F427xx) || defined(STM32F437xx) || \
defined(STM32F429xx) || defined(STM32F439xx))
-#if STM32_USE_FSMC_SDRAM || defined(__DOXYGEN__)
+#if (STM32_USE_FSMC_SDRAM == TRUE) || defined(__DOXYGEN__)
#include "fsmc_sdram.h"
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.h b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.h
index 78c854f..d5d5476 100644
--- a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.h
+++ b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.h
@@ -33,7 +33,7 @@
#include "fsmc.h"
-#if STM32_USE_FSMC_SDRAM || defined(__DOXYGEN__)
+#if (STM32_USE_FSMC_SDRAM == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c
index 114f9bc..2375738 100644
--- a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c
+++ b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c
@@ -24,7 +24,7 @@
#include "hal.h"
#include "fsmc_sram.h"
-#if STM32_USE_FSMC_SRAM || defined(__DOXYGEN__)
+#if (STM32_USE_FSMC_SRAM == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.h b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.h
index 0abfd86..bf5c32a 100644
--- a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.h
+++ b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.h
@@ -27,7 +27,7 @@
#include "fsmc.h"
-#if STM32_USE_FSMC_SRAM || defined(__DOXYGEN__)
+#if (STM32_USE_FSMC_SRAM == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/nand_lld.c b/os/hal/ports/STM32/LLD/FSMCv1/nand_lld.c
index cd2f421..32fe468 100644
--- a/os/hal/ports/STM32/LLD/FSMCv1/nand_lld.c
+++ b/os/hal/ports/STM32/LLD/FSMCv1/nand_lld.c
@@ -24,7 +24,7 @@
#include "hal.h"
-#if HAL_USE_NAND || defined(__DOXYGEN__)
+#if (HAL_USE_NAND == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/nand_lld.h b/os/hal/ports/STM32/LLD/FSMCv1/nand_lld.h
index 1d2edef..23e8e51 100644
--- a/os/hal/ports/STM32/LLD/FSMCv1/nand_lld.h
+++ b/os/hal/ports/STM32/LLD/FSMCv1/nand_lld.h
@@ -28,7 +28,7 @@
#include "fsmc.h"
#include "bitmap.h"
-#if HAL_USE_NAND || defined(__DOXYGEN__)
+#if (HAL_USE_NAND == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
diff --git a/os/hal/ports/STM32/LLD/TIMv1/eicu_lld.c b/os/hal/ports/STM32/LLD/TIMv1/eicu_lld.c
index a3e6cbd..67c3fbe 100644
--- a/os/hal/ports/STM32/LLD/TIMv1/eicu_lld.c
+++ b/os/hal/ports/STM32/LLD/TIMv1/eicu_lld.c
@@ -31,7 +31,7 @@
*/
#include "hal.h"
-#if HAL_USE_EICU || defined(__DOXYGEN__)
+#if (HAL_USE_EICU = TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
diff --git a/os/hal/ports/STM32/LLD/TIMv1/eicu_lld.h b/os/hal/ports/STM32/LLD/TIMv1/eicu_lld.h
index 4d20c2f..8002342 100644
--- a/os/hal/ports/STM32/LLD/TIMv1/eicu_lld.h
+++ b/os/hal/ports/STM32/LLD/TIMv1/eicu_lld.h
@@ -27,7 +27,7 @@
#include "stm32_tim.h"
-#if HAL_USE_EICU || defined(__DOXYGEN__)
+#if (HAL_USE_EICU = TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */