diff --git a/include/hasp_conf.h b/include/hasp_conf.h index 8db58887..f092b4eb 100644 --- a/include/hasp_conf.h +++ b/include/hasp_conf.h @@ -4,8 +4,6 @@ #ifndef HASP_CONF_H #define HASP_CONF_H -#include "ArduinoLog.h" - #ifdef USE_CONFIG_OVERRIDE #include "user_config_override.h" #endif diff --git a/src/drv/touch/touch_driver_analog.h b/src/drv/touch/touch_driver_analog.h index 5b57510f..75cdf071 100644 --- a/src/drv/touch/touch_driver_analog.h +++ b/src/drv/touch/touch_driver_analog.h @@ -5,12 +5,11 @@ #define HASP_ANALOG_TOUCH_DRIVER_H #ifdef ARDUINO +#include +#include "ArduinoLog.h" #include "hasp_conf.h" -#include #include "hasp_drv_analogTouch.h" -#include "ArduinoLog.h" - #include "touch_driver.h" // base class #include "../../hasp/hasp.h" // for hasp_sleep_state diff --git a/src/drv/touch/touch_driver_ft6336u.h b/src/drv/touch/touch_driver_ft6336u.h index 7f7d266d..b2d16219 100644 --- a/src/drv/touch/touch_driver_ft6336u.h +++ b/src/drv/touch/touch_driver_ft6336u.h @@ -5,12 +5,12 @@ #define HASP_FT6336T_TOUCH_DRIVER_H #ifdef ARDUINO +#include +#include "ArduinoLog.h" #include "hasp_conf.h" -#include #include #include "FT6336U.h" -#include "ArduinoLog.h" #include "touch_driver.h" // base class #include "touch_helper.h" // i2c scanner diff --git a/src/drv/touch/touch_driver_gslx680.h b/src/drv/touch/touch_driver_gslx680.h index 9b7e6015..03d6a960 100644 --- a/src/drv/touch/touch_driver_gslx680.h +++ b/src/drv/touch/touch_driver_gslx680.h @@ -5,12 +5,12 @@ #define HASP_GSL1680_TOUCH_DRIVER_H #ifdef ARDUINO +#include +#include "ArduinoLog.h" #include "hasp_conf.h" -#include #include #include "GSL2038.h" -#include "ArduinoLog.h" #include "touch_driver.h" // base class #include "touch_helper.h" // i2c scanner diff --git a/src/drv/touch/touch_driver_gt911.h b/src/drv/touch/touch_driver_gt911.h index 8f371bb5..be02a3cc 100644 --- a/src/drv/touch/touch_driver_gt911.h +++ b/src/drv/touch/touch_driver_gt911.h @@ -5,12 +5,12 @@ #define HASP_GT911_TOUCH_DRIVER_H #ifdef ARDUINO +#include +#include "ArduinoLog.h" #include "hasp_conf.h" -#include #include #include "Goodix.h" -#include "ArduinoLog.h" #include "touch_driver.h" // base class #include "touch_helper.h" // i2c scanner diff --git a/src/drv/touch/touch_driver_stmpe610.h b/src/drv/touch/touch_driver_stmpe610.h index ea456bb9..c3a605da 100644 --- a/src/drv/touch/touch_driver_stmpe610.h +++ b/src/drv/touch/touch_driver_stmpe610.h @@ -8,7 +8,6 @@ #include #include #include "Adafruit_STMPE610.h" -#include "ArduinoLog.h" #include "touch_driver.h" // base class diff --git a/src/drv/touch/touch_helper.h b/src/drv/touch/touch_helper.h index 876bac23..d090cf36 100644 --- a/src/drv/touch/touch_helper.h +++ b/src/drv/touch/touch_helper.h @@ -6,8 +6,10 @@ #ifdef ARDUINO #include -#include #include "ArduinoLog.h" +#include "hasp_conf.h" + +#include #include "hasp_debug.h" void touch_scan(TwoWire& i2c) diff --git a/src/hasp/hasp_attribute.cpp b/src/hasp/hasp_attribute.cpp index 66f12963..d42bef51 100644 --- a/src/hasp/hasp_attribute.cpp +++ b/src/hasp/hasp_attribute.cpp @@ -1,10 +1,6 @@ /* MIT License - Copyright (c) 2019-2022 Francis Van Roie For full license information read the LICENSE file in the project folder */ -#ifdef ARDUINO -#include "ArduinoLog.h" -#endif - #include "hasplib.h" #include "hasp_attribute_helper.h" diff --git a/src/hasp/hasp_object.cpp b/src/hasp/hasp_object.cpp index 45ae641d..f62b1383 100644 --- a/src/hasp/hasp_object.cpp +++ b/src/hasp/hasp_object.cpp @@ -11,10 +11,6 @@ * ******************************************************************************************** */ -#ifdef ARDUINO -#include "ArduinoLog.h" -#endif - #include "hasplib.h" const char** btnmatrix_default_map; // memory pointer to lvgl default btnmatrix map diff --git a/src/hasp_debug.cpp b/src/hasp_debug.cpp index 362edff5..f8280c9a 100644 --- a/src/hasp_debug.cpp +++ b/src/hasp_debug.cpp @@ -9,7 +9,6 @@ #include "hasp_macro.h" #if(!defined(WINDOWS)) && (!defined(POSIX)) -#include "ArduinoLog.h" #define debug_print(io, ...) io->printf(__VA_ARGS__) #define debug_newline(io) io->println() diff --git a/src/hasp_debug.h b/src/hasp_debug.h index 054e5f91..68c6db96 100644 --- a/src/hasp_debug.h +++ b/src/hasp_debug.h @@ -4,6 +4,10 @@ #ifndef HASP_DEBUG_H #define HASP_DEBUG_H +#ifdef ARDUINO +#include "ArduinoLog.h" +#endif + #include "hasp_conf.h" #include "ArduinoJson.h" @@ -14,8 +18,6 @@ #include "lang/lang.h" #if(!defined(WINDOWS)) && (!defined(POSIX)) -#include "ArduinoLog.h" - /* ===== Default Event Processors ===== */ void debugSetup(JsonObject settings); diff --git a/src/hasp_filesystem.cpp b/src/hasp_filesystem.cpp index 28ddda43..d47fcaee 100644 --- a/src/hasp_filesystem.cpp +++ b/src/hasp_filesystem.cpp @@ -1,6 +1,10 @@ /* MIT License - Copyright (c) 2019-2022 Francis Van Roie For full license information read the LICENSE file in the project folder */ +#ifdef ARDUINO +#include "ArduinoLog.h" +#endif + #include "hasp_conf.h" // include first #if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0 diff --git a/src/hasplib.h b/src/hasplib.h index 1eec533f..85c97e59 100644 --- a/src/hasplib.h +++ b/src/hasplib.h @@ -3,6 +3,11 @@ #ifdef ARDUINO #include +#include "ArduinoLog.h" +#endif + +#ifdef USE_CONFIG_OVERRIDE +#include "user_config_override.h" #endif #include diff --git a/src/main_arduino.cpp b/src/main_arduino.cpp index 3e12f9aa..d43df037 100644 --- a/src/main_arduino.cpp +++ b/src/main_arduino.cpp @@ -8,7 +8,6 @@ #include "sys/net/hasp_network.h" #include "sys/net/hasp_time.h" #include "dev/device.h" -#include "ArduinoLog.h" #if HASP_USE_CONFIG > 0 #include "hasp_debug.h" diff --git a/src/sys/net/hasp_time.cpp b/src/sys/net/hasp_time.cpp index 0a6a877f..5f7129b9 100644 --- a/src/sys/net/hasp_time.cpp +++ b/src/sys/net/hasp_time.cpp @@ -3,8 +3,8 @@ #include #include "ArduinoLog.h" - #include "hasp_conf.h" + #include "hal/hasp_hal.h" #include "hasp_debug.h" #include "hasp_config.h"