fix(nvs): Fix possible collision with app trace sysview defines

Global.h defines U8, I8, U16, etc. symbols, which are also used in NVS
as a part of custom enum class and this can cause a compilation error
during macro expansion, when sysview is enabled and FreeRTOS.h is included in NVS
This commit is contained in:
Adam Múdry
2024-04-10 16:51:31 +02:00
parent 94580bb14a
commit 8e43afef3b
5 changed files with 85 additions and 2 deletions
+16
View File
@@ -23,6 +23,18 @@
#include "esp_log.h"
#define TAG "nvs_storage"
#if defined(SEGGER_H) && defined(GLOBAL_H)
NVS_GUARD_SYSVIEW_MACRO_EXPANSION_PUSH();
#undef U8
#undef I8
#undef U16
#undef I16
#undef U32
#undef I32
#undef U64
#undef I64
#endif
namespace nvs
{
@@ -983,3 +995,7 @@ bool Storage::nextEntry(nvs_opaque_iterator_t* it)
}
#if defined(SEGGER_H) && defined(GLOBAL_H)
NVS_GUARD_SYSVIEW_MACRO_EXPANSION_POP();
#endif