From cda053f3885be408be5d53e48fb8ee8d2f2bd939 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 6 Feb 2021 00:37:12 -0500 Subject: [PATCH] H7 compilation #2284 --- firmware/hw_layer/hardware.cpp | 5 ++--- firmware/hw_layer/ports/stm32/stm32h7/stm32h7xx_hal_flash.c | 2 ++ .../hw_layer/ports/stm32/stm32h7/stm32h7xx_hal_flash_ex.c | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/firmware/hw_layer/hardware.cpp b/firmware/hw_layer/hardware.cpp index eff3319951..b747207aed 100644 --- a/firmware/hw_layer/hardware.cpp +++ b/firmware/hw_layer/hardware.cpp @@ -71,13 +71,12 @@ EXTERN_ENGINE; -#if HAL_USE_SPI -extern bool isSpiInitialized[5]; - /** * #311 we want to test RTC before engine start so that we do not test it while engine is running */ bool rtcWorks = true; +#if HAL_USE_SPI +extern bool isSpiInitialized[5]; /** * Only one consumer can use SPI bus at a given time diff --git a/firmware/hw_layer/ports/stm32/stm32h7/stm32h7xx_hal_flash.c b/firmware/hw_layer/ports/stm32/stm32h7/stm32h7xx_hal_flash.c index 7c53edcc54..5b8cce4c5d 100644 --- a/firmware/hw_layer/ports/stm32/stm32h7/stm32h7xx_hal_flash.c +++ b/firmware/hw_layer/ports/stm32/stm32h7/stm32h7xx_hal_flash.c @@ -97,6 +97,8 @@ * @{ */ +#define HAL_FLASH_MODULE_ENABLED + #ifdef HAL_FLASH_MODULE_ENABLED /* Private typedef -----------------------------------------------------------*/ diff --git a/firmware/hw_layer/ports/stm32/stm32h7/stm32h7xx_hal_flash_ex.c b/firmware/hw_layer/ports/stm32/stm32h7/stm32h7xx_hal_flash_ex.c index a36eaa2358..fe10bd5482 100644 --- a/firmware/hw_layer/ports/stm32/stm32h7/stm32h7xx_hal_flash_ex.c +++ b/firmware/hw_layer/ports/stm32/stm32h7/stm32h7xx_hal_flash_ex.c @@ -85,6 +85,8 @@ * @{ */ +#define HAL_FLASH_MODULE_ENABLED + #ifdef HAL_FLASH_MODULE_ENABLED /* Private typedef -----------------------------------------------------------*/