From cc6d799e7a228728a94fa9a40bc7f431caa8d29e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 8 Jun 2021 14:16:33 +1000 Subject: [PATCH] AP_EFI: change to use HAL_EFI_ENABLED --- libraries/AP_EFI/AP_EFI.cpp | 4 ++-- libraries/AP_EFI/AP_EFI.h | 8 ++++---- libraries/AP_EFI/AP_EFI_Backend.cpp | 4 ++-- libraries/AP_EFI/AP_EFI_Serial_MS.cpp | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libraries/AP_EFI/AP_EFI.cpp b/libraries/AP_EFI/AP_EFI.cpp index c43466a666..403a9f7ea1 100644 --- a/libraries/AP_EFI/AP_EFI.cpp +++ b/libraries/AP_EFI/AP_EFI.cpp @@ -15,7 +15,7 @@ #include "AP_EFI.h" -#if EFI_ENABLED +#if HAL_EFI_ENABLED #include "AP_EFI_Serial_MS.h" #include "AP_EFI_NWPMU.h" @@ -241,5 +241,5 @@ AP_EFI *EFI() } } -#endif // EFI_ENABLED +#endif // HAL_EFI_ENABLED diff --git a/libraries/AP_EFI/AP_EFI.h b/libraries/AP_EFI/AP_EFI.h index 3b52e9f58a..96cc0020d6 100644 --- a/libraries/AP_EFI/AP_EFI.h +++ b/libraries/AP_EFI/AP_EFI.h @@ -21,11 +21,11 @@ #include #include -#ifndef EFI_ENABLED -#define EFI_ENABLED !HAL_MINIMIZE_FEATURES +#ifndef HAL_EFI_ENABLED +#define HAL_EFI_ENABLED !HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024 #endif -#if EFI_ENABLED +#if HAL_EFI_ENABLED #include "AP_EFI_Backend.h" #include "AP_EFI_State.h" @@ -107,4 +107,4 @@ namespace AP { AP_EFI *EFI(); }; -#endif // EFI_ENABLED +#endif // HAL_EFI_ENABLED diff --git a/libraries/AP_EFI/AP_EFI_Backend.cpp b/libraries/AP_EFI/AP_EFI_Backend.cpp index 072186da3c..944ed76bc9 100644 --- a/libraries/AP_EFI/AP_EFI_Backend.cpp +++ b/libraries/AP_EFI/AP_EFI_Backend.cpp @@ -15,7 +15,7 @@ #include "AP_EFI.h" -#if EFI_ENABLED +#if HAL_EFI_ENABLED #include "AP_EFI_Backend.h" @@ -41,4 +41,4 @@ float AP_EFI_Backend::get_coef2(void) const { return frontend.coef2; } -#endif // EFI_ENABLED +#endif // HAL_EFI_ENABLED diff --git a/libraries/AP_EFI/AP_EFI_Serial_MS.cpp b/libraries/AP_EFI/AP_EFI_Serial_MS.cpp index f78547412c..f5ce312842 100644 --- a/libraries/AP_EFI/AP_EFI_Serial_MS.cpp +++ b/libraries/AP_EFI/AP_EFI_Serial_MS.cpp @@ -16,7 +16,7 @@ #include #include "AP_EFI_Serial_MS.h" -#if EFI_ENABLED +#if HAL_EFI_ENABLED #include extern const AP_HAL::HAL &hal; @@ -229,4 +229,4 @@ uint32_t AP_EFI_Serial_MS::CRC32_compute_byte(uint32_t crc, uint8_t data) return crc; } -#endif // EFI_ENABLED +#endif // HAL_EFI_ENABLED