diff --git a/libraries/AP_EFI/AP_EFI.h b/libraries/AP_EFI/AP_EFI.h index 8b60b0711a..b5c7973ad0 100644 --- a/libraries/AP_EFI/AP_EFI.h +++ b/libraries/AP_EFI/AP_EFI.h @@ -15,15 +15,14 @@ #pragma once +#include "AP_EFI_config.h" + +#if HAL_EFI_ENABLED + #include #include #include -#ifndef HAL_EFI_ENABLED -#define HAL_EFI_ENABLED !HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024 -#endif - -#if HAL_EFI_ENABLED #include "AP_EFI_Backend.h" #include "AP_EFI_State.h" diff --git a/libraries/AP_EFI/AP_EFI_config.h b/libraries/AP_EFI/AP_EFI_config.h new file mode 100644 index 0000000000..9cbc0a059e --- /dev/null +++ b/libraries/AP_EFI/AP_EFI_config.h @@ -0,0 +1,7 @@ +#pragma once + +#include + +#ifndef HAL_EFI_ENABLED +#define HAL_EFI_ENABLED !HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024 +#endif