From 20bdfac61f3453c60f0e9527879a5a2a4b970db2 Mon Sep 17 00:00:00 2001 From: enelson1001 Date: Tue, 27 Apr 2021 18:26:18 -0600 Subject: [PATCH] Major Update - updated to latest Smooth, Lvgl, ESP-IDF - Added temperature compensation to DHT12 --- .gitattributes | 0 .gitignore | 0 .gitmodules | 0 CMakeLists.txt | 0 LICENSE | 0 README.md | 9 + externals/gui-lvgl/CMakeLists.txt | 0 externals/gui-lvgl/lv_conf.h | 424 ++++++++++++--- externals/gui-lvgl/lvgl | 2 +- externals/smooth/Smooth | 2 +- main/App.cpp | 22 +- main/App.h | 0 main/CMakeLists.txt | 0 main/button/HwBtnEvent.h | 0 main/button/HwBtnTask.cpp | 0 main/button/HwBtnTask.h | 0 main/button/HwButton.cpp | 0 main/button/HwButton.h | 0 main/button/HwButtonNext.cpp | 0 main/button/HwButtonNext.h | 0 main/button/HwButtonPrev.cpp | 0 main/button/HwButtonPrev.h | 0 main/files.cmake | 0 main/fonts/lv_font_14x14B_latin1_sup.c | 0 main/gui/CPAxpPmu1.cpp | 48 +- main/gui/CPAxpPmu1.h | 1 + main/gui/CPAxpPmu2.cpp | 42 +- main/gui/CPAxpPmu2.h | 1 + main/gui/CPAxpPmu3.cpp | 42 +- main/gui/CPAxpPmu3.h | 1 + main/gui/CPBmp280.cpp | 42 +- main/gui/CPBmp280.h | 1 + main/gui/CPHumidity.cpp | 42 +- main/gui/CPHumidity.h | 1 + main/gui/CPTemperature.cpp | 27 +- main/gui/CPTemperature.h | 1 + main/gui/DisplayDriver.cpp | 68 +-- main/gui/DisplayDriver.h | 8 +- main/gui/IPane.h | 0 main/gui/LvglTask.cpp | 0 main/gui/LvglTask.h | 0 main/gui/TitlePane.cpp | 19 +- main/gui/TitlePane.h | 3 +- main/gui/ViewController.cpp | 4 +- main/gui/ViewController.h | 0 main/main.cpp | 0 main/model/Axp192Init.h | 0 main/model/AxpValue.h | 0 main/model/EnvHat.cpp | 3 +- main/model/EnvHat.h | 0 main/model/EnvirValue.h | 0 main/model/M5StickC.cpp | 0 main/model/M5StickC.h | 0 partitions.csv | 0 photos/AxpPMU1.JPG | Bin photos/AxpPMU2.JPG | Bin photos/AxpPMU3.JPG | Bin photos/BMP280.JPG | Bin photos/DHT12_Humd.JPG | Bin photos/DHT12_Temp.JPG | Bin sdkconfig | 709 +++++++++++++++++++++++-- 61 files changed, 1243 insertions(+), 279 deletions(-) mode change 100644 => 100755 .gitattributes mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .gitmodules mode change 100644 => 100755 CMakeLists.txt mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 externals/gui-lvgl/CMakeLists.txt mode change 100644 => 100755 main/App.cpp mode change 100644 => 100755 main/App.h mode change 100644 => 100755 main/CMakeLists.txt mode change 100644 => 100755 main/button/HwBtnEvent.h mode change 100644 => 100755 main/button/HwBtnTask.cpp mode change 100644 => 100755 main/button/HwBtnTask.h mode change 100644 => 100755 main/button/HwButton.cpp mode change 100644 => 100755 main/button/HwButton.h mode change 100644 => 100755 main/button/HwButtonNext.cpp mode change 100644 => 100755 main/button/HwButtonNext.h mode change 100644 => 100755 main/button/HwButtonPrev.cpp mode change 100644 => 100755 main/button/HwButtonPrev.h mode change 100644 => 100755 main/files.cmake mode change 100644 => 100755 main/fonts/lv_font_14x14B_latin1_sup.c mode change 100644 => 100755 main/gui/CPAxpPmu1.cpp mode change 100644 => 100755 main/gui/CPAxpPmu1.h mode change 100644 => 100755 main/gui/CPAxpPmu2.cpp mode change 100644 => 100755 main/gui/CPAxpPmu2.h mode change 100644 => 100755 main/gui/CPAxpPmu3.cpp mode change 100644 => 100755 main/gui/CPAxpPmu3.h mode change 100644 => 100755 main/gui/CPBmp280.cpp mode change 100644 => 100755 main/gui/CPBmp280.h mode change 100644 => 100755 main/gui/CPHumidity.cpp mode change 100644 => 100755 main/gui/CPHumidity.h mode change 100644 => 100755 main/gui/CPTemperature.cpp mode change 100644 => 100755 main/gui/CPTemperature.h mode change 100644 => 100755 main/gui/DisplayDriver.cpp mode change 100644 => 100755 main/gui/DisplayDriver.h mode change 100644 => 100755 main/gui/IPane.h mode change 100644 => 100755 main/gui/LvglTask.cpp mode change 100644 => 100755 main/gui/LvglTask.h mode change 100644 => 100755 main/gui/TitlePane.cpp mode change 100644 => 100755 main/gui/TitlePane.h mode change 100644 => 100755 main/gui/ViewController.cpp mode change 100644 => 100755 main/gui/ViewController.h mode change 100644 => 100755 main/main.cpp mode change 100644 => 100755 main/model/Axp192Init.h mode change 100644 => 100755 main/model/AxpValue.h mode change 100644 => 100755 main/model/EnvHat.cpp mode change 100644 => 100755 main/model/EnvHat.h mode change 100644 => 100755 main/model/EnvirValue.h mode change 100644 => 100755 main/model/M5StickC.cpp mode change 100644 => 100755 main/model/M5StickC.h mode change 100644 => 100755 partitions.csv mode change 100644 => 100755 photos/AxpPMU1.JPG mode change 100644 => 100755 photos/AxpPMU2.JPG mode change 100644 => 100755 photos/AxpPMU3.JPG mode change 100644 => 100755 photos/BMP280.JPG mode change 100644 => 100755 photos/DHT12_Humd.JPG mode change 100644 => 100755 photos/DHT12_Temp.JPG mode change 100644 => 100755 sdkconfig diff --git a/.gitattributes b/.gitattributes old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.gitmodules b/.gitmodules old mode 100644 new mode 100755 diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 29e2ea3..b5a2f30 --- a/README.md +++ b/README.md @@ -67,3 +67,12 @@ The AxpPMU #2 View The AxpPMU #3 View ![AxpPMU3](photos/AxpPMU3.JPG) + +# Versions +### v1.0 : +- initial release +### v2.0 : +- update to lvgl v7.11.0 commit ec9de51 - March 16, 2021 +- update to Smooth master commit 5578b8b - April 15, 2021 +- update to esp-idf v4.3-beta3 commit e9cf9e2 - April 14, 2021 +- Added temperature compensation to DHT12 measurement \ No newline at end of file diff --git a/externals/gui-lvgl/CMakeLists.txt b/externals/gui-lvgl/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/externals/gui-lvgl/lv_conf.h b/externals/gui-lvgl/lv_conf.h index 01beae0..458aaf4 100644 --- a/externals/gui-lvgl/lv_conf.h +++ b/externals/gui-lvgl/lv_conf.h @@ -1,6 +1,6 @@ /** * @file lv_conf.h - * + * Configuration file for v7.10.0 */ /* @@ -28,9 +28,10 @@ //#define LV_HOR_RES_MAX (80) //#define LV_VER_RES_MAX (160) + /* Color depth: * - 1: 1 byte per pixel - * - 8: RGB233 + * - 8: RGB332 * - 16: RGB565 * - 32: ARGB8888 */ @@ -49,7 +50,7 @@ #define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/ /* Enable anti-aliasing (lines, and radiuses will be smoothed) */ -#define LV_ANTIALIAS 0 +#define LV_ANTIALIAS 1 /* Default display refresh period. * Can be changed in the display driver (`lv_disp_drv_t`).*/ @@ -60,6 +61,17 @@ * (Not so important, you can adjust it to modify default sizes and spaces)*/ #define LV_DPI 100 /*[px]*/ +/* The the real width of the display changes some default values: + * default object sizes, layout of examples, etc. + * According to the width of the display (hor. res. / dpi) + * the displays fall in 4 categories. + * The 4th is extra large which has no upper limit so not listed here + * The upper limit of the categories are set below in 0.1 inch unit. + */ +#define LV_DISP_SMALL_LIMIT 30 +#define LV_DISP_MEDIUM_LIMIT 50 +#define LV_DISP_LARGE_LIMIT 70 + /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ typedef int16_t lv_coord_t; @@ -71,13 +83,12 @@ typedef int16_t lv_coord_t; * The graphical objects and other related data are stored here. */ /* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */ -#define LV_MEM_CUSTOM 0 -#if LV_MEM_CUSTOM == 1 +#define LV_MEM_CUSTOM 1 +#if LV_MEM_CUSTOM == 0 /* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ -# define LV_MEM_SIZE (2U * 1024U) -//# define LV_MEM_SIZE (16U * 1024U) +# define LV_MEM_SIZE (32U * 1024U) -/* Complier prefix for a big array declaration */ +/* Compiler prefix for a big array declaration */ # define LV_MEM_ATTR /* Set an address for the memory pool instead of allocating it as an array. @@ -90,9 +101,12 @@ typedef int16_t lv_coord_t; # define LV_MEM_CUSTOM_INCLUDE /*Header for the dynamic memory function*/ # define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/ # define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/ - #endif /*LV_MEM_CUSTOM*/ +/* Use the standard memcpy and memset instead of LVGL's own functions. + * The standard functions might or might not be faster depending on their implementation. */ +#define LV_MEMCPY_MEMSET_STD 0 + /* Garbage Collector settings * Used if lvgl is binded to higher level language and the memory is managed by that language */ #define LV_ENABLE_GC 0 @@ -110,7 +124,7 @@ typedef int16_t lv_coord_t; * Can be changed in the Input device driver (`lv_indev_drv_t`)*/ /* Input device read period in milliseconds */ -#define LV_INDEV_DEF_READ_PERIOD 30 +#define LV_INDEV_DEF_READ_PERIOD 100 /* Drag threshold in pixels */ #define LV_INDEV_DEF_DRAG_LIMIT 10 @@ -119,13 +133,19 @@ typedef int16_t lv_coord_t; #define LV_INDEV_DEF_DRAG_THROW 20 /* Long press time in milliseconds. - * Time to send `LV_EVENT_LONG_PRESSSED`) */ + * Time to send `LV_EVENT_LONG_PRESSED`) */ #define LV_INDEV_DEF_LONG_PRESS_TIME 400 /* Repeated trigger period in long press [ms] * Time between `LV_EVENT_LONG_PRESSED_REPEAT */ #define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100 +/* Gesture threshold in pixels */ +#define LV_INDEV_DEF_GESTURE_LIMIT 50 + +/* Gesture min velocity at release before swipe (pixels)*/ +#define LV_INDEV_DEF_GESTURE_MIN_VELOCITY 3 + /*================== * Feature usage *==================*/ @@ -139,17 +159,59 @@ typedef void * lv_anim_user_data_t; #endif -/* 1: Enable shadow drawing*/ +/* 1: Enable shadow drawing on rectangles*/ #define LV_USE_SHADOW 0 +#if LV_USE_SHADOW +/* Allow buffering some shadow calculation + * LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, + * where shadow size is `shadow_width + radius` + * Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/ +#define LV_SHADOW_CACHE_SIZE 0 +#endif + +/*1: enable outline drawing on rectangles*/ +#define LV_USE_OUTLINE 1 + +/*1: enable pattern drawing on rectangles*/ +#define LV_USE_PATTERN 1 + +/*1: enable value string drawing on rectangles*/ +#define LV_USE_VALUE_STR 1 + +/* 1: Use other blend modes than normal (`LV_BLEND_MODE_...`)*/ +#define LV_USE_BLEND_MODES 1 + +/* 1: Use the `opa_scale` style property to set the opacity of an object and its children at once*/ +#define LV_USE_OPA_SCALE 1 + +/* 1: Use image zoom and rotation*/ +#define LV_USE_IMG_TRANSFORM 1 /* 1: Enable object groups (for keyboard/encoder navigation) */ -#define LV_USE_GROUP 0 +#define LV_USE_GROUP 1 #if LV_USE_GROUP typedef void * lv_group_user_data_t; #endif /*LV_USE_GROUP*/ /* 1: Enable GPU interface*/ -#define LV_USE_GPU 0 +#define LV_USE_GPU 1 /*Only enables `gpu_fill_cb` and `gpu_blend_cb` in the disp. drv- */ +#define LV_USE_GPU_STM32_DMA2D 0 +/*If enabling LV_USE_GPU_STM32_DMA2D, LV_GPU_DMA2D_CMSIS_INCLUDE must be defined to include path of CMSIS header of target processor +e.g. "stm32f769xx.h" or "stm32f429xx.h" */ +#define LV_GPU_DMA2D_CMSIS_INCLUDE + +/*1: Use PXP for CPU off-load on NXP RTxxx platforms */ +#define LV_USE_GPU_NXP_PXP 0 + +/*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c) + * and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol FSL_RTOS_FREE_RTOS + * has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected. + *0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init() + * */ +#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0 + +/*1: Use VG-Lite for CPU offload on NXP RTxxx platforms */ +#define LV_USE_GPU_NXP_VG_LITE 0 /* 1: Enable file system (might be required for images */ #define LV_USE_FILESYSTEM 0 @@ -161,6 +223,13 @@ typedef void * lv_fs_drv_user_data_t; /*1: Add a `user_data` to drivers and objects*/ #define LV_USE_USER_DATA 1 +/*1: Show CPU usage and FPS count in the right bottom corner*/ +#define LV_USE_PERF_MONITOR 0 + +/*1: Use the functions and types from the older API if possible */ +#define LV_USE_API_EXTENSION_V6 1 +#define LV_USE_API_EXTENSION_V7 1 + /*======================== * Image decoder and cache *========================*/ @@ -176,7 +245,7 @@ typedef void * lv_fs_drv_user_data_t; * (I.e. no new image decoder is added) * With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images. * However the opened images might consume additional RAM. - * LV_IMG_CACHE_DEF_SIZE must be >= 1 */ + * Set it to 0 to disable caching */ #define LV_IMG_CACHE_DEF_SIZE 1 /*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/ @@ -187,21 +256,48 @@ typedef void * lv_img_decoder_user_data_t; *====================*/ #include "esp_attr.h" +/* For big endian systems set to 1 */ +#define LV_BIG_ENDIAN_SYSTEM 0 + /* Define a custom attribute to `lv_tick_inc` function */ #define LV_ATTRIBUTE_TICK_INC IRAM_ATTR /* Define a custom attribute to `lv_task_handler` function */ #define LV_ATTRIBUTE_TASK_HANDLER IRAM_ATTR +/* Define a custom attribute to `lv_disp_flush_ready` function */ +#define LV_ATTRIBUTE_FLUSH_READY + +/* Required alignment size for buffers */ +#define LV_ATTRIBUTE_MEM_ALIGN_SIZE + /* With size optimization (-Os) the compiler might not align data to - * 4 or 8 byte boundary. This alignment will be explicitly applied where needed. - * E.g. __attribute__((aligned(4))) */ + * 4 or 8 byte boundary. Some HW may need even 32 or 64 bytes. + * This alignment will be explicitly applied where needed. + * LV_ATTRIBUTE_MEM_ALIGN_SIZE should be used to specify required align size. + * E.g. __attribute__((aligned(LV_ATTRIBUTE_MEM_ALIGN_SIZE))) */ #define LV_ATTRIBUTE_MEM_ALIGN /* Attribute to mark large constant arrays for example * font's bitmaps */ #define LV_ATTRIBUTE_LARGE_CONST +/* Prefix performance critical functions to place them into a faster memory (e.g RAM) + * Uses 15-20 kB extra memory */ +#define LV_ATTRIBUTE_FAST_MEM + +/* Export integer constant to binding. + * This macro is used with constants in the form of LV_ that + * should also appear on lvgl binding API such as Micropython + * + * The default value just prevents a GCC warning. + */ +#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning + +/* Prefix variables that are used in GPU accelerated operations, often these need to be + * placed in RAM sections that are DMA accessible */ +#define LV_ATTRIBUTE_DMA + /*=================== * HAL settings *==================*/ @@ -210,8 +306,8 @@ typedef void * lv_img_decoder_user_data_t; * It removes the need to manually update the tick with `lv_tick_inc`) */ #define LV_TICK_CUSTOM 1 #if LV_TICK_CUSTOM == 1 -#define LV_TICK_CUSTOM_INCLUDE "esp_timer.h" /*Header for the sys time function*/ -#define LV_TICK_CUSTOM_SYS_TIME_EXPR (esp_timer_get_time()/1000) /*Expression evaluating to current systime in ms*/ +#define LV_TICK_CUSTOM_INCLUDE "esp_timer.h" /*Header for the system time function*/ +#define LV_TICK_CUSTOM_SYS_TIME_EXPR (esp_timer_get_time()/1000) /*Expression evaluating to current system time in ms*/ #endif /*LV_TICK_CUSTOM*/ typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/ @@ -222,7 +318,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i *===============*/ /*1: Enable the log module*/ -#define LV_USE_LOG 1 +#define LV_USE_LOG 0 #if LV_USE_LOG /* How important log should be added: * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information @@ -234,44 +330,93 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i # define LV_LOG_LEVEL LV_LOG_LEVEL_WARN /* 1: Print the log with 'printf'; - * 0: user need to register a callback with `lv_log_register_print`*/ -# define LV_LOG_PRINTF 1 + * 0: user need to register a callback with `lv_log_register_print_cb`*/ +# define LV_LOG_PRINTF 0 #endif /*LV_USE_LOG*/ -/*================ - * THEME USAGE +/*================= + * Debug settings *================*/ -#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ -#define LV_USE_THEME_TEMPL 0 /*Just for test*/ -#define LV_USE_THEME_DEFAULT 0 /*Built mainly from the built-in styles. Consumes very few RAM*/ -#define LV_USE_THEME_ALIEN 0 /*Dark futuristic theme*/ -#define LV_USE_THEME_NIGHT 0 /*Dark elegant theme*/ -#define LV_USE_THEME_MONO 1 /*Mono color theme for monochrome displays*/ -#define LV_USE_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/ -#define LV_USE_THEME_ZEN 0 /*Peaceful, mainly light theme */ -#define LV_USE_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/ +/* If Debug is enabled LittelvGL validates the parameters of the functions. + * If an invalid parameter is found an error log message is printed and + * the MCU halts at the error. (`LV_USE_LOG` should be enabled) + * If you are debugging the MCU you can pause + * the debugger to see exactly where the issue is. + * + * The behavior of asserts can be overwritten by redefining them here. + * E.g. #define LV_ASSERT_MEM(p) + */ +#define LV_USE_DEBUG 0 +#if LV_USE_DEBUG + +/*Check if the parameter is NULL. (Quite fast) */ +#define LV_USE_ASSERT_NULL 1 + +/*Checks is the memory is successfully allocated or no. (Quite fast)*/ +#define LV_USE_ASSERT_MEM 1 + +/*Check the integrity of `lv_mem` after critical operations. (Slow)*/ +#define LV_USE_ASSERT_MEM_INTEGRITY 0 + +/* Check the strings. + * Search for NULL, very long strings, invalid characters, and unnatural repetitions. (Slow) + * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */ +#define LV_USE_ASSERT_STR 0 + +/* Check NULL, the object's type and existence (e.g. not deleted). (Quite slow) + * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */ +#define LV_USE_ASSERT_OBJ 0 + +/*Check if the styles are properly initialized. (Fast)*/ +#define LV_USE_ASSERT_STYLE 0 + +#endif /*LV_USE_DEBUG*/ /*================== * FONT USAGE *===================*/ -/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel. +/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel. * The symbols are available via `LV_SYMBOL_...` defines - * More info about fonts: https://docs.littlevgl.com/#Fonts - * To create a new font go to: https://littlevgl.com/ttf-font-to-c-array + * More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html + * To create a new font go to: https://lvgl.com/ttf-font-to-c-array */ -/* Robot fonts with bpp = 4 - * https://fonts.google.com/specimen/Roboto */ -#define LV_FONT_ROBOTO_12 1 -#define LV_FONT_ROBOTO_16 0 -#define LV_FONT_ROBOTO_22 0 -#define LV_FONT_ROBOTO_28 0 +/* Montserrat fonts with bpp = 4 + * https://fonts.google.com/specimen/Montserrat */ +#define LV_FONT_MONTSERRAT_8 0 +#define LV_FONT_MONTSERRAT_10 0 +#define LV_FONT_MONTSERRAT_12 1 +#define LV_FONT_MONTSERRAT_14 0 +#define LV_FONT_MONTSERRAT_16 0 +#define LV_FONT_MONTSERRAT_18 0 +#define LV_FONT_MONTSERRAT_20 0 +#define LV_FONT_MONTSERRAT_22 0 +#define LV_FONT_MONTSERRAT_24 1 +#define LV_FONT_MONTSERRAT_26 0 +#define LV_FONT_MONTSERRAT_28 0 +#define LV_FONT_MONTSERRAT_30 0 +#define LV_FONT_MONTSERRAT_32 0 +#define LV_FONT_MONTSERRAT_34 0 +#define LV_FONT_MONTSERRAT_36 0 +#define LV_FONT_MONTSERRAT_38 0 +#define LV_FONT_MONTSERRAT_40 0 +#define LV_FONT_MONTSERRAT_42 0 +#define LV_FONT_MONTSERRAT_44 0 +#define LV_FONT_MONTSERRAT_46 0 +#define LV_FONT_MONTSERRAT_48 0 + +/* Demonstrate special features */ +#define LV_FONT_MONTSERRAT_12_SUBPX 0 +#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/ +#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, PErisan letters and all their forms*/ +#define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/ /*Pixel perfect monospace font * http://pelulamu.net/unscii/ */ -#define LV_FONT_UNSCII_8 1 +#define LV_FONT_UNSCII_8 0 +#define LV_FONT_UNSCII_16 0 /* Optionally declare your custom fonts here. * You can use these fonts as default font too @@ -279,21 +424,71 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \ * LV_FONT_DECLARE(my_font_2) */ -#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(lv_font_14x14B_latin1_sup) - - -/*Always set a default font from the built-in fonts*/ -//#define LV_FONT_DEFAULT &lv_font_roboto_16 -#define LV_FONT_DEFAULT &lv_font_unscii_8 +#define LV_FONT_CUSTOM_DECLARE //LV_FONT_DECLARE(lv_font_14x14B_latin1_sup) /* Enable it if you have fonts with a lot of characters. * The limit depends on the font size, font face and bpp * but with > 10,000 characters if you see issues probably you need to enable it.*/ #define LV_FONT_FMT_TXT_LARGE 0 +/* Enables/disables support for compressed fonts. If it's disabled, compressed + * glyphs cannot be processed by the library and won't be rendered. + */ +#define LV_USE_FONT_COMPRESSED 1 + +/* Enable subpixel rendering */ +#define LV_USE_FONT_SUBPX 1 +#if LV_USE_FONT_SUBPX +/* Set the pixel order of the display. + * Important only if "subpx fonts" are used. + * With "normal" font it doesn't matter. + */ +#define LV_FONT_SUBPX_BGR 0 +#endif + /*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/ typedef void * lv_font_user_data_t; +/*================ + * THEME USAGE + *================*/ + +/*Always enable at least on theme*/ + +/* No theme, you can apply your styles as you need + * No flags. Set LV_THEME_DEFAULT_FLAG 0 */ +#define LV_USE_THEME_EMPTY 1 + +/*Simple to the create your theme based on it + * No flags. Set LV_THEME_DEFAULT_FLAG 0 */ +#define LV_USE_THEME_TEMPLATE 1 + +/* A fast and impressive theme. + * Flags: + * LV_THEME_MATERIAL_FLAG_LIGHT: light theme + * LV_THEME_MATERIAL_FLAG_DARK: dark theme + * LV_THEME_MATERIAL_FLAG_NO_TRANSITION: disable transitions (state change animations) + * LV_THEME_MATERIAL_FLAG_NO_FOCUS: disable indication of focused state) + * */ +#define LV_USE_THEME_MATERIAL 1 + +/* Mono-color theme for monochrome displays. + * If LV_THEME_DEFAULT_COLOR_PRIMARY is LV_COLOR_BLACK the + * texts and borders will be black and the background will be + * white. Else the colors are inverted. + * No flags. Set LV_THEME_DEFAULT_FLAG 0 */ +#define LV_USE_THEME_MONO 1 + +#define LV_THEME_DEFAULT_INCLUDE /*Include a header for the init. function*/ +#define LV_THEME_DEFAULT_INIT lv_theme_material_init +#define LV_THEME_DEFAULT_COLOR_PRIMARY lv_color_hex(0x01a2b1) +#define LV_THEME_DEFAULT_COLOR_SECONDARY lv_color_hex(0x44d1b6) +#define LV_THEME_DEFAULT_FLAG LV_THEME_MATERIAL_FLAG_LIGHT +#define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_12 +#define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_12 +#define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_12 +#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_12 + /*================= * Text settings *=================*/ @@ -308,14 +503,66 @@ typedef void * lv_font_user_data_t; /*Can break (wrap) texts on these chars*/ #define LV_TXT_BREAK_CHARS " ,.;:-_" +/* If a word is at least this long, will break wherever "prettiest" + * To disable, set to a value <= 0 */ +#define LV_TXT_LINE_BREAK_LONG_LEN 0 + +/* Minimum number of characters in a long word to put on a line before a break. + * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */ +#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 + +/* Minimum number of characters in a long word to put on a line after a break. + * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */ +#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3 + +/* The control character to use for signalling text recoloring. */ +#define LV_TXT_COLOR_CMD "#" + +/* Support bidirectional texts. + * Allows mixing Left-to-Right and Right-to-Left texts. + * The direction will be processed according to the Unicode Bidirectional Algorithm: + * https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/ +#define LV_USE_BIDI 0 +#if LV_USE_BIDI +/* Set the default direction. Supported values: + * `LV_BIDI_DIR_LTR` Left-to-Right + * `LV_BIDI_DIR_RTL` Right-to-Left + * `LV_BIDI_DIR_AUTO` detect texts base direction */ +#define LV_BIDI_BASE_DIR_DEF LV_BIDI_DIR_AUTO +#endif + +/* Enable Arabic/Persian processing + * In these languages characters should be replaced with + * an other form based on their position in the text */ +#define LV_USE_ARABIC_PERSIAN_CHARS 0 + +/*Change the built in (v)snprintf functions*/ +#define LV_SPRINTF_CUSTOM 0 +#if LV_SPRINTF_CUSTOM +# define LV_SPRINTF_INCLUDE +# define lv_snprintf snprintf +# define lv_vsnprintf vsnprintf +#else /*!LV_SPRINTF_CUSTOM*/ +# define LV_SPRINTF_DISABLE_FLOAT 1 +#endif /*LV_SPRINTF_CUSTOM*/ + /*=================== * LV_OBJ SETTINGS *==================*/ +#if LV_USE_USER_DATA /*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/ typedef void * lv_obj_user_data_t; +/*Provide a function to free user data*/ +#define LV_USE_USER_DATA_FREE 0 +#if LV_USE_USER_DATA_FREE +# define LV_USER_DATA_FREE_INCLUDE "something.h" /*Header for user data free function*/ +/* Function prototype : void user_data_free(lv_obj_t * obj); */ +# define LV_USER_DATA_FREE (user_data_free) /*Invoking for user data free function*/ +#endif +#endif -/*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ +/*1: enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/ #define LV_USE_OBJ_REALIGN 1 /* Enable to make the object clickable on a larger area. @@ -323,13 +570,13 @@ typedef void * lv_obj_user_data_t; * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px) * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px) */ -#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF +#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_TINY /*================== * LV OBJ X USAGE *================*/ /* - * Documentation of the object types: https://docs.littlevgl.com/#Object-types + * Documentation of the object types: https://docs.lvgl.com/#Object-types */ /*Arc (dependencies: -)*/ @@ -340,40 +587,42 @@ typedef void * lv_obj_user_data_t; /*Button (dependencies: lv_cont*/ #define LV_USE_BTN 1 -#if LV_USE_BTN != 0 -/*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/ -# define LV_BTN_INK_EFFECT 0 -#endif /*Button matrix (dependencies: -)*/ -#define LV_USE_BTNM 1 +#define LV_USE_BTNMATRIX 1 /*Calendar (dependencies: -)*/ #define LV_USE_CALENDAR 1 +#if LV_USE_CALENDAR +# define LV_CALENDAR_WEEK_STARTS_MONDAY 0 +#endif /*Canvas (dependencies: lv_img)*/ #define LV_USE_CANVAS 1 /*Check box (dependencies: lv_btn, lv_label)*/ -#define LV_USE_CB 1 +#define LV_USE_CHECKBOX 1 /*Chart (dependencies: -)*/ #define LV_USE_CHART 1 #if LV_USE_CHART -# define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 20 +# define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 256 #endif /*Container (dependencies: -*/ #define LV_USE_CONT 1 +/*Color picker (dependencies: -*/ +#define LV_USE_CPICKER 1 + /*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ -#define LV_USE_DDLIST 1 -#if LV_USE_DDLIST != 0 +#define LV_USE_DROPDOWN 1 +#if LV_USE_DROPDOWN != 0 /*Open and close default animation time [ms] (0: no animation)*/ -# define LV_DDLIST_DEF_ANIM_TIME 200 +# define LV_DROPDOWN_DEF_ANIM_TIME 200 #endif -/*Gauge (dependencies:lv_bar, lv_lmeter)*/ +/*Gauge (dependencies:lv_bar, lv_linemeter)*/ #define LV_USE_GAUGE 1 /*Image (dependencies: lv_label*/ @@ -387,7 +636,7 @@ typedef void * lv_obj_user_data_t; #endif /*Keyboard (dependencies: lv_btnm)*/ -#define LV_USE_KB 1 +#define LV_USE_KEYBOARD 1 /*Label (dependencies: -*/ #define LV_USE_LABEL 1 @@ -407,6 +656,10 @@ typedef void * lv_obj_user_data_t; /*LED (dependencies: -)*/ #define LV_USE_LED 1 +#if LV_USE_LED +# define LV_LED_BRIGHT_MIN 120 /*Minimal brightness*/ +# define LV_LED_BRIGHT_MAX 255 /*Maximal brightness*/ +#endif /*Line (dependencies: -*/ #define LV_USE_LINE 1 @@ -419,10 +672,22 @@ typedef void * lv_obj_user_data_t; #endif /*Line meter (dependencies: *;)*/ -#define LV_USE_LMETER 1 +#define LV_USE_LINEMETER 1 +#if LV_USE_LINEMETER +/* Draw line more precisely at cost of performance. + * Useful if there are lot of lines any minor are visible + * 0: No extra precision + * 1: Some extra precision + * 2: Best precision + */ +# define LV_LINEMETER_PRECISE 1 +#endif + +/*Mask (dependencies: -)*/ +#define LV_USE_OBJMASK 1 /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ -#define LV_USE_MBOX 1 +#define LV_USE_MSGBOX 1 /*Page (dependencies: lv_cont)*/ #define LV_USE_PAGE 1 @@ -432,11 +697,11 @@ typedef void * lv_obj_user_data_t; #endif /*Preload (dependencies: lv_arc, lv_anim)*/ -#define LV_USE_PRELOAD 1 -#if LV_USE_PRELOAD != 0 -# define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/ -# define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/ -# define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC +#define LV_USE_SPINNER 1 +#if LV_USE_SPINNER != 0 +# define LV_SPINNER_DEF_ARC_LENGTH 60 /*[deg]*/ +# define LV_SPINNER_DEF_SPIN_TIME 1000 /*[ms]*/ +# define LV_SPINNER_DEF_ANIM LV_SPINNER_TYPE_SPINNING_ARC #endif /*Roller (dependencies: lv_ddlist)*/ @@ -453,22 +718,23 @@ typedef void * lv_obj_user_data_t; #define LV_USE_SLIDER 1 /*Spinbox (dependencies: lv_ta)*/ -#define LV_USE_SPINBOX 0 +#define LV_USE_SPINBOX 1 /*Switch (dependencies: lv_slider)*/ -#define LV_USE_SW 1 +#define LV_USE_SWITCH 1 /*Text area (dependencies: lv_label, lv_page)*/ -#define LV_USE_TA 1 -#if LV_USE_TA != 0 -# define LV_TA_DEF_CURSOR_BLINK_TIME 400 /*ms*/ -# define LV_TA_DEF_PWD_SHOW_TIME 1500 /*ms*/ +#define LV_USE_TEXTAREA 1 +#if LV_USE_TEXTAREA != 0 +# define LV_TEXTAREA_DEF_CURSOR_BLINK_TIME 400 /*ms*/ +# define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/ #endif /*Table (dependencies: lv_label)*/ #define LV_USE_TABLE 1 #if LV_USE_TABLE # define LV_TABLE_COL_MAX 12 +# define LV_TABLE_CELL_STYLE_CNT 4 #endif /*Tab (dependencies: lv_page, lv_btnm)*/ @@ -498,10 +764,6 @@ typedef void * lv_obj_user_data_t; /*--END OF LV_CONF_H--*/ -/*Be sure every define has a default value*/ -#include "lvgl/src/lv_conf_checker.h" - #endif /*LV_CONF_H*/ #endif /*End of "Content enable"*/ - diff --git a/externals/gui-lvgl/lvgl b/externals/gui-lvgl/lvgl index 2ead495..ec9de51 160000 --- a/externals/gui-lvgl/lvgl +++ b/externals/gui-lvgl/lvgl @@ -1 +1 @@ -Subproject commit 2ead4959038fcfd01eaee0f124b98a8ae3efec21 +Subproject commit ec9de515b36641be565d7bace5863ab631ce3b69 diff --git a/externals/smooth/Smooth b/externals/smooth/Smooth index b4bf80b..5578b8b 160000 --- a/externals/smooth/Smooth +++ b/externals/smooth/Smooth @@ -1 +1 @@ -Subproject commit b4bf80b4c5195e1c5d5c39f8285142e2af523d93 +Subproject commit 5578b8b551984ab6b2353528dc5cc787c8cd67dc diff --git a/main/App.cpp b/main/App.cpp old mode 100644 new mode 100755 index e30a21a..b93e444 --- a/main/App.cpp +++ b/main/App.cpp @@ -23,21 +23,21 @@ // I (7459475) M5StickC: Tue 25 - 1:12:00 PM // E (7459478) APP: The Alarm Active Count = 3 // I (7459484) MemStat: Mem type | 8-bit free | Smallest block | Minimum free | 32-bit free | Smallest block | Minimum free -// I (7459495) MemStat: INTERNAL | 150332 | 113804 | 149516 | 200752 | 113804 | 199928 -// I (7459506) MemStat: DMA | 150248 | 113804 | 149516 | 150248 | 113804 | 149516 +// I (7459495) MemStat: INTERNAL | 173328 | 65536 | 172564 | 201776 | 65536 | 201000 +// I (7459506) MemStat: DMA | 173412 | 65536 | 172564 | 173412 | 65536 | 172564 // I (7459518) MemStat: SPIRAM | 0 | 0 | 0 | 0 | 0 | 0 // I (7459530) MemStat: // I (7459532) MemStat: Name | Stack | Min free stack | Max used stack -// I (7459541) MemStat: LvglTask | 4096 | 400 | 3696 -// I (7459550) MemStat: HwBtnTask | 3000 | 924 | 2076 -// I (7459558) MemStat: SocketDispatcher | 20480 | 18396 | 2084 -// I (7459567) MemStat: MainTask | 16384 | 12556 | 3828 +// I (7459541) MemStat: LvglTask | 4096 | 336 | 3760 +// I (7459550) MemStat: HwBtnTask | 3000 | 596 | 2404 +// I (7459558) MemStat: SocketDispatcher | 20480 | 18080 | 2400 +// I (7459567) MemStat: MainTask | 16384 | 12276 | 4108 // -// Esp32-IDF version: v4.0-beta2 -// Toolchain version: xtensa-esp32-elf-gcc (crosstool-NG esp32-2019r1) 8.2.0 -// Lvgl version: v6.1.2 - SHA1: 2ead4959 -// Smooth version: master SHA1: b4bf80b4 -// Bin file size: 1,173,424 bytes +// Esp32-IDF version: v4.3-beta3 - commit e9cf9e2 - April 14, 2021 +// Toolchain version: esp-2020r3-8.4.0/xtensa-esp32-elf +// Lvgl version: v7.11.0 - commit: ec9de51, March, 2021 +// Smooth version: master - commit: 5578b8b, April 15, 2021 +// Bin file size: 1,368,000 bytes //****************************************************************************************************************** #include "App.h" #include diff --git a/main/App.h b/main/App.h old mode 100644 new mode 100755 diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/main/button/HwBtnEvent.h b/main/button/HwBtnEvent.h old mode 100644 new mode 100755 diff --git a/main/button/HwBtnTask.cpp b/main/button/HwBtnTask.cpp old mode 100644 new mode 100755 diff --git a/main/button/HwBtnTask.h b/main/button/HwBtnTask.h old mode 100644 new mode 100755 diff --git a/main/button/HwButton.cpp b/main/button/HwButton.cpp old mode 100644 new mode 100755 diff --git a/main/button/HwButton.h b/main/button/HwButton.h old mode 100644 new mode 100755 diff --git a/main/button/HwButtonNext.cpp b/main/button/HwButtonNext.cpp old mode 100644 new mode 100755 diff --git a/main/button/HwButtonNext.h b/main/button/HwButtonNext.h old mode 100644 new mode 100755 diff --git a/main/button/HwButtonPrev.cpp b/main/button/HwButtonPrev.cpp old mode 100644 new mode 100755 diff --git a/main/button/HwButtonPrev.h b/main/button/HwButtonPrev.h old mode 100644 new mode 100755 diff --git a/main/files.cmake b/main/files.cmake old mode 100644 new mode 100755 diff --git a/main/fonts/lv_font_14x14B_latin1_sup.c b/main/fonts/lv_font_14x14B_latin1_sup.c old mode 100644 new mode 100755 diff --git a/main/gui/CPAxpPmu1.cpp b/main/gui/CPAxpPmu1.cpp old mode 100644 new mode 100755 index 91e6a38..e515145 --- a/main/gui/CPAxpPmu1.cpp +++ b/main/gui/CPAxpPmu1.cpp @@ -43,73 +43,85 @@ namespace redstone { Log::info(TAG, "Creating CPAxpPmu1"); + // create a plain style + lv_style_init(&plain_style); + lv_style_set_pad_top(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_bottom(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_left(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_right(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_line_opa(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_inner(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_margin_all(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_border_width(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_radius(&plain_style, LV_STATE_DEFAULT, 0); + // create style for the content container - lv_style_copy(&content_container_style, &lv_style_plain); - content_container_style.body.main_color = lv_color_hex3(0X090); // green - content_container_style.body.grad_color = lv_color_hex3(0X090); // green + lv_style_copy(&content_container_style, &plain_style); + lv_style_set_bg_color(&content_container_style, LV_STATE_DEFAULT, lv_color_hex3(0x090)); // green // create a content container content_container = lv_cont_create(lv_scr_act(), NULL); - lv_cont_set_style(content_container, LV_CONT_STYLE_MAIN, &content_container_style); + lv_obj_add_style(content_container, LV_CONT_PART_MAIN, &content_container_style); lv_obj_set_size(content_container, width, height); lv_obj_align(content_container, NULL, LV_ALIGN_CENTER, 0, 10); // Offset so content pane is below title pane lv_obj_set_hidden(content_container, true); // create style for text value - lv_style_copy(&text_label_style, &lv_style_plain); - text_label_style.text.color = LV_COLOR_WHITE; + lv_style_init(&text_label_style); + lv_style_set_text_color(&text_label_style, LV_STATE_DEFAULT, LV_COLOR_WHITE); + lv_style_set_text_font(&text_label_style, LV_STATE_DEFAULT, &lv_font_montserrat_12); // create description for ACIN lv_obj_t* label_acin = lv_label_create(content_container, NULL); - lv_obj_set_style(label_acin, &text_label_style); - lv_label_set_text(label_acin, "ACIN:"); + lv_obj_add_style(label_acin, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_acin, "ACIN: "); lv_obj_align(label_acin, NULL, LV_ALIGN_IN_TOP_LEFT, 4, 4); // create description for VBUS lv_obj_t* label_vbus = lv_label_create(content_container, NULL); - lv_obj_set_style(label_vbus, &text_label_style); - lv_label_set_text(label_vbus, "VBUS:"); + lv_obj_add_style(label_vbus, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_vbus, "VBUS: "); lv_obj_align(label_vbus, label_acin, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 4); // create description for Battery lv_obj_t* label_battery = lv_label_create(content_container, NULL); - lv_obj_set_style(label_battery, &text_label_style); - lv_label_set_text(label_battery, "BATT:"); + lv_obj_add_style(label_battery, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_battery, "BATT: "); lv_obj_align(label_battery, label_vbus, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 4); // create a dynamic label for ACIN voltage value acin_voltage_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(acin_voltage_value_label, &text_label_style); + lv_obj_add_style(acin_voltage_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(acin_voltage_value_label, "--"); lv_obj_align(acin_voltage_value_label, label_acin, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for VBUS voltage value vbus_voltage_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(vbus_voltage_value_label, &text_label_style); + lv_obj_add_style(vbus_voltage_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(vbus_voltage_value_label, "--"); lv_obj_align(vbus_voltage_value_label, label_vbus, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for battery voltage value battery_voltage_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(battery_voltage_value_label, &text_label_style); + lv_obj_add_style(battery_voltage_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(battery_voltage_value_label, "--"); lv_obj_align(battery_voltage_value_label, label_battery, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for ACIN current value acin_current_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(acin_current_value_label, &text_label_style); + lv_obj_add_style(acin_current_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(acin_current_value_label, "--"); lv_obj_align(acin_current_value_label, label_acin, LV_ALIGN_OUT_RIGHT_MID, 50, 0); // create a dynamic label for VBUS current value vbus_current_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(vbus_current_value_label, &text_label_style); + lv_obj_add_style(vbus_current_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(vbus_current_value_label, "--"); lv_obj_align(vbus_current_value_label, label_vbus, LV_ALIGN_OUT_RIGHT_MID, 50, 0); // create a dynamic label for battery current value battery_current_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(battery_current_value_label, &text_label_style); + lv_obj_add_style(battery_current_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(battery_current_value_label, "--"); lv_obj_align(battery_current_value_label, label_battery, LV_ALIGN_OUT_RIGHT_MID, 50, 0); } diff --git a/main/gui/CPAxpPmu1.h b/main/gui/CPAxpPmu1.h old mode 100644 new mode 100755 index afc8041..87d0a7b --- a/main/gui/CPAxpPmu1.h +++ b/main/gui/CPAxpPmu1.h @@ -54,6 +54,7 @@ namespace redstone using SubQAxpValue = smooth::core::ipc::SubscribingTaskEventQueue; std::shared_ptr subr_queue_axp_value; + lv_style_t plain_style; lv_style_t content_container_style; lv_style_t text_label_style; lv_style_t heat_index_label_style; diff --git a/main/gui/CPAxpPmu2.cpp b/main/gui/CPAxpPmu2.cpp old mode 100644 new mode 100755 index bdc7a72..d0904b0 --- a/main/gui/CPAxpPmu2.cpp +++ b/main/gui/CPAxpPmu2.cpp @@ -43,55 +43,67 @@ namespace redstone { Log::info(TAG, "Creating CPAxpPmu2"); + // create a plain style + lv_style_init(&plain_style); + lv_style_set_pad_top(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_bottom(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_left(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_right(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_line_opa(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_inner(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_margin_all(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_border_width(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_radius(&plain_style, LV_STATE_DEFAULT, 0); + // create style for the content container - lv_style_copy(&content_container_style, &lv_style_plain); - content_container_style.body.main_color = lv_color_hex3(0X090); // green - content_container_style.body.grad_color = lv_color_hex3(0X090); // green + lv_style_copy(&content_container_style, &plain_style); + lv_style_set_bg_color(&content_container_style, LV_STATE_DEFAULT, lv_color_hex3(0x090)); // green // create a content container content_container = lv_cont_create(lv_scr_act(), NULL); - lv_cont_set_style(content_container, LV_CONT_STYLE_MAIN, &content_container_style); + lv_obj_add_style(content_container, LV_CONT_PART_MAIN, &content_container_style); lv_obj_set_size(content_container, width, height); lv_obj_align(content_container, NULL, LV_ALIGN_CENTER, 0, 10); // Offset so content pane is below title pane lv_obj_set_hidden(content_container, true); // create style for text value - lv_style_copy(&text_label_style, &lv_style_plain); - text_label_style.text.color = LV_COLOR_WHITE; + lv_style_init(&text_label_style); + lv_style_set_text_color(&text_label_style, LV_STATE_DEFAULT, LV_COLOR_WHITE); + lv_style_set_text_font(&text_label_style, LV_STATE_DEFAULT, &lv_font_montserrat_12); // create description for APS lv_obj_t* label_aps = lv_label_create(content_container, NULL); - lv_obj_set_style(label_aps, &text_label_style); - lv_label_set_text(label_aps, "IPSOUT :"); + lv_obj_add_style(label_aps, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_aps, "IPSOUT : "); lv_obj_align(label_aps, NULL, LV_ALIGN_IN_TOP_LEFT, 4, 4); // create description for Axp Temp lv_obj_t* label_axp_temp = lv_label_create(content_container, NULL); - lv_obj_set_style(label_axp_temp, &text_label_style); - lv_label_set_text(label_axp_temp, "AXP Temp :"); + lv_obj_add_style(label_axp_temp, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_axp_temp, "AXP Temp : "); lv_obj_align(label_axp_temp, label_aps, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 4); // create description for battery power lv_obj_t* label_batt_pwr = lv_label_create(content_container, NULL); - lv_obj_set_style(label_batt_pwr, &text_label_style); - lv_label_set_text(label_batt_pwr, "BAT Power:"); + lv_obj_add_style(label_batt_pwr, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_batt_pwr, "BAT Power: "); lv_obj_align(label_batt_pwr, label_axp_temp, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 4); // create a dynamic label for APS voltage value aps_voltage_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(aps_voltage_value_label, &text_label_style); + lv_obj_add_style(aps_voltage_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(aps_voltage_value_label, "--"); lv_obj_align(aps_voltage_value_label, label_aps, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for AXP device temperature value axp_device_temp_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(axp_device_temp_value_label, &text_label_style); + lv_obj_add_style(axp_device_temp_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(axp_device_temp_value_label, "--"); lv_obj_align(axp_device_temp_value_label, label_axp_temp, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for battery power value battery_power_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(battery_power_value_label, &text_label_style); + lv_obj_add_style(battery_power_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(battery_power_value_label, "--"); lv_obj_align(battery_power_value_label, label_batt_pwr, LV_ALIGN_OUT_RIGHT_MID, 0, 0); } diff --git a/main/gui/CPAxpPmu2.h b/main/gui/CPAxpPmu2.h old mode 100644 new mode 100755 index 3c4f6d8..5cfe8d8 --- a/main/gui/CPAxpPmu2.h +++ b/main/gui/CPAxpPmu2.h @@ -54,6 +54,7 @@ namespace redstone using SubQAxpValue = smooth::core::ipc::SubscribingTaskEventQueue; std::shared_ptr subr_queue_axp_value; + lv_style_t plain_style; lv_style_t content_container_style; lv_style_t text_label_style; lv_style_t heat_index_label_style; diff --git a/main/gui/CPAxpPmu3.cpp b/main/gui/CPAxpPmu3.cpp old mode 100644 new mode 100755 index 78970e2..7ca0dc8 --- a/main/gui/CPAxpPmu3.cpp +++ b/main/gui/CPAxpPmu3.cpp @@ -43,55 +43,67 @@ namespace redstone { Log::info(TAG, "Creating CPAxpPmu3"); + // create a plain style + lv_style_init(&plain_style); + lv_style_set_pad_top(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_bottom(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_left(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_right(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_line_opa(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_inner(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_margin_all(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_border_width(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_radius(&plain_style, LV_STATE_DEFAULT, 0); + // create style for the content container - lv_style_copy(&content_container_style, &lv_style_plain); - content_container_style.body.main_color = lv_color_hex3(0X090); // green - content_container_style.body.grad_color = lv_color_hex3(0X090); // green + lv_style_copy(&content_container_style, &plain_style); + lv_style_set_bg_color(&content_container_style, LV_STATE_DEFAULT, lv_color_hex3(0x090)); // green // create a content container content_container = lv_cont_create(lv_scr_act(), NULL); - lv_cont_set_style(content_container, LV_CONT_STYLE_MAIN, &content_container_style); + lv_obj_add_style(content_container, LV_CONT_PART_MAIN, &content_container_style); lv_obj_set_size(content_container, width, height); lv_obj_align(content_container, NULL, LV_ALIGN_CENTER, 0, 10); // Offset so content pane is below title pane lv_obj_set_hidden(content_container, true); // create style for text value - lv_style_copy(&text_label_style, &lv_style_plain); - text_label_style.text.color = LV_COLOR_WHITE; + lv_style_init(&text_label_style); + lv_style_set_text_color(&text_label_style, LV_STATE_DEFAULT, LV_COLOR_WHITE); + lv_style_set_text_font(&text_label_style, LV_STATE_DEFAULT, &lv_font_montserrat_12); // create description for battery capacity lv_obj_t* label_batt_cap = lv_label_create(content_container, NULL); - lv_obj_set_style(label_batt_cap, &text_label_style); - lv_label_set_text(label_batt_cap, "Bat Charge:"); + lv_obj_add_style(label_batt_cap, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_batt_cap, "Bat Charge: "); lv_obj_align(label_batt_cap, NULL, LV_ALIGN_IN_TOP_LEFT, 4, 4); // create description for battery charging current lv_obj_t* label_batt_chg = lv_label_create(content_container, NULL); - lv_obj_set_style(label_batt_chg, &text_label_style); - lv_label_set_text(label_batt_chg, "Bat Icharg:"); + lv_obj_add_style(label_batt_chg, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_batt_chg, "Bat Icharg: "); lv_obj_align(label_batt_chg, label_batt_cap, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 4); // create description for battery discharging current lv_obj_t* label_batt_dischg = lv_label_create(content_container, NULL); - lv_obj_set_style(label_batt_dischg, &text_label_style); - lv_label_set_text(label_batt_dischg, "Bat Idchrg:"); + lv_obj_add_style(label_batt_dischg, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_batt_dischg, "Bat Idchrg: "); lv_obj_align(label_batt_dischg, label_batt_chg, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 4); // create a dynamic label for battery capacity value battery_capacity_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(battery_capacity_value_label, &text_label_style); + lv_obj_add_style(battery_capacity_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(battery_capacity_value_label, "--"); lv_obj_align(battery_capacity_value_label, label_batt_cap, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for battery charging current value battery_charging_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(battery_charging_value_label, &text_label_style); + lv_obj_add_style(battery_charging_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(battery_charging_value_label, "--"); lv_obj_align(battery_charging_value_label, label_batt_chg, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for battery discharging current value battery_discharging_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(battery_discharging_value_label, &text_label_style); + lv_obj_add_style(battery_discharging_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(battery_discharging_value_label, "--"); lv_obj_align(battery_discharging_value_label, label_batt_dischg, LV_ALIGN_OUT_RIGHT_MID, 0, 0); } diff --git a/main/gui/CPAxpPmu3.h b/main/gui/CPAxpPmu3.h old mode 100644 new mode 100755 index 8903f2d..684e656 --- a/main/gui/CPAxpPmu3.h +++ b/main/gui/CPAxpPmu3.h @@ -54,6 +54,7 @@ namespace redstone using SubQAxpValue = smooth::core::ipc::SubscribingTaskEventQueue; std::shared_ptr subr_queue_axp_value; + lv_style_t plain_style; lv_style_t content_container_style; lv_style_t text_label_style; lv_style_t heat_index_label_style; diff --git a/main/gui/CPBmp280.cpp b/main/gui/CPBmp280.cpp old mode 100644 new mode 100755 index 7a65959..bfcd0cc --- a/main/gui/CPBmp280.cpp +++ b/main/gui/CPBmp280.cpp @@ -43,55 +43,67 @@ namespace redstone { Log::info(TAG, "Creating CPBmp280"); + // create a plain style + lv_style_init(&plain_style); + lv_style_set_pad_top(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_bottom(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_left(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_right(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_line_opa(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_inner(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_margin_all(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_border_width(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_radius(&plain_style, LV_STATE_DEFAULT, 0); + // create style for the content container - lv_style_copy(&content_container_style, &lv_style_plain); - content_container_style.body.main_color = lv_color_hex3(0xFF0); // yellow - content_container_style.body.grad_color = lv_color_hex3(0xFF0); // yellow + lv_style_copy(&content_container_style, &plain_style); + lv_style_set_bg_color(&content_container_style, LV_STATE_DEFAULT, lv_color_hex3(0xff0)); // yellow // create a content container content_container = lv_cont_create(lv_scr_act(), NULL); - lv_cont_set_style(content_container, LV_CONT_STYLE_MAIN, &content_container_style); + lv_obj_add_style(content_container, LV_CONT_PART_MAIN, &content_container_style); lv_obj_set_size(content_container, width, height); lv_obj_align(content_container, NULL, LV_ALIGN_CENTER, 0, 10); // Offset so content pane is below title pane lv_obj_set_hidden(content_container, true); // create style for text value - lv_style_copy(&text_label_style, &lv_style_plain); - text_label_style.text.color = LV_COLOR_BLACK; + lv_style_init(&text_label_style); + lv_style_set_text_color(&text_label_style, LV_STATE_DEFAULT, LV_COLOR_BLACK); + lv_style_set_text_font(&text_label_style, LV_STATE_DEFAULT, &lv_font_montserrat_12); // create description for temperature lv_obj_t* label_temp = lv_label_create(content_container, NULL); - lv_obj_set_style(label_temp, &text_label_style); - lv_label_set_text(label_temp, "Temp:"); + lv_obj_add_style(label_temp, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_temp, "Temp: "); lv_obj_align(label_temp, NULL, LV_ALIGN_IN_TOP_LEFT, 4, 4); // create description for hPa pressure lv_obj_t* label_press_hpa = lv_label_create(content_container, NULL); - lv_obj_set_style(label_press_hpa, &text_label_style); - lv_label_set_text(label_press_hpa, "Pres:"); + lv_obj_add_style(label_press_hpa, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_press_hpa, "Pres: "); lv_obj_align(label_press_hpa, label_temp, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 4); // create description for inHg pressure (sea level) lv_obj_t* label_press_inhg = lv_label_create(content_container, NULL); - lv_obj_set_style(label_press_inhg, &text_label_style); - lv_label_set_text(label_press_inhg, "Pres:"); + lv_obj_add_style(label_press_inhg, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_press_inhg, "Pres: "); lv_obj_align(label_press_inhg, label_press_hpa, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 4); // create a dynamic label for temperature measurement value temperature_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(temperature_value_label, &text_label_style); + lv_obj_add_style(temperature_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(temperature_value_label, "--"); lv_obj_align(temperature_value_label, label_temp, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for hPa pressure measurement value hpa_press_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(hpa_press_value_label, &text_label_style); + lv_obj_add_style(hpa_press_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(hpa_press_value_label, "--"); lv_obj_align(hpa_press_value_label, label_press_hpa, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for inHg pressure measurement value inhg_press_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(inhg_press_value_label, &text_label_style); + lv_obj_add_style(inhg_press_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(inhg_press_value_label, "--"); lv_obj_align(inhg_press_value_label, label_press_inhg, LV_ALIGN_OUT_RIGHT_MID, 0, 0); } diff --git a/main/gui/CPBmp280.h b/main/gui/CPBmp280.h old mode 100644 new mode 100755 index b1ea86f..6dfdf14 --- a/main/gui/CPBmp280.h +++ b/main/gui/CPBmp280.h @@ -54,6 +54,7 @@ namespace redstone using SubQEnvirValue = smooth::core::ipc::SubscribingTaskEventQueue; std::shared_ptr subr_queue_envir_value; + lv_style_t plain_style; lv_style_t content_container_style; lv_style_t text_label_style; lv_obj_t* content_container; diff --git a/main/gui/CPHumidity.cpp b/main/gui/CPHumidity.cpp old mode 100644 new mode 100755 index ade828a..d0f5ea2 --- a/main/gui/CPHumidity.cpp +++ b/main/gui/CPHumidity.cpp @@ -43,55 +43,67 @@ namespace redstone { Log::info(TAG, "Creating CPHumidity"); + // create a plain style + lv_style_init(&plain_style); + lv_style_set_pad_top(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_bottom(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_left(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_right(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_line_opa(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_inner(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_margin_all(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_border_width(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_radius(&plain_style, LV_STATE_DEFAULT, 0); + // create style for the content container - lv_style_copy(&content_container_style, &lv_style_plain); - content_container_style.body.main_color = lv_color_hex3(0x00C); // blue - content_container_style.body.grad_color = lv_color_hex3(0x00C); // blue + lv_style_copy(&content_container_style, &plain_style); + lv_style_set_bg_color(&content_container_style, LV_STATE_DEFAULT, lv_color_hex3(0x00c)); // blue // create a content container content_container = lv_cont_create(lv_scr_act(), NULL); - lv_cont_set_style(content_container, LV_CONT_STYLE_MAIN, &content_container_style); + lv_obj_add_style(content_container, LV_CONT_PART_MAIN, &content_container_style); lv_obj_set_size(content_container, width, height); lv_obj_align(content_container, NULL, LV_ALIGN_CENTER, 0, 10); // Offset so content pane is below title pane lv_obj_set_hidden(content_container, true); // create style for labels - lv_style_copy(&text_label_style, &lv_style_plain); - text_label_style.text.color = LV_COLOR_WHITE; + lv_style_init(&text_label_style); + lv_style_set_text_color(&text_label_style, LV_STATE_DEFAULT, LV_COLOR_WHITE); + lv_style_set_text_font(&text_label_style, LV_STATE_DEFAULT, &lv_font_montserrat_12); // create description for humidity lv_obj_t* label_humid = lv_label_create(content_container, NULL); - lv_obj_set_style(label_humid, &text_label_style); - lv_label_set_text(label_humid, "Humidity :"); + lv_obj_add_style(label_humid, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_humid, "Humidity : "); lv_obj_align(label_humid, NULL, LV_ALIGN_IN_TOP_LEFT, 4, 4); // create description for heat index lv_obj_t* label_heat_index = lv_label_create(content_container, NULL); - lv_obj_set_style(label_heat_index, &text_label_style); - lv_label_set_text(label_heat_index, "Heat Index:"); + lv_obj_add_style(label_heat_index, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_heat_index, "Heat Index: "); lv_obj_align(label_heat_index, label_humid, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 4); // create description for dew point lv_obj_t* label_dew_point = lv_label_create(content_container, NULL); - lv_obj_set_style(label_dew_point, &text_label_style); - lv_label_set_text(label_dew_point, "Dew Point :"); + lv_obj_add_style(label_dew_point, LV_LABEL_PART_MAIN, &text_label_style); + lv_label_set_text(label_dew_point, "Dew Point : "); lv_obj_align(label_dew_point, label_heat_index, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 4); // create a dynamic label for humidity measurement value humidity_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(humidity_value_label, &text_label_style); + lv_obj_add_style(humidity_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(humidity_value_label, "--"); lv_obj_align(humidity_value_label, label_humid, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for heat index measurement value heat_index_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(heat_index_value_label, &text_label_style); + lv_obj_add_style(heat_index_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(heat_index_value_label, "--"); lv_obj_align(heat_index_value_label, label_heat_index, LV_ALIGN_OUT_RIGHT_MID, 0, 0); // create a dynamic label for dew point measurement value dew_point_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(dew_point_value_label, &text_label_style); + lv_obj_add_style(dew_point_value_label, LV_LABEL_PART_MAIN, &text_label_style); lv_label_set_text(dew_point_value_label, "--"); lv_obj_align(dew_point_value_label, label_dew_point, LV_ALIGN_OUT_RIGHT_MID, 0, 0); } diff --git a/main/gui/CPHumidity.h b/main/gui/CPHumidity.h old mode 100644 new mode 100755 index a62e512..6149b57 --- a/main/gui/CPHumidity.h +++ b/main/gui/CPHumidity.h @@ -54,6 +54,7 @@ namespace redstone using SubQEnvirValue = smooth::core::ipc::SubscribingTaskEventQueue; std::shared_ptr subr_queue_envir_value; + lv_style_t plain_style; lv_style_t content_container_style; lv_style_t text_label_style; lv_obj_t* content_container; diff --git a/main/gui/CPTemperature.cpp b/main/gui/CPTemperature.cpp old mode 100644 new mode 100755 index 0142c33..b884a55 --- a/main/gui/CPTemperature.cpp +++ b/main/gui/CPTemperature.cpp @@ -43,26 +43,37 @@ namespace redstone { Log::info(TAG, "Creating CPTemperature"); + // create a plain style + lv_style_init(&plain_style); + lv_style_set_pad_top(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_bottom(&plain_style, LV_STATE_DEFAULT, 10); + lv_style_set_pad_left(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_right(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_line_opa(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_pad_inner(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_margin_all(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_border_width(&plain_style, LV_STATE_DEFAULT, 0); + lv_style_set_radius(&plain_style, LV_STATE_DEFAULT, 0); + // create style for the content container - lv_style_copy(&content_container_style, &lv_style_plain); - content_container_style.body.main_color = lv_color_hex3(0x00C); // blue - content_container_style.body.grad_color = lv_color_hex3(0x00C); // blue + lv_style_copy(&content_container_style, &plain_style); + lv_style_set_bg_color(&content_container_style, LV_STATE_DEFAULT, lv_color_hex3(0x00c)); // blue // create a content container content_container = lv_cont_create(lv_scr_act(), NULL); lv_obj_set_size(content_container, width, height); lv_obj_align(content_container, NULL, LV_ALIGN_CENTER, 0, 10); // Offset so content pane is below title pane - lv_cont_set_style(content_container, LV_CONT_STYLE_MAIN, &content_container_style); + lv_obj_add_style(content_container, LV_CONT_PART_MAIN, &content_container_style); lv_obj_set_hidden(content_container, true); // create style for temperature value - lv_style_copy(&temperature_label_style, &lv_style_plain); - temperature_label_style.text.font = &lv_font_14x14B_latin1_sup; - temperature_label_style.text.color = LV_COLOR_WHITE; + lv_style_init(&temperature_label_style); + lv_style_set_text_font(&temperature_label_style, LV_STATE_DEFAULT, &lv_font_montserrat_24); + lv_style_set_text_color(&temperature_label_style, LV_STATE_DEFAULT, LV_COLOR_WHITE); // create a dynamic label for temperature measurement value temperature_value_label = lv_label_create(content_container, NULL); - lv_obj_set_style(temperature_value_label, &temperature_label_style); + lv_obj_add_style(temperature_value_label, LV_LABEL_PART_MAIN, &temperature_label_style); lv_label_set_text(temperature_value_label, "--"); lv_obj_align(temperature_value_label, NULL, LV_ALIGN_CENTER, 5, 0); } diff --git a/main/gui/CPTemperature.h b/main/gui/CPTemperature.h old mode 100644 new mode 100755 index 7b26598..c8d3d1d --- a/main/gui/CPTemperature.h +++ b/main/gui/CPTemperature.h @@ -54,6 +54,7 @@ namespace redstone using SubQEnvirValue = smooth::core::ipc::SubscribingTaskEventQueue; std::shared_ptr subr_queue_envir_value; + lv_style_t plain_style; lv_style_t content_container_style; lv_style_t temperature_label_style; lv_obj_t* content_container; diff --git a/main/gui/DisplayDriver.cpp b/main/gui/DisplayDriver.cpp old mode 100644 new mode 100755 index 132ede7..2ab4105 --- a/main/gui/DisplayDriver.cpp +++ b/main/gui/DisplayDriver.cpp @@ -29,16 +29,7 @@ namespace redstone static const char* TAG = "DisplayDriver"; // Constructor - DisplayDriver::DisplayDriver() : - spi_host(HSPI_HOST), // Use HSPI as host - - spi_master( - spi_host, // host HSPI - DMA_1, // use DMA - GPIO_NUM_15, // mosi gpio pin - GPIO_NUM_NC, // miso not available - GPIO_NUM_13, // clock gpio pin - MAX_DMA_LEN) // max transfer size + DisplayDriver::DisplayDriver() { } @@ -47,7 +38,7 @@ namespace redstone { Log::info(TAG, "Initializing Lvgl Display Driver ........"); - display_initialized = init_display(); + display_initialized = init_lcd_display(); if (display_initialized) { @@ -82,9 +73,17 @@ namespace redstone } // Initialize the lcd display - bool DisplayDriver::init_display() + bool DisplayDriver::init_lcd_display() { - auto device = spi_master.create_device( + // initialize spi-bus-master + Master::initialize(HSPI_HOST, + SPI_DMA_Channel::DMA_1, // use DMA + GPIO_NUM_15, // mosi gpio pin + GPIO_NUM_NC, // miso gpio pin + GPIO_NUM_13, // clock gpio pin + MAX_DMA_LEN); // max transfer size + + auto device = Master::create_device( GPIO_NUM_5, // chip select gpio pin GPIO_NUM_23, // data command gpio pin 0, // spi command_bits @@ -99,26 +98,33 @@ namespace redstone true, // use pre-trans callback true); // use post-trans callback - bool res = device->init(spi_host); + bool lcdspi_device_initialized = device->init(HSPI_HOST); - if (res) + if (lcdspi_device_initialized) { Log::info(TAG, "Initializing SPI Device: DisplaySpi"); device->add_reset_pin(std::make_unique(GPIO_NUM_18, false, false, false)); - device->sw_reset(milliseconds(10)); - res &= device->send_init_cmds(init_cmds_R_part1.data(), init_cmds_R_part1.size()); - res &= device->send_init_cmds(init_cmds_R_grn_tab_part2.data(), init_cmds_R_grn_tab_part2.size()); - res &= device->send_cmd(LcdCmd::INVON); // display inversion on - res &= device->send_init_cmds(init_cmds_R_part3.data(), init_cmds_R_part3.size()); - - display = std::move(device); } else { - Log::error(TAG, "Initializing of SPI Device: DisplaySpi --- FAILED"); + Log::error(TAG, "Initializing of LCDspi Device: FAILED"); + } + + // initialize the display + device->sw_reset(milliseconds(10)); + bool st7735S_initialized = device->send_init_cmds(init_cmds_R_part1.data(), init_cmds_R_part1.size()); + st7735S_initialized &= device->send_init_cmds(init_cmds_R_grn_tab_part2.data(), init_cmds_R_grn_tab_part2.size()); + st7735S_initialized &= device->send_cmd(LcdCmd::INVON); // display inversion on + st7735S_initialized &= device->send_init_cmds(init_cmds_R_part3.data(), init_cmds_R_part3.size()); + + lcd_display = std::move(device); + + if (!st7735S_initialized) + { + Log::error(TAG, "Initializing of ST7735S --- FAILED"); } - return res; + return lcdspi_device_initialized & st7735S_initialized; } // Set screen rotation @@ -131,12 +137,12 @@ namespace redstone if (LV_VER_RES_MAX > LV_HOR_RES_MAX) { // Portrait - res = display->set_madctl(0xC8); + res = lcd_display->set_madctl(0xC8); } else { // Landscape - res = display->set_madctl(0xA8); + res = lcd_display->set_madctl(0xA8); } if (!res) @@ -179,8 +185,8 @@ namespace redstone // Drawing area that has a height of LINES_TO_SEND while (number_of_dma_blocks_with_complete_lines_to_send--) { - display->send_lines(x1, start_row, x2, end_row, reinterpret_cast(color_map), MAX_DMA_LEN); - display->wait_for_send_lines_to_finish(); + lcd_display->send_lines(x1, start_row, x2, end_row, reinterpret_cast(color_map), MAX_DMA_LEN); + lcd_display->wait_for_send_lines_to_finish(); // color_map is pointer to type lv_color_t were the data type is based on color size so the // color_map pointer may have a data type of uint8_t or uint16_t or uint32_t. MAX_DMA_LEN is @@ -197,15 +203,15 @@ namespace redstone if (number_of_bytes_in_not_complete_lines_to_send) { end_row = y2; - display->send_lines(x1, start_row, x2, end_row, + lcd_display->send_lines(x1, start_row, x2, end_row, reinterpret_cast(color_map), number_of_bytes_in_not_complete_lines_to_send); - display->wait_for_send_lines_to_finish(); + lcd_display->wait_for_send_lines_to_finish(); } // Inform the lvgl graphics library that we are ready for flushing the VDB buffer - lv_disp_t* disp = lv_refr_get_disp_refreshing(); + lv_disp_t* disp = _lv_refr_get_disp_refreshing(); lv_disp_flush_ready(&disp->driver); } diff --git a/main/gui/DisplayDriver.h b/main/gui/DisplayDriver.h old mode 100644 new mode 100755 index 9e0a741..4a77ae3 --- a/main/gui/DisplayDriver.h +++ b/main/gui/DisplayDriver.h @@ -17,7 +17,7 @@ #pragma once #include -#include +#include #include #include @@ -43,7 +43,7 @@ namespace redstone void display_drv_flush(lv_disp_drv_t* drv, const lv_area_t* area, lv_color_t* color_map); /// Initialize the ST7735S display driver IC - bool init_display(); + bool init_lcd_display(); // Set the screen rotation void set_screen_rotation(); @@ -63,9 +63,7 @@ namespace redstone static constexpr int LINES_TO_SEND = 40; // See Note 2 static constexpr int MAX_DMA_LEN = (LV_HOR_RES_MAX * LINES_TO_SEND * COLOR_SIZE); // See Note 3 - spi_host_device_t spi_host; - smooth::core::io::spi::Master spi_master; - std::unique_ptr display{}; + std::unique_ptr lcd_display{}; bool display_initialized{ false }; smooth::core::io::spi::SpiDmaFixedBuffer video_display_buffer1{}; diff --git a/main/gui/IPane.h b/main/gui/IPane.h old mode 100644 new mode 100755 diff --git a/main/gui/LvglTask.cpp b/main/gui/LvglTask.cpp old mode 100644 new mode 100755 diff --git a/main/gui/LvglTask.h b/main/gui/LvglTask.h old mode 100644 new mode 100755 diff --git a/main/gui/TitlePane.cpp b/main/gui/TitlePane.cpp old mode 100644 new mode 100755 index be2f147..1ca9696 --- a/main/gui/TitlePane.cpp +++ b/main/gui/TitlePane.cpp @@ -1,6 +1,6 @@ /**************************************************************************************** * TitlePane.cpp - A class that creates a simple title pane - * + * * Created on Jan. 04, 2020 * Copyright (c) 2019 Ed Nelson (https://github.com/enelson1001) * Licensed under MIT License (see LICENSE file) @@ -34,24 +34,25 @@ namespace redstone { Log::info(TAG, "Creating the Title Pane"); - // create style for the titlepain - lv_style_copy(&title_style, &lv_style_plain); - title_style.body.main_color = LV_COLOR_BLACK; - title_style.body.grad_color = LV_COLOR_BLACK; - title_style.text.font = &lv_font_unscii_8; - title_style.text.color = LV_COLOR_WHITE; + // create style for the title pane + lv_style_init(&title_style); + lv_style_set_border_width(&title_style, LV_STATE_DEFAULT, 0); + lv_style_set_radius(&title_style, LV_STATE_DEFAULT, 0); + lv_style_set_bg_color(&title_style, LV_STATE_DEFAULT, LV_COLOR_BLACK); + lv_style_set_text_color(&title_style, LV_STATE_DEFAULT, LV_COLOR_WHITE); + lv_style_set_text_font(&title_style, LV_STATE_DEFAULT, &lv_font_montserrat_12); // create container for title pane title_container = lv_cont_create(lv_scr_act(), NULL); lv_obj_set_size(title_container, width, height); lv_cont_set_layout(title_container, LV_LAYOUT_CENTER); lv_obj_align(title_container, NULL, LV_ALIGN_IN_TOP_MID, 0, 0); // place title pane at top - lv_cont_set_style(title_container, LV_CONT_STYLE_MAIN, &title_style); + lv_obj_add_style(title_container, LV_CONT_PART_MAIN, &title_style); lv_obj_set_hidden(title_container, true); // create a title label and place in title container title_label = lv_label_create(title_container, NULL); - lv_obj_set_style(title_label, &title_style); + lv_obj_add_style(title_label, LV_LABEL_PART_MAIN, &title_style); lv_label_set_text(title_label, title.c_str()); lv_obj_align(title_label, NULL, LV_ALIGN_CENTER, 0, 0); } diff --git a/main/gui/TitlePane.h b/main/gui/TitlePane.h old mode 100644 new mode 100755 index 519a685..5497a67 --- a/main/gui/TitlePane.h +++ b/main/gui/TitlePane.h @@ -1,6 +1,6 @@ /**************************************************************************************** * TitlePane.h - A class that creates a simple title pane - * + * * Created on Jan. 04, 2020 * Copyright (c) 2019 Ed Nelson (https://github.com/enelson1001) * Licensed under MIT License (see LICENSE file) @@ -41,6 +41,7 @@ namespace redstone void hide() override; private: + lv_style_t plain_style; lv_style_t title_style; lv_obj_t* title_container; lv_obj_t* title_label; diff --git a/main/gui/ViewController.cpp b/main/gui/ViewController.cpp old mode 100644 new mode 100755 index 89a516f..45b14c5 --- a/main/gui/ViewController.cpp +++ b/main/gui/ViewController.cpp @@ -63,11 +63,11 @@ namespace redstone display_driver.initialize(); // create the title panes - title_pane = std::make_unique("DHT12 Temperature"); + title_pane = std::make_unique("DHT12 Temperature"); title_pane->create(LV_HOR_RES, 20); title_panes[Temp] = std::move(title_pane); - title_pane = std::make_unique("DHT12 Humidity"); + title_pane = std::make_unique("DHT12 Humidity"); title_pane->create(LV_HOR_RES, 20); title_panes[Humidity] = std::move(title_pane); diff --git a/main/gui/ViewController.h b/main/gui/ViewController.h old mode 100644 new mode 100755 diff --git a/main/main.cpp b/main/main.cpp old mode 100644 new mode 100755 diff --git a/main/model/Axp192Init.h b/main/model/Axp192Init.h old mode 100644 new mode 100755 diff --git a/main/model/AxpValue.h b/main/model/AxpValue.h old mode 100644 new mode 100755 diff --git a/main/model/EnvHat.cpp b/main/model/EnvHat.cpp old mode 100644 new mode 100755 index a308f30..0cfc60b --- a/main/model/EnvHat.cpp +++ b/main/model/EnvHat.cpp @@ -26,6 +26,7 @@ namespace redstone { // Class constants static const char* TAG = "EnvHat"; + static const float T_COMP_CELSIUS = 3.9; // temperature compenstation for DHT12 in EnvHat // Constructor EnvHat::EnvHat() : @@ -101,7 +102,7 @@ namespace redstone { float temperature, humidity; dht12->read_measurements(humidity, temperature); - envir_value.set_temperture_degree_C(temperature); + envir_value.set_temperture_degree_C(temperature - T_COMP_CELSIUS); envir_value.set_relative_humidity(humidity); } diff --git a/main/model/EnvHat.h b/main/model/EnvHat.h old mode 100644 new mode 100755 diff --git a/main/model/EnvirValue.h b/main/model/EnvirValue.h old mode 100644 new mode 100755 diff --git a/main/model/M5StickC.cpp b/main/model/M5StickC.cpp old mode 100644 new mode 100755 diff --git a/main/model/M5StickC.h b/main/model/M5StickC.h old mode 100644 new mode 100755 diff --git a/partitions.csv b/partitions.csv old mode 100644 new mode 100755 diff --git a/photos/AxpPMU1.JPG b/photos/AxpPMU1.JPG old mode 100644 new mode 100755 diff --git a/photos/AxpPMU2.JPG b/photos/AxpPMU2.JPG old mode 100644 new mode 100755 diff --git a/photos/AxpPMU3.JPG b/photos/AxpPMU3.JPG old mode 100644 new mode 100755 diff --git a/photos/BMP280.JPG b/photos/BMP280.JPG old mode 100644 new mode 100755 diff --git a/photos/DHT12_Humd.JPG b/photos/DHT12_Humd.JPG old mode 100644 new mode 100755 diff --git a/photos/DHT12_Temp.JPG b/photos/DHT12_Temp.JPG old mode 100644 new mode 100755 diff --git a/sdkconfig b/sdkconfig old mode 100644 new mode 100755 index 484c479..be201ff --- a/sdkconfig +++ b/sdkconfig @@ -2,16 +2,47 @@ # Automatically generated file. DO NOT EDIT. # Espressif IoT Development Framework (ESP-IDF) Project Configuration # -CONFIG_IDF_TARGET_ESP32=y +CONFIG_IDF_CMAKE=y +CONFIG_IDF_TARGET_ARCH_XTENSA=y CONFIG_IDF_TARGET="esp32" +CONFIG_IDF_TARGET_ESP32=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 # # SDK tool configuration # CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" +# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set +# end of SDK tool configuration + +# +# Build type +# +CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y +# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set +CONFIG_APP_BUILD_GENERATE_BINARIES=y +CONFIG_APP_BUILD_BOOTLOADER=y +CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y +# end of Build type + +# +# Application manager +# CONFIG_APP_COMPILE_TIME_DATE=y # CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set # CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set +# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 +# end of Application manager + +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set # CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set # CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set # CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set @@ -27,10 +58,26 @@ CONFIG_BOOTLOADER_WDT_ENABLE=y # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set CONFIG_BOOTLOADER_WDT_TIME_MS=9000 # CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set +CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 +# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set +# end of Bootloader config + +# +# Security features +# # CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set -# CONFIG_SECURE_BOOT_ENABLED is not set +# CONFIG_SECURE_BOOT is not set # CONFIG_SECURE_FLASH_ENC_ENABLED is not set +# end of Security features + +# +# Serial flasher config +# CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 +# CONFIG_ESPTOOLPY_NO_STUB is not set # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set CONFIG_ESPTOOLPY_FLASHMODE_DIO=y @@ -54,6 +101,7 @@ CONFIG_ESPTOOLPY_BEFORE="default_reset" CONFIG_ESPTOOLPY_AFTER_RESET=y # CONFIG_ESPTOOLPY_AFTER_NORESET is not set CONFIG_ESPTOOLPY_AFTER="hard_reset" +# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set # CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set # CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y @@ -63,6 +111,11 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y # CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 +# end of Serial flasher config + +# +# Partition Table +# # CONFIG_PARTITION_TABLE_SINGLE_APP is not set # CONFIG_PARTITION_TABLE_TWO_OTA is not set CONFIG_PARTITION_TABLE_CUSTOM=y @@ -70,45 +123,160 @@ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_OFFSET=0x8000 CONFIG_PARTITION_TABLE_MD5=y -CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y -# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set +# end of Partition Table + +# +# Compiler options +# +CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y +# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_COMPILER_OPTIMIZATION_NONE is not set CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set CONFIG_COMPILER_CXX_EXCEPTIONS=y CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE=0 +# CONFIG_COMPILER_CXX_RTTI is not set CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y # CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set # CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set # CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set -# CONFIG_COMPILER_STACK_CHECK is not set # CONFIG_COMPILER_WARN_WRITE_STRINGS is not set # CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set -# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set -CONFIG_ESP32_APPTRACE_DEST_NONE=y -# CONFIG_ESP32_APPTRACE_ENABLE is not set -CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +# CONFIG_COMPILER_DUMP_RTL_FILES is not set +# end of Compiler options + +# +# Component config +# + +# +# Application Level Tracing +# +# CONFIG_APPTRACE_DEST_TRAX is not set +CONFIG_APPTRACE_DEST_NONE=y +CONFIG_APPTRACE_LOCK_ENABLE=y +# end of Application Level Tracing + +# +# ESP-ASIO +# +# CONFIG_ASIO_SSL_SUPPORT is not set +# end of ESP-ASIO + +# +# Bluetooth +# # CONFIG_BT_ENABLED is not set CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 +CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0 +CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0 CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=0 CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0 CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0 CONFIG_BTDM_CTRL_PINNED_TO_CORE=0 CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1 +CONFIG_BT_CTRL_MODE_EFF=1 +CONFIG_BT_CTRL_BLE_MAX_ACT=10 +CONFIG_BT_CTRL_BLE_MAX_ACT_EFF=10 +CONFIG_BT_CTRL_BLE_STATIC_ACL_TX_BUF_NB=0 +CONFIG_BT_CTRL_PINNED_TO_CORE=0 +CONFIG_BT_CTRL_HCI_TL=1 +CONFIG_BT_CTRL_ADV_DUP_FILT_MAX=30 +CONFIG_BT_CTRL_HW_CCA_EFF=0 +CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=0 +CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y +CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM=100 +CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 +CONFIG_BT_CTRL_BLE_SCAN_DUPL=y +CONFIG_BT_CTRL_SCAN_DUPL_TYPE=0 +CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE=100 +CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF=0 +CONFIG_BT_CTRL_SLEEP_MODE_EFF=0 +CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0 +CONFIG_BT_CTRL_HCI_TL_EFF=1 CONFIG_BT_RESERVE_DRAM=0 +# end of Bluetooth + +# +# CoAP Configuration +# +CONFIG_COAP_MBEDTLS_PSK=y +# CONFIG_COAP_MBEDTLS_PKI is not set +# CONFIG_COAP_MBEDTLS_DEBUG is not set +CONFIG_COAP_LOG_DEFAULT_LEVEL=0 +# end of CoAP Configuration + +# +# Driver configurations +# + +# +# ADC configuration +# # CONFIG_ADC_FORCE_XPD_FSM is not set CONFIG_ADC_DISABLE_DAC=y +# end of ADC configuration + +# +# SPI configuration +# # CONFIG_SPI_MASTER_IN_IRAM is not set CONFIG_SPI_MASTER_ISR_IN_IRAM=y # CONFIG_SPI_SLAVE_IN_IRAM is not set CONFIG_SPI_SLAVE_ISR_IN_IRAM=y +# end of SPI configuration + +# +# TWAI configuration +# +# CONFIG_TWAI_ISR_IN_IRAM is not set +# end of TWAI configuration + +# +# UART configuration +# +# CONFIG_UART_ISR_IN_IRAM is not set +# end of UART configuration + +# +# RTCIO configuration +# +# CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set +# end of RTCIO configuration + +# +# GPIO Configuration +# +# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set +# end of GPIO Configuration +# end of Driver configurations + +# +# eFuse Bit Manager +# # CONFIG_EFUSE_CUSTOM_TABLE is not set # CONFIG_EFUSE_VIRTUAL is not set # CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y # CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set CONFIG_EFUSE_MAX_BLK_LEN=192 +# end of eFuse Bit Manager + +# +# ESP-TLS +# +CONFIG_ESP_TLS_USING_MBEDTLS=y +# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set # CONFIG_ESP_TLS_SERVER is not set +# CONFIG_ESP_TLS_PSK_VERIFICATION is not set +# CONFIG_ESP_TLS_INSECURE is not set +# end of ESP-TLS + +# +# ESP32-specific +# CONFIG_ESP32_REV_MIN_0=y # CONFIG_ESP32_REV_MIN_1 is not set # CONFIG_ESP32_REV_MIN_2 is not set @@ -120,8 +288,6 @@ CONFIG_ESP32_DPORT_WORKAROUND=y CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 # CONFIG_ESP32_SPIRAM_SUPPORT is not set -# CONFIG_ESP32_MEMMAP_TRACEMEM is not set -# CONFIG_ESP32_MEMMAP_TRACEMEM_TWOBANKS is not set # CONFIG_ESP32_TRAX is not set CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 # CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set @@ -129,12 +295,7 @@ CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 # CONFIG_ESP32_ULP_COPROC_ENABLED is not set CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 -# CONFIG_ESP32_PANIC_PRINT_HALT is not set -CONFIG_ESP32_PANIC_PRINT_REBOOT=y -# CONFIG_ESP32_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP32_PANIC_GDBSTUB is not set CONFIG_ESP32_DEBUG_OCDAWARE=y -CONFIG_ESP32_DEBUG_STUBS_ENABLE=y CONFIG_ESP32_BROWNOUT_DET=y CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set @@ -165,20 +326,31 @@ CONFIG_ESP32_XTAL_FREQ=40 # CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set # CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 -# CONFIG_PM_ENABLE is not set +# end of ESP32-specific + +# +# ADC-Calibration +# CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y CONFIG_ADC_CAL_LUT_ENABLE=y -# CONFIG_ESP_TIMER_PROFILING is not set +# end of ADC-Calibration + +# +# Common ESP-related +# CONFIG_ESP_ERR_TO_NAME_LOOKUP=y CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=3072 CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 -CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 +CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y +CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 CONFIG_ESP_CONSOLE_UART_DEFAULT=y # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set -# CONFIG_ESP_CONSOLE_UART_NONE is not set +# CONFIG_ESP_CONSOLE_NONE is not set +CONFIG_ESP_CONSOLE_UART=y +CONFIG_ESP_CONSOLE_MULTIPLE_UART=y CONFIG_ESP_CONSOLE_UART_NUM=0 CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 CONFIG_ESP_INT_WDT=y @@ -189,34 +361,120 @@ CONFIG_ESP_TASK_WDT=y CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y +# CONFIG_ESP_PANIC_HANDLER_IRAM is not set +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_BT_OFFSET=2 +CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y +# end of Common ESP-related + +# +# Ethernet +# +CONFIG_ETH_ENABLED=y CONFIG_ETH_USE_ESP32_EMAC=y CONFIG_ETH_PHY_INTERFACE_RMII=y # CONFIG_ETH_PHY_INTERFACE_MII is not set CONFIG_ETH_RMII_CLK_INPUT=y # CONFIG_ETH_RMII_CLK_OUTPUT is not set CONFIG_ETH_RMII_CLK_IN_GPIO=0 -CONFIG_ETH_SMI_MDC_GPIO=23 -CONFIG_ETH_SMI_MDIO_GPIO=18 -CONFIG_ETH_PHY_USE_RST=y -CONFIG_ETH_PHY_RST_GPIO=5 CONFIG_ETH_DMA_BUFFER_SIZE=512 CONFIG_ETH_DMA_RX_BUFFER_NUM=10 CONFIG_ETH_DMA_TX_BUFFER_NUM=10 CONFIG_ETH_USE_SPI_ETHERNET=y CONFIG_ETH_SPI_ETHERNET_DM9051=y -CONFIG_ETH_DM9051_INT_GPIO=4 +# CONFIG_ETH_SPI_ETHERNET_W5500 is not set +# CONFIG_ETH_USE_OPENETH is not set +# end of Ethernet + +# +# Event Loop Library +# # CONFIG_ESP_EVENT_LOOP_PROFILING is not set CONFIG_ESP_EVENT_POST_FROM_ISR=y CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y +# end of Event Loop Library + +# +# GDB Stub +# +# end of GDB Stub + +# +# ESP HTTP client +# CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y # CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set +# end of ESP HTTP client + +# +# HTTP Server +# CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 CONFIG_HTTPD_MAX_URI_LEN=512 CONFIG_HTTPD_ERR_RESP_NO_DELAY=y CONFIG_HTTPD_PURGE_BUF_LEN=32 # CONFIG_HTTPD_LOG_PURGE_DATA is not set +# CONFIG_HTTPD_WS_SUPPORT is not set +# end of HTTP Server + +# +# ESP HTTPS OTA +# # CONFIG_OTA_ALLOW_HTTP is not set +# end of ESP HTTPS OTA + +# +# ESP HTTPS server +# # CONFIG_ESP_HTTPS_SERVER_ENABLE is not set +# end of ESP HTTPS server + +# +# ESP NETIF Adapter +# +CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 +CONFIG_ESP_NETIF_TCPIP_LWIP=y +# CONFIG_ESP_NETIF_LOOPBACK is not set +CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y +# end of ESP NETIF Adapter + +# +# Power Management +# +# CONFIG_PM_ENABLE is not set +# end of Power Management + +# +# ESP System Settings +# +# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set +CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y +# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set +CONFIG_ESP_SYSTEM_PD_FLASH=y + +# +# Memory protection +# +# end of Memory protection +# end of ESP System Settings + +# +# High resolution timer (esp_timer) +# +# CONFIG_ESP_TIMER_PROFILING is not set +CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y +CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y +CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 +# CONFIG_ESP_TIMER_IMPL_FRC2 is not set +CONFIG_ESP_TIMER_IMPL_TG0_LAC=y +# end of High resolution timer (esp_timer) + +# +# Wi-Fi +# CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y @@ -235,14 +493,31 @@ CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 # CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE is not set CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y +# CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set +# end of Wi-Fi + +# +# PHY +# CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP32_PHY_MAX_TX_POWER=20 -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y -# CONFIG_ESP32_ENABLE_COREDUMP is not set +# end of PHY + +# +# Core dump +# +# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set +# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set +CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y +# end of Core dump + +# +# FAT Filesystem support +# # CONFIG_FATFS_CODEPAGE_DYNAMIC is not set CONFIG_FATFS_CODEPAGE_437=y # CONFIG_FATFS_CODEPAGE_720 is not set @@ -276,12 +551,26 @@ CONFIG_FATFS_API_ENCODING_ANSI_OEM=y CONFIG_FATFS_FS_LOCK=0 CONFIG_FATFS_TIMEOUT_MS=10000 CONFIG_FATFS_PER_FILE_CACHE=y +# CONFIG_FATFS_USE_FASTSEEK is not set +# end of FAT Filesystem support + +# +# Modbus configuration +# +CONFIG_FMB_COMM_MODE_TCP_EN=y +CONFIG_FMB_TCP_PORT_DEFAULT=502 +CONFIG_FMB_TCP_PORT_MAX_CONN=5 +CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20 +CONFIG_FMB_COMM_MODE_RTU_EN=y +CONFIG_FMB_COMM_MODE_ASCII_EN=y CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 CONFIG_FMB_QUEUE_LENGTH=20 -CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048 +CONFIG_FMB_PORT_TASK_STACK_SIZE=4096 CONFIG_FMB_SERIAL_BUF_SIZE=256 -CONFIG_FMB_SERIAL_TASK_PRIO=10 +CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 +CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 +CONFIG_FMB_PORT_TASK_PRIO=10 # CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 @@ -290,6 +579,12 @@ CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 CONFIG_FMB_TIMER_PORT_ENABLED=y CONFIG_FMB_TIMER_GROUP=0 CONFIG_FMB_TIMER_INDEX=0 +# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# end of Modbus configuration + +# +# FreeRTOS +# # CONFIG_FREERTOS_UNICORE is not set CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF CONFIG_FREERTOS_CORETIMER_0=y @@ -317,17 +612,41 @@ CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 # CONFIG_FREERTOS_USE_TRACE_FACILITY is not set # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set -# CONFIG_FREERTOS_DEBUG_INTERNALS is not set CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y # CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set +# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set +CONFIG_FREERTOS_DEBUG_OCDAWARE=y +# CONFIG_FREERTOS_FPU_IN_ISR is not set +# end of FreeRTOS + +# +# Heap memory debugging +# CONFIG_HEAP_POISONING_DISABLED=y # CONFIG_HEAP_POISONING_LIGHT is not set # CONFIG_HEAP_POISONING_COMPREHENSIVE is not set CONFIG_HEAP_TRACING_OFF=y # CONFIG_HEAP_TRACING_STANDALONE is not set # CONFIG_HEAP_TRACING_TOHOST is not set -# CONFIG_HEAP_TRACING is not set +# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set +# end of Heap memory debugging + +# +# jsmn +# +# CONFIG_JSMN_PARENT_LINKS is not set +# CONFIG_JSMN_STRICT is not set +# end of jsmn + +# +# libsodium +# +# end of libsodium + +# +# Log output +# # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set @@ -336,17 +655,30 @@ CONFIG_LOG_DEFAULT_LEVEL_INFO=y # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set CONFIG_LOG_DEFAULT_LEVEL=3 CONFIG_LOG_COLORS=y +CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y +# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set +# end of Log output + +# +# LWIP +# CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y # CONFIG_LWIP_L2_TO_L3_COPY is not set # CONFIG_LWIP_IRAM_OPTIMIZATION is not set CONFIG_LWIP_TIMERS_ONDEMAND=y CONFIG_LWIP_MAX_SOCKETS=10 # CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set +# CONFIG_LWIP_SO_LINGER is not set CONFIG_LWIP_SO_REUSE=y CONFIG_LWIP_SO_REUSE_RXTOALL=y # CONFIG_LWIP_SO_RCVBUF is not set -# CONFIG_LWIP_IP_FRAG is not set -# CONFIG_LWIP_IP_REASSEMBLY is not set +# CONFIG_LWIP_NETBUF_RECVINFO is not set +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP4_REASSEMBLY is not set +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# CONFIG_LWIP_IP_FORWARD is not set # CONFIG_LWIP_STATS is not set # CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set CONFIG_LWIP_ESP_GRATUITOUS_ARP=y @@ -354,52 +686,154 @@ CONFIG_LWIP_GARP_TMR_INTERVAL=60 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set + +# +# DHCP server +# CONFIG_LWIP_DHCPS_LEASE_UNIT=60 CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +# end of DHCP server + # CONFIG_LWIP_AUTOIP is not set +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set CONFIG_LWIP_NETIF_LOOPBACK=y CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 + +# +# TCP +# CONFIG_LWIP_MAX_ACTIVE_TCP=16 CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y CONFIG_LWIP_TCP_MAXRTX=12 CONFIG_LWIP_TCP_SYNMAXRTX=6 CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 CONFIG_LWIP_TCP_MSL=60000 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 CONFIG_LWIP_TCP_WND_DEFAULT=5744 CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set # CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set CONFIG_LWIP_TCP_OVERSIZE_MSS=y # CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set # CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP + +# +# UDP +# CONFIG_LWIP_MAX_UDP_PCBS=16 CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# end of UDP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF # CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# CONFIG_LWIP_SLIP_SUPPORT is not set + +# +# ICMP +# # CONFIG_LWIP_MULTICAST_PING is not set # CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# LWIP RAW API +# CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# SNTP +# CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +# end of SNTP + +CONFIG_LWIP_ESP_LWIP_ASSERT=y + +# +# Hooks +# +# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set +CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y +# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set +CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y +# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set +# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set +CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set +# end of Hooks + +# +# Debug +# +# CONFIG_LWIP_NETIF_DEBUG is not set +# CONFIG_LWIP_PBUF_DEBUG is not set +# CONFIG_LWIP_ETHARP_DEBUG is not set +# CONFIG_LWIP_API_LIB_DEBUG is not set +# CONFIG_LWIP_SOCKETS_DEBUG is not set +# CONFIG_LWIP_IP_DEBUG is not set +# CONFIG_LWIP_ICMP_DEBUG is not set +# CONFIG_LWIP_DHCP_STATE_DEBUG is not set +# CONFIG_LWIP_DHCP_DEBUG is not set +# CONFIG_LWIP_IP6_DEBUG is not set +# CONFIG_LWIP_ICMP6_DEBUG is not set +# CONFIG_LWIP_TCP_DEBUG is not set +# end of Debug +# end of LWIP + +# +# mbedTLS +# CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y # CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set # CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 # CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN is not set +# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set # CONFIG_MBEDTLS_DEBUG is not set + +# +# Certificate Bundle +# +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set +# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +# end of Certificate Bundle + # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set # CONFIG_MBEDTLS_CMAC_C is not set CONFIG_MBEDTLS_HARDWARE_AES=y CONFIG_MBEDTLS_HARDWARE_MPI=y -# CONFIG_MBEDTLS_MPI_USE_INTERRUPT is not set CONFIG_MBEDTLS_HARDWARE_SHA=y +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set CONFIG_MBEDTLS_HAVE_TIME=y # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set +CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y +CONFIG_MBEDTLS_SHA512_C=y CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y # CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set # CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set @@ -407,6 +841,10 @@ CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y CONFIG_MBEDTLS_TLS_SERVER=y CONFIG_MBEDTLS_TLS_CLIENT=y CONFIG_MBEDTLS_TLS_ENABLED=y + +# +# TLS Key Exchange Methods +# CONFIG_MBEDTLS_PSK_MODES=y CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y @@ -419,6 +857,8 @@ CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y +# end of TLS Key Exchange Methods + CONFIG_MBEDTLS_SSL_RENEGOTIATION=y # CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set CONFIG_MBEDTLS_SSL_PROTO_TLS1=y @@ -428,6 +868,10 @@ CONFIG_MBEDTLS_SSL_PROTO_DTLS=y CONFIG_MBEDTLS_SSL_ALPN=y CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y + +# +# Symmetric Ciphers +# CONFIG_MBEDTLS_AES_C=y # CONFIG_MBEDTLS_CAMELLIA_C is not set # CONFIG_MBEDTLS_DES_C is not set @@ -438,14 +882,23 @@ CONFIG_MBEDTLS_RC4_DISABLED=y # CONFIG_MBEDTLS_XTEA_C is not set CONFIG_MBEDTLS_CCM_C=y CONFIG_MBEDTLS_GCM_C=y +# end of Symmetric Ciphers + # CONFIG_MBEDTLS_RIPEMD160_C is not set + +# +# Certificates +# CONFIG_MBEDTLS_PEM_PARSE_C=y CONFIG_MBEDTLS_PEM_WRITE_C=y CONFIG_MBEDTLS_X509_CRL_PARSE_C=y CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +# end of Certificates + CONFIG_MBEDTLS_ECP_C=y CONFIG_MBEDTLS_ECDH_C=y CONFIG_MBEDTLS_ECDSA_C=y +# CONFIG_MBEDTLS_ECJPAKE_C is not set CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y @@ -459,14 +912,46 @@ CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y CONFIG_MBEDTLS_ECP_NIST_OPTIM=y +# CONFIG_MBEDTLS_POLY1305_C is not set +# CONFIG_MBEDTLS_CHACHA20_C is not set +# CONFIG_MBEDTLS_HKDF_C is not set +# CONFIG_MBEDTLS_THREADING_C is not set +# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set +# CONFIG_MBEDTLS_SECURITY_RISKS is not set +# end of mbedTLS + +# +# mDNS +# CONFIG_MDNS_MAX_SERVICES=10 +CONFIG_MDNS_TASK_PRIORITY=1 +CONFIG_MDNS_TASK_STACK_SIZE=4096 +# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_MDNS_TASK_AFFINITY_CPU0=y +# CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set +CONFIG_MDNS_TASK_AFFINITY=0x0 +CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 +CONFIG_MDNS_TIMER_PERIOD_MS=100 +# end of mDNS + +# +# ESP-MQTT Configurations +# CONFIG_MQTT_PROTOCOL_311=y CONFIG_MQTT_TRANSPORT_SSL=y CONFIG_MQTT_TRANSPORT_WEBSOCKET=y CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y +# CONFIG_MQTT_MSG_ID_INCREMENTAL is not set +# CONFIG_MQTT_SKIP_PUBLISH_IF_DISCONNECTED is not set +# CONFIG_MQTT_REPORT_DELETED_MESSAGES is not set # CONFIG_MQTT_USE_CUSTOM_CONFIG is not set # CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set # CONFIG_MQTT_CUSTOM_OUTBOX is not set +# end of ESP-MQTT Configurations + +# +# Newlib +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y # CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set # CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set @@ -474,9 +959,25 @@ CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y # CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y # CONFIG_NEWLIB_NANO_FORMAT is not set +# end of Newlib + +# +# NVS +# +# end of NVS + +# +# OpenSSL +# # CONFIG_OPENSSL_DEBUG is not set +CONFIG_OPENSSL_ERROR_STACK=y CONFIG_OPENSSL_ASSERT_DO_NOTHING=y # CONFIG_OPENSSL_ASSERT_EXIT is not set +# end of OpenSSL + +# +# PThreads +# CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 CONFIG_PTHREAD_STACK_MIN=768 @@ -485,6 +986,11 @@ CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y # CONFIG_PTHREAD_DEFAULT_CORE_1 is not set CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of PThreads + +# +# SPI Flash driver +# # CONFIG_SPI_FLASH_VERIFY_WRITE is not set # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y @@ -492,43 +998,131 @@ CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y # CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set # CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set # CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set +# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set +# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set +CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y +CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 +CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 +CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 +# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set +# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set + +# +# Auto-detect flash chips +# CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y +# end of Auto-detect flash chips + +CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y +# end of SPI Flash driver + +# +# SPIFFS Configuration +# CONFIG_SPIFFS_MAX_PARTITIONS=3 + +# +# SPIFFS Cache Configuration +# CONFIG_SPIFFS_CACHE=y CONFIG_SPIFFS_CACHE_WR=y # CONFIG_SPIFFS_CACHE_STATS is not set +# end of SPIFFS Cache Configuration + CONFIG_SPIFFS_PAGE_CHECK=y CONFIG_SPIFFS_GC_MAX_RUNS=10 # CONFIG_SPIFFS_GC_STATS is not set CONFIG_SPIFFS_PAGE_SIZE=256 CONFIG_SPIFFS_OBJ_NAME_LEN=32 +# CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set CONFIG_SPIFFS_USE_MAGIC=y CONFIG_SPIFFS_USE_MAGIC_LENGTH=y CONFIG_SPIFFS_META_LENGTH=4 CONFIG_SPIFFS_USE_MTIME=y + +# +# Debug Configuration +# # CONFIG_SPIFFS_DBG is not set # CONFIG_SPIFFS_API_DBG is not set # CONFIG_SPIFFS_GC_DBG is not set # CONFIG_SPIFFS_CACHE_DBG is not set # CONFIG_SPIFFS_CHECK_DBG is not set # CONFIG_SPIFFS_TEST_VISUALISATION is not set -CONFIG_NETIF_IP_LOST_TIMER_INTERVAL=120 -CONFIG_TCPIP_LWIP=y +# end of Debug Configuration +# end of SPIFFS Configuration + +# +# TCP Transport +# +CONFIG_WS_BUFFER_SIZE=1024 +# end of TCP Transport + +# +# TinyUSB +# +# end of TinyUSB + +# +# Unity unit testing library +# CONFIG_UNITY_ENABLE_FLOAT=y CONFIG_UNITY_ENABLE_DOUBLE=y # CONFIG_UNITY_ENABLE_COLOR is not set CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y # CONFIG_UNITY_ENABLE_FIXTURE is not set # CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set +# end of Unity unit testing library + +# +# Virtual file system +# +CONFIG_VFS_SUPPORT_IO=y +CONFIG_VFS_SUPPORT_DIR=y +CONFIG_VFS_SUPPORT_SELECT=y CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y CONFIG_VFS_SUPPORT_TERMIOS=y -CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 + +# +# Host File System I/O (Semihosting) +# +CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# end of Host File System I/O (Semihosting) +# end of Virtual file system + +# +# Wear Levelling +# # CONFIG_WL_SECTOR_SIZE_512 is not set CONFIG_WL_SECTOR_SIZE_4096=y CONFIG_WL_SECTOR_SIZE=4096 +# end of Wear Levelling + +# +# Wi-Fi Provisioning Manager +# CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 +CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +# end of Wi-Fi Provisioning Manager + +# +# Supplicant +# CONFIG_WPA_MBEDTLS_CRYPTO=y +# CONFIG_WPA_WAPI_PSK is not set +# CONFIG_WPA_DEBUG_PRINT is not set +# CONFIG_WPA_TESTING_OPTIONS is not set +# CONFIG_WPA_WPS_WARS is not set +# CONFIG_WPA_11KV_SUPPORT is not set +# end of Supplicant + +# +# Smooth +# CONFIG_SMOOTH_SOCKET_DISPATCHER_STACK_SIZE=20480 CONFIG_SMOOTH_TIMER_SERVICE_STACK_SIZE=3072 CONFIG_SMOOTH_MAX_MQTT_MESSAGE_SIZE=512 @@ -540,7 +1134,14 @@ CONFIG_SMOOTH_MQTT_LOG_LEVEL_NONE=y # CONFIG_SMOOTH_MQTT_LOG_LEVEL_DEBUG is not set # CONFIG_SMOOTH_MQTT_LOG_LEVEL_VERBOSE is not set CONFIG_SMOOTH_MQTT_LOGGING_LEVEL=0 +# end of Smooth +# end of Component config + +# +# Compatibility options +# # CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set +# end of Compatibility options # Deprecated options for backward compatibility CONFIG_TOOLPREFIX="xtensa-esp32-elf-" @@ -566,8 +1167,8 @@ CONFIG_MONITOR_BAUD_115200B=y # CONFIG_MONITOR_BAUD_OTHER is not set CONFIG_MONITOR_BAUD_OTHER_VAL=115200 CONFIG_MONITOR_BAUD=115200 -CONFIG_OPTIMIZATION_LEVEL_DEBUG=y -# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y # CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set # CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set @@ -577,17 +1178,17 @@ CONFIG_STACK_CHECK_NONE=y # CONFIG_STACK_CHECK_NORM is not set # CONFIG_STACK_CHECK_STRONG is not set # CONFIG_STACK_CHECK_ALL is not set -# CONFIG_STACK_CHECK is not set # CONFIG_WARN_WRITE_STRINGS is not set # CONFIG_DISABLE_GCC8_WARNINGS is not set +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0 CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 CONFIG_ADC2_DISABLE_DAC=y # CONFIG_SPIRAM_SUPPORT is not set -# CONFIG_MEMMAP_TRACEMEM is not set -# CONFIG_MEMMAP_TRACEMEM_TWOBANKS is not set CONFIG_TRACEMEM_RESERVE_DRAM=0x0 # CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y @@ -616,10 +1217,10 @@ CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=3072 CONFIG_MAIN_TASK_STACK_SIZE=16384 CONFIG_IPC_TASK_STACK_SIZE=1024 -CONFIG_TIMER_TASK_STACK_SIZE=3584 CONFIG_CONSOLE_UART_DEFAULT=y # CONFIG_CONSOLE_UART_CUSTOM is not set -# CONFIG_CONSOLE_UART_NONE is not set +# CONFIG_ESP_CONSOLE_UART_NONE is not set +CONFIG_CONSOLE_UART=y CONFIG_CONSOLE_UART_NUM=0 CONFIG_CONSOLE_UART_BAUDRATE=115200 CONFIG_INT_WDT=y @@ -633,10 +1234,18 @@ CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y # CONFIG_EVENT_LOOP_PROFILING is not set CONFIG_POST_EVENTS_FROM_ISR=y CONFIG_POST_EVENTS_FROM_IRAM_ISR=y +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y +# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +CONFIG_TIMER_TASK_STACK_SIZE=3584 +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 CONFIG_MB_QUEUE_LENGTH=20 -CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 +CONFIG_MB_SERIAL_TASK_STACK_SIZE=4096 CONFIG_MB_SERIAL_BUF_SIZE=256 CONFIG_MB_SERIAL_TASK_PRIO=10 # CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT is not set @@ -647,7 +1256,6 @@ CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 CONFIG_MB_TIMER_PORT_ENABLED=y CONFIG_MB_TIMER_GROUP=0 CONFIG_MB_TIMER_INDEX=0 -CONFIG_SUPPORT_STATIC_ALLOCATION=y # CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set CONFIG_TIMER_TASK_PRIORITY=1 CONFIG_TIMER_TASK_STACK_DEPTH=2048 @@ -687,7 +1295,8 @@ CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set -CONFIG_IP_LOST_TIMER_INTERVAL=120 CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y CONFIG_SUPPORT_TERMIOS=y +CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # End of deprecated options