diff --git a/libraries/AP_Logger/AP_Logger_Flash_JEDEC.cpp b/libraries/AP_Logger/AP_Logger_Flash_JEDEC.cpp index e40eab7882079..025c53e3093ca 100644 --- a/libraries/AP_Logger/AP_Logger_Flash_JEDEC.cpp +++ b/libraries/AP_Logger/AP_Logger_Flash_JEDEC.cpp @@ -4,7 +4,7 @@ #include "AP_Logger_config.h" -#if HAL_LOGGING_DATAFLASH_ENABLED +#if HAL_LOGGING_FLASH_JEDEC_ENABLED #include @@ -323,4 +323,4 @@ void AP_Logger_Flash_JEDEC::WriteEnable(void) dev->transfer(&b, 1, nullptr, 0); } -#endif // HAL_LOGGING_DATAFLASH_ENABLED +#endif // HAL_LOGGING_FLASH_JEDEC_ENABLED diff --git a/libraries/AP_Logger/AP_Logger_Flash_JEDEC.h b/libraries/AP_Logger/AP_Logger_Flash_JEDEC.h index c51ae1b3d26e1..1a85e51575e4e 100644 --- a/libraries/AP_Logger/AP_Logger_Flash_JEDEC.h +++ b/libraries/AP_Logger/AP_Logger_Flash_JEDEC.h @@ -7,7 +7,7 @@ #include "AP_Logger_Block.h" -#if HAL_LOGGING_DATAFLASH_ENABLED +#if HAL_LOGGING_FLASH_JEDEC_ENABLED class AP_Logger_Flash_JEDEC : public AP_Logger_Block { public: @@ -46,4 +46,4 @@ class AP_Logger_Flash_JEDEC : public AP_Logger_Block { bool read_cache_valid; }; -#endif // HAL_LOGGING_DATAFLASH_ENABLED +#endif // HAL_LOGGING_FLASH_JEDEC_ENABLED diff --git a/libraries/AP_Logger/AP_Logger_W25NXX.cpp b/libraries/AP_Logger/AP_Logger_W25NXX.cpp index d10facf8b924a..df3e8bcea2d89 100644 --- a/libraries/AP_Logger/AP_Logger_W25NXX.cpp +++ b/libraries/AP_Logger/AP_Logger_W25NXX.cpp @@ -7,7 +7,7 @@ #include "AP_Logger_W25NXX.h" -#if HAL_LOGGING_DATAFLASH_ENABLED +#if HAL_LOGGING_FLASH_W25NXX_ENABLED #include @@ -341,4 +341,4 @@ void AP_Logger_W25NXX::WriteEnable(void) dev->transfer(&b, 1, nullptr, 0); } -#endif // HAL_LOGGING_DATAFLASH_ENABLED +#endif // HAL_LOGGING_FLASH_W25NXX_ENABLED diff --git a/libraries/AP_Logger/AP_Logger_W25NXX.h b/libraries/AP_Logger/AP_Logger_W25NXX.h index 5e7c8d7fb48a0..c384fa97db3e4 100644 --- a/libraries/AP_Logger/AP_Logger_W25NXX.h +++ b/libraries/AP_Logger/AP_Logger_W25NXX.h @@ -3,12 +3,14 @@ */ #pragma once +#include "AP_Logger_config.h" + +#if HAL_LOGGING_FLASH_W25NXX_ENABLED + #include #include "AP_Logger_Block.h" -#if HAL_LOGGING_DATAFLASH_ENABLED - class AP_Logger_W25NXX : public AP_Logger_Block { public: AP_Logger_W25NXX(AP_Logger &front, LoggerMessageWriter_DFLogStart *writer) : @@ -47,4 +49,4 @@ class AP_Logger_W25NXX : public AP_Logger_Block { bool read_cache_valid; }; -#endif // HAL_LOGGING_DATAFLASH_ENABLED +#endif // HAL_LOGGING_FLASH_W25NXX_ENABLED diff --git a/libraries/AP_Logger/AP_Logger_config.h b/libraries/AP_Logger/AP_Logger_config.h index 8627867a38047..a5a3508043c34 100644 --- a/libraries/AP_Logger/AP_Logger_config.h +++ b/libraries/AP_Logger/AP_Logger_config.h @@ -26,11 +26,19 @@ #endif #if HAL_LOGGING_DATAFLASH_ENABLED - #define HAL_LOGGING_BLOCK_ENABLED 1 + #define HAL_LOGGING_BLOCK_ENABLED HAL_LOGGING_ENABLED #else #define HAL_LOGGING_BLOCK_ENABLED 0 #endif +#ifndef HAL_LOGGING_FLASH_W25NXX_ENABLED +#define HAL_LOGGING_FLASH_W25NXX_ENABLED HAL_LOGGING_BLOCK_ENABLED +#endif + +#ifndef HAL_LOGGING_FLASH_JEDEC_ENABLED +#define HAL_LOGGING_FLASH_JEDEC_ENABLED HAL_LOGGING_BLOCK_ENABLED +#endif + #if HAL_LOGGING_FILESYSTEM_ENABLED #if !defined (HAL_BOARD_LOG_DIRECTORY)