From a2f9bc469a30a16b125d7f1a01f9bd2fbfc7eeac Mon Sep 17 00:00:00 2001 From: barthess Date: Wed, 14 Oct 2015 17:46:40 +0300 Subject: FSMC code cleanup --- os/hal/ports/STM32/LLD/CRCv1/crc_lld.c | 2 +- os/hal/ports/STM32/LLD/CRCv1/crc_lld.h | 2 +- os/hal/ports/STM32/LLD/FSMCv1/fsmc.c | 9 ++------- os/hal/ports/STM32/LLD/FSMCv1/fsmc.h | 7 ++----- os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.c | 2 +- os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram.h | 2 +- os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c | 2 +- os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.h | 2 +- os/hal/ports/STM32/LLD/FSMCv1/nand_lld.c | 2 +- os/hal/ports/STM32/LLD/FSMCv1/nand_lld.h | 2 +- os/hal/ports/STM32/LLD/TIMv1/eicu_lld.c | 2 +- os/hal/ports/STM32/LLD/TIMv1/eicu_lld.h | 2 +- 12 files changed, 14 insertions(+), 22 deletions(-) (limited to 'os/hal/ports/STM32') 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. */ -- cgit v1.2.3