diff options
author | Fabien Poussin <fabien.poussin@gmail.com> | 2019-10-30 12:52:31 +0100 |
---|---|---|
committer | Fabien Poussin <fabien.poussin@gmail.com> | 2019-10-30 12:52:31 +0100 |
commit | 915b474b02349add9c17fa43ff0351503c3c5020 (patch) | |
tree | 04e67f6a8838bcf4f96fc930f2c0fdf9cb18f73b /testhal/STM32/STM32F4xx/FSMC_SRAM | |
parent | 13ebce61e2f0af08d6ffa0c13397da5ad31292c4 (diff) | |
download | ChibiOS-Contrib-915b474b02349add9c17fa43ff0351503c3c5020.tar.gz ChibiOS-Contrib-915b474b02349add9c17fa43ff0351503c3c5020.tar.bz2 ChibiOS-Contrib-915b474b02349add9c17fa43ff0351503c3c5020.zip |
Re-organised FSMC drivers
Diffstat (limited to 'testhal/STM32/STM32F4xx/FSMC_SRAM')
-rw-r--r-- | testhal/STM32/STM32F4xx/FSMC_SRAM/halconf_community.h | 23 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/FSMC_SRAM/main.c | 4 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/FSMC_SRAM/mcuconf_community.h | 24 |
3 files changed, 29 insertions, 22 deletions
diff --git a/testhal/STM32/STM32F4xx/FSMC_SRAM/halconf_community.h b/testhal/STM32/STM32F4xx/FSMC_SRAM/halconf_community.h index f9cfcbe..a19553b 100644 --- a/testhal/STM32/STM32F4xx/FSMC_SRAM/halconf_community.h +++ b/testhal/STM32/STM32F4xx/FSMC_SRAM/halconf_community.h @@ -27,22 +27,29 @@ /**
* @brief Enables the FSMC subsystem.
*/
-#if !defined(HAL_USE_FSMC_SDRAM) || defined(__DOXYGEN__)
-#define HAL_USE_FSMC_SDRAM FALSE
+#if !defined(HAL_USE_FSMC) || defined(__DOXYGEN__)
+#define HAL_USE_FSMC TRUE
#endif
/**
- * @brief Enables the FSMC subsystem.
+ * @brief Enables the SDRAM subsystem.
*/
-#if !defined(HAL_USE_FSMC_SRAM) || defined(__DOXYGEN__)
-#define HAL_USE_FSMC_SRAM TRUE
+#if !defined(HAL_USE_SDRAM) || defined(__DOXYGEN__)
+#define HAL_USE_SDRAM FALSE
#endif
/**
- * @brief Enables the FSMC subsystem.
+ * @brief Enables the SRAM subsystem.
+ */
+#if !defined(HAL_USE_SRAM) || defined(__DOXYGEN__)
+#define HAL_USE_SRAM TRUE
+#endif
+
+/**
+ * @brief Enables the NAND subsystem.
*/
-#if !defined(HAL_USE_FSMC_NAND) || defined(__DOXYGEN__)
-#define HAL_USE_FSMC_NAND FALSE
+#if !defined(HAL_USE_NAND) || defined(__DOXYGEN__)
+#define HAL_USE_NAND FALSE
#endif
/**
diff --git a/testhal/STM32/STM32F4xx/FSMC_SRAM/main.c b/testhal/STM32/STM32F4xx/FSMC_SRAM/main.c index 6413835..4bd94f8 100644 --- a/testhal/STM32/STM32F4xx/FSMC_SRAM/main.c +++ b/testhal/STM32/STM32F4xx/FSMC_SRAM/main.c @@ -172,8 +172,8 @@ int main(void) { halInit(); chSysInit(); - fsmcSramInit(); - fsmcSramStart(&SRAMD4, &sram_cfg); + sramInit(); + sramStart(&SRAMD4, &sram_cfg); membench(); memtest(); diff --git a/testhal/STM32/STM32F4xx/FSMC_SRAM/mcuconf_community.h b/testhal/STM32/STM32F4xx/FSMC_SRAM/mcuconf_community.h index 8abb48d..b601a5f 100644 --- a/testhal/STM32/STM32F4xx/FSMC_SRAM/mcuconf_community.h +++ b/testhal/STM32/STM32F4xx/FSMC_SRAM/mcuconf_community.h @@ -22,30 +22,30 @@ #define STM32_FSMC_USE_FSMC1 TRUE #define STM32_FSMC_FSMC1_IRQ_PRIORITY 10 #define STM32_FSMC_DMA_CHN 0x03010201 -#define STM32_FSMC_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_FSMC_DMA_PRIORITY 0 -#define STM32_FSMC_DMA_ERROR_HOOK(nandp) osalSysHalt("FSMC DMA failure") /* * FSMC NAND driver system settings. */ -#define STM32_FSMC_USE_NAND1 FALSE -#define STM32_FSMC_USE_NAND2 FALSE -#define STM32_FSMC_USE_NAND_EXT_INT FALSE +#define STM32_NAND_USE_NAND1 FALSE +#define STM32_NAND_USE_NAND2 FALSE +#define STM32_NAND_USE_EXT_INT FALSE +#define STM32_NAND_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_NAND_DMA_PRIORITY 0 +#define STM32_NAND_DMA_ERROR_HOOK(nandp) osalSysHalt("DMA failure") /* * FSMC SRAM driver system settings. */ -#define STM32_FSMC_USE_SRAM1 FALSE -#define STM32_FSMC_USE_SRAM2 FALSE -#define STM32_FSMC_USE_SRAM3 FALSE -#define STM32_FSMC_USE_SRAM4 TRUE +#define STM32_SRAM_USE_SRAM1 FALSE +#define STM32_SRAM_USE_SRAM2 FALSE +#define STM32_SRAM_USE_SRAM3 FALSE +#define STM32_SRAM_USE_SRAM4 TRUE /* * FSMC SDRAM driver system settings. */ -#define STM32_FSMC_USE_SDRAM1 FALSE -#define STM32_FSMC_USE_SDRAM2 FALSE +#define STM32_SDRAM_USE_SDRAM1 FALSE +#define STM32_SDRAM_USE_SDRAM2 FALSE /* * TIMCAP driver system settings. |