diff --git a/include/tasmota_options.h b/include/tasmota_options.h new file mode 100644 index 000000000..840daf379 --- /dev/null +++ b/include/tasmota_options.h @@ -0,0 +1,26 @@ +/* + tasmota_include.h - header to be included in libs for external configuration via Tasmota ifdefs + + Copyright (C) 2021 Theo Arends + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef __TASMOTA_INCLUDE__ +#define __TASMOTA_INCLUDE__ + +#include "../tasmota/my_user_config.h" +#include "../tasmota/tasmota_configurations.h" + +#endif // __TASMOTA_INCLUDE__ \ No newline at end of file diff --git a/lib/lib_display/Display_Renderer-gemu-1.0/library.json b/lib/lib_display/Display_Renderer-gemu-1.0/library.json new file mode 100644 index 000000000..a07ac8c80 --- /dev/null +++ b/lib/lib_display/Display_Renderer-gemu-1.0/library.json @@ -0,0 +1,17 @@ +{ + "name": "Display renderer", + "version": "1.0", + "description": "ESP8266 ESP32 library for Tasmota displays", + "license": "MIT", + "homepage": "https://github.com/arendst/Tasmota", + "frameworks": "*", + "platforms": "*", + "authors": + { + "name": "Gerhard Mutz", + "maintainer": true + }, + "build": { + "flags": [ "-I$PROJECT_DIR/include" ] + } +} \ No newline at end of file diff --git a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp index edb2fb4d5..cf767c9dd 100644 --- a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp +++ b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp @@ -629,7 +629,7 @@ LVGL_PARAMS *Renderer::lvgl_pars(void) { } -#ifndef LVGL_RENDERER +#ifndef USE_DISPLAY_LVGL_ONLY void VButton::xdrawButton(bool inverted) { wr_redir=1; @@ -726,7 +726,7 @@ uint16_t VButton::UpdateSlider(int16_t x, int16_t y) { } } -#endif // LVGL_RENDERER +#endif // USE_DISPLAY_LVGL_ONLY diff --git a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h index e9597a437..130c407d4 100644 --- a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h +++ b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h @@ -4,6 +4,7 @@ #include #include "fonts.h" +#include "tasmota_options.h" #define BLACK 0 #define WHITE 1 @@ -17,9 +18,9 @@ #define MAX_INDEXCOLORS 32 -//#define LVGL_RENDERER +//#define USE_DISPLAY_LVGL_ONLY -#ifdef LVGL_RENDERER +#ifdef USE_DISPLAY_LVGL_ONLY #undef USE_EPD_FONTS #endif @@ -134,7 +135,7 @@ struct Slider { uint16_t barcol; }; -#ifndef LVGL_RENDERER +#ifndef USE_DISPLAY_LVGL_ONLY class VButton : public Adafruit_GFX_Button { public: TButton_State vpower; @@ -145,7 +146,7 @@ class VButton : public Adafruit_GFX_Button { uint16_t UpdateSlider(int16_t x, int16_t y); void SliderInit(Renderer *rend, uint16_t xp, uint16_t yp, uint16_t xs, uint16_t ys, uint16_t nelem, uint16_t bgcol, uint16_t frcol, uint16_t barcol); }; -#endif // LVGL_RENDERER +#endif // USE_DISPLAY_LVGL_ONLY #endif diff --git a/lib/lib_display/UDisplay/library.json b/lib/lib_display/UDisplay/library.json new file mode 100644 index 000000000..fec8baaa6 --- /dev/null +++ b/lib/lib_display/UDisplay/library.json @@ -0,0 +1,17 @@ +{ + "name": "universal display Library", + "version": "0.1", + "description": "This is a library a couple of displays.", + "license": "MIT", + "homepage": "https://github.com/arendst/Tasmota", + "frameworks": "*", + "platforms": "*", + "authors": + { + "name": "Gerhard Mutz", + "maintainer": true + }, + "build": { + "flags": [ "-I$PROJECT_DIR/include" ] + } +} \ No newline at end of file diff --git a/lib/lib_ssl/tls_mini/library.json b/lib/lib_ssl/tls_mini/library.json new file mode 100644 index 000000000..0faa39688 --- /dev/null +++ b/lib/lib_ssl/tls_mini/library.json @@ -0,0 +1,17 @@ +{ + "name": "TLS mini client derived from Arduino", + "version": "1.0", + "description": "TLS mini client derived from Arduino", + "license": "MIT", + "homepage": "https://github.com/arendst/Tasmota", + "frameworks": "*", + "platforms": "*", + "authors": + { + "name": "Stephan Hadinger", + "maintainer": true + }, + "build": { + "flags": [ "-I$PROJECT_DIR/include" ] + } +} \ No newline at end of file diff --git a/tasmota/StackThunk_light.cpp b/lib/lib_ssl/tls_mini/src/StackThunk_light.cpp similarity index 98% rename from tasmota/StackThunk_light.cpp rename to lib/lib_ssl/tls_mini/src/StackThunk_light.cpp index b85e19033..a489a0e54 100644 --- a/tasmota/StackThunk_light.cpp +++ b/lib/lib_ssl/tls_mini/src/StackThunk_light.cpp @@ -25,8 +25,7 @@ Modified 8 May 2015 by Hristo Gochkov (proper post and file upload handling) */ -#include "my_user_config.h" -#include "tasmota_configurations.h" +#include "tasmota_options.h" #if defined(ESP8266) && defined(USE_TLS) #include diff --git a/tasmota/StackThunk_light.h b/lib/lib_ssl/tls_mini/src/StackThunk_light.h similarity index 100% rename from tasmota/StackThunk_light.h rename to lib/lib_ssl/tls_mini/src/StackThunk_light.h diff --git a/tasmota/WiFiClientSecureLightBearSSL.cpp b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp similarity index 96% rename from tasmota/WiFiClientSecureLightBearSSL.cpp rename to lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp index 7da95c7e9..5f8bd999a 100755 --- a/tasmota/WiFiClientSecureLightBearSSL.cpp +++ b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp @@ -20,8 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "my_user_config.h" -#include "tasmota_configurations.h" +#include "tasmota_options.h" #if defined(USE_TLS) // #define DEBUG_TLS diff --git a/tasmota/WiFiClientSecureLightBearSSL.h b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.h similarity index 100% rename from tasmota/WiFiClientSecureLightBearSSL.h rename to lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.h diff --git a/tasmota/xdrv_55_touch.ino b/tasmota/xdrv_55_touch.ino index b02944328..a4deda6fc 100644 --- a/tasmota/xdrv_55_touch.ino +++ b/tasmota/xdrv_55_touch.ino @@ -21,7 +21,7 @@ #if defined(USE_FT5206) || defined(USE_XPT2046) || defined(USE_LILYGO47) -#ifdef LVGL_RENDERER +#ifdef USE_DISPLAY_LVGL_ONLY #undef USE_TOUCH_BUTTONS #endif diff --git a/tasmota/xdsp_17_universal.ino b/tasmota/xdsp_17_universal.ino index 24345ffb1..ba2a22aff 100644 --- a/tasmota/xdsp_17_universal.ino +++ b/tasmota/xdsp_17_universal.ino @@ -18,7 +18,7 @@ */ -#if defined(USE_DISPLAY) || defined(LVGL_RENDERER) +#if defined(USE_DISPLAY) #ifdef USE_UNIVERSAL_DISPLAY #define XDSP_17 17 @@ -462,7 +462,6 @@ void UDISP_Refresh(void) // Every second * Interface \*********************************************************************************************/ -#ifndef LVGL_RENDERER bool Xdsp17(uint8_t function) { bool result = false; @@ -493,7 +492,6 @@ bool Xdsp17(uint8_t function) { } return result; } -#endif // !LVGL_RENDERER #endif // USE_UNIVERSAL_DISPLAY #endif // USE_DISPLAY