From 61ecf0c4435e38eb055b4185f25961522507b70c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 28 Dec 2021 08:55:03 +1100 Subject: [PATCH] HAL_ChibiOS: cleanup SDMMC enable defines ensure both are set --- libraries/AP_HAL_ChibiOS/hwdef/common/mcuconf.h | 8 ++++++++ libraries/AP_HAL_ChibiOS/hwdef/common/stm32f47_mcuconf.h | 4 ---- libraries/AP_HAL_ChibiOS/hwdef/common/stm32l4_mcuconf.h | 3 --- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/mcuconf.h b/libraries/AP_HAL_ChibiOS/hwdef/common/mcuconf.h index 4018ddc71e..da2b77a23c 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/mcuconf.h +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/mcuconf.h @@ -52,3 +52,11 @@ #else #error "Unsupported MCU" #endif + +#ifndef STM32_SDC_USE_SDMMC1 +#define STM32_SDC_USE_SDMMC1 FALSE +#endif + +#ifndef STM32_SDC_USE_SDMMC2 +#define STM32_SDC_USE_SDMMC2 FALSE +#endif diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/stm32f47_mcuconf.h b/libraries/AP_HAL_ChibiOS/hwdef/common/stm32f47_mcuconf.h index 84c44b6623..18187da125 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/stm32f47_mcuconf.h +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/stm32f47_mcuconf.h @@ -475,7 +475,3 @@ // limit ISR count per byte #define STM32_I2C_ISR_LIMIT 6 - -#ifndef STM32_SDC_USE_SDMMC2 -#define STM32_SDC_USE_SDMMC2 FALSE -#endif diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/stm32l4_mcuconf.h b/libraries/AP_HAL_ChibiOS/hwdef/common/stm32l4_mcuconf.h index 386a76762c..3909d8a552 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/stm32l4_mcuconf.h +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/stm32l4_mcuconf.h @@ -238,9 +238,6 @@ /* * SDC driver system settings. */ -#ifndef STM32_SDC_USE_SDMMC1 -#define STM32_SDC_USE_SDMMC1 FALSE -#endif #define STM32_SDC_SDMMC_UNALIGNED_SUPPORT TRUE #define STM32_SDC_SDMMC_WRITE_TIMEOUT 1000 #define STM32_SDC_SDMMC_READ_TIMEOUT 1000