Network manager implemented and relatively stable

This commit is contained in:
Sebastien L
2021-12-10 13:07:27 -05:00
parent 81756a7649
commit 63fbc2f645
66 changed files with 4528 additions and 2679 deletions

View File

@@ -21,6 +21,9 @@
#ifndef STR_OR_ALT
#define STR_OR_ALT(str,alt) (str?str:alt)
#endif
#ifndef STR_OR_BLANK
#define STR_OR_BLANK(p) p == NULL ? "" : p
#endif
#define ENUM_TO_STRING(g) \
case g: \
return STR(g); \
@@ -28,6 +31,14 @@
extern const char unknown_string_placeholder[];
extern const char * str_or_unknown(const char * str);
extern const char * str_or_null(const char * str);
void memtrace_print_delta(const char * msg, const char * TAG, const char * function);
#ifdef ENABLE_MEMTRACE
#define MEMTRACE_PRINT_DELTA() memtrace_print_delta(NULL,TAG,__FUNCTION__);
#define MEMTRACE_PRINT_DELTA_MESSAGE(x) memtrace_print_delta(x,TAG,__FUNCTION__);
#else
#define MEMTRACE_PRINT_DELTA()
#define MEMTRACE_PRINT_DELTA_MESSAGE(x) ESP_LOGD(TAG,"%s",x);
#endif
#ifndef FREE_AND_NULL
#define FREE_AND_NULL(x) if(x) { free(x); x=NULL; }