Implement ESP_LOGx override option

Usable for library developers who write code not dependent on Arduino.
Adding 3 lines to the includes will permit their debug messages to be
visible in Arduino IDE or when enabled under IDF
This commit is contained in:
me-no-dev
2017-10-14 00:06:55 +03:00
parent c8ffcacd64
commit 409c75da04
5 changed files with 41 additions and 0 deletions

10
Kconfig
View File

@ -66,6 +66,16 @@ config ARDUHAL_LOG_COLORS
Enable ANSI terminal color codes in bootloader output.
In order to view these, your terminal program must support ANSI color codes.
config ARDUHAL_ESP_LOG
bool "Forward ESP_LOGx to Arduino log output"
default "n"
help
This option will redefine the ESP_LOGx macros to Arduino's log_x macros.
To enable for your application, add the follwing after your includes:
#ifdef ARDUINO_ARCH_ESP32
#include "esp32-hal-log.h"
#endif
endmenu
config AUTOCONNECT_WIFI