mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
remove flash
This commit is contained in:
18
src/common.h
18
src/common.h
@@ -31,8 +31,8 @@ using uuid::log::Level;
|
||||
#define LOG_ERROR(...) logger_.err(__VA_ARGS__)
|
||||
|
||||
// flash strings
|
||||
using uuid::flash_string_vector;
|
||||
using uuid::read_flash_string;
|
||||
using uuid::string_vector;
|
||||
using string_vector = std::vector<const char *>;
|
||||
|
||||
#ifdef FPSTR
|
||||
#undef FPSTR
|
||||
@@ -40,20 +40,14 @@ using uuid::read_flash_string;
|
||||
|
||||
// clang-format off
|
||||
|
||||
#define MAKE_STR(string_name, string_literal) static constexpr const char * __str__##string_name = string_literal;
|
||||
|
||||
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
|
||||
#define F_(string_name) FPSTR(__pstr__##string_name)
|
||||
|
||||
#define FPSTR(pstr_pointer) pstr_pointer
|
||||
#define MAKE_PSTR(string_name, string_literal) static const char __pstr__##string_name[] = string_literal;
|
||||
#define MAKE_PSTR_WORD(string_name) MAKE_PSTR(string_name, #string_name)
|
||||
|
||||
#define F_(string_name) (__pstr__##string_name)
|
||||
#define FL_(list_name) (__pstr__L_##list_name)
|
||||
#define MAKE_PSTR_LIST(list_name, ...) static const __FlashStringHelper * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
||||
#define MAKE_PSTR_ENUM(enum_name, ...) static const __FlashStringHelper * const * __pstr__L_##enum_name[] = {__VA_ARGS__, nullptr};
|
||||
|
||||
// #define MAKE_PSTR_LIST2(list_name, ...) static const char * const __pstr__L_##list_name2[] = {__VA_ARGS__, nullptr};
|
||||
|
||||
#define MAKE_PSTR_LIST(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
||||
#define MAKE_PSTR_ENUM(enum_name, ...) static const char * const * __pstr__L_##enum_name[] = {__VA_ARGS__, nullptr};
|
||||
|
||||
// clang-format on
|
||||
|
||||
|
||||
Reference in New Issue
Block a user