diff --git a/src/estd/internal/utility.cpp b/src/estd/internal/utility.cpp index 27ce140f..1e80d986 100644 --- a/src/estd/internal/utility.cpp +++ b/src/estd/internal/utility.cpp @@ -54,7 +54,6 @@ void esp_log_write(esp_log_level_t level, const char* tag, const char* format, . { if(level <= LOG_LOCAL_LEVEL) { - // TODO: Write out tag esp_log_write_header(level, tag); va_list args; diff --git a/src/estd/port/esp-idf/fake/esp_err.h b/src/estd/port/esp-idf/fake/esp_err.h index 9638c508..e16aac7c 100644 --- a/src/estd/port/esp-idf/fake/esp_err.h +++ b/src/estd/port/esp-idf/fake/esp_err.h @@ -7,6 +7,12 @@ extern "C" { typedef int esp_err_t; #define ESP_OK 0 +#define ESP_FAIL -1 /*!< Generic esp_err_t code indicating failure */ + +#define ESP_ERR_NO_MEM 0x101 /*!< Out of memory */ +#define ESP_ERR_INVALID_ARG 0x102 /*!< Invalid argument */ +#define ESP_ERR_INVALID_STATE 0x103 /*!< Invalid state */ +#define ESP_ERR_INVALID_SIZE 0x104 /*!< Invalid size */ #ifdef __cplusplus } diff --git a/src/estd/port/esp-idf/fake/esp_log.h b/src/estd/port/esp-idf/fake/esp_log.h index bb8185cb..5a472da5 100644 --- a/src/estd/port/esp-idf/fake/esp_log.h +++ b/src/estd/port/esp-idf/fake/esp_log.h @@ -8,6 +8,8 @@ extern "C" { #include +#include "esp_err.h" + enum esp_log_level_t { ESP_LOG_NONE, diff --git a/test/catch/port-test.cpp b/test/catch/port-test.cpp index 86a1529f..9f76d984 100644 --- a/test/catch/port-test.cpp +++ b/test/catch/port-test.cpp @@ -38,5 +38,7 @@ TEST_CASE("port (cross plat specific) tests") ESP_LOGE("Tag2", "uh oh! %d", 5); REQUIRE(fake_log_out == "E Tag2: uh oh! 5\n"); + + ESP_LOGW("Tag2", "Goodbye"); } }