From 1a98394c13668eefefb5adcbf53badbef5615fd1 Mon Sep 17 00:00:00 2001 From: Rene Zeldenthuis Date: Mon, 20 Nov 2023 20:03:04 +0100 Subject: [PATCH] Updated documentation --- README.md | 49 +++++++++++------- .../images/Squareline-display-properties.png | Bin 0 -> 13793 bytes src/smartdisplay_cst816s.c | 4 +- src/smartdisplay_gt911.c | 4 +- src/smartdisplay_xpt2046.c | 2 + 5 files changed, 36 insertions(+), 23 deletions(-) create mode 100644 assets/images/Squareline-display-properties.png diff --git a/README.md b/README.md index ccaec5a..d16640b 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,12 @@ This library supports these boards without any effort. With the boards, there is a link supplied and there are a lot of examples present and this looks fine. These examples for [LVGL](https://lvgl.io/) depend on external libraries ([TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) or [LovyanGFX](https://github.com/lovyan03/LovyanGFX)). -However, when implementing the capacitive version, I found out that these libraries had their flaws using these boards: +However, when working with these libraries, I found out that these libraries had their flaws using these boards: +- A lot of configuring to do before it all works - A lot of not unnecessary code is included (for other boards) - No support for on the fly rotating - No auto of the box support for touch -- A lot of configuring to do before it all works This library uses the "official" drivers from Espressif's component service. These drivers use the newly introduced esp_lcd_panel interfaces. This should provide some support in the future for updates and new boards. @@ -29,8 +29,8 @@ They can be bought in the [Sunton Store](https://www.aliexpress.com/store/110019 | Type | CPU | Display | Size | Controller | Rotate support | LV_COLOR_16_SWAP | Touch | Audio | Flash | RGB LED | CDS | Link| |--- |--- |--- |-- |--- |--- |--- |--- |--- |--- |--- |--- |--- | -| ESP32-2424S012N | ESP32-C3 | 240x240 | 1.2" | [GC9A01A](assets/datasheets/GC9A01A.pdf) | | yes | n/a | no | no | no | no | [Ali Express](https://www.aliexpress.com/item/1005005453515690.html) | -| ESP32-2424S012C | ESP32-C3 | 240x240 | 1.2" | [GC9A01A](assets/datasheets/GC9A01A.pdf) | | yes | [CST816S](assets/datasheets/CST816S.pdf) | no | no | no | no | [Ali Express](https://www.aliexpress.com/item/1005005453515690.html) | +| ESP32-2424S012N | ESP32-C3 | 240x240 | 1.2" | [GC9A01A](assets/datasheets/GC9A01A.pdf) | yes | yes | n/a | no | no | no | no | [Ali Express](https://www.aliexpress.com/item/1005005453515690.html) | +| ESP32-2424S012C | ESP32-C3 | 240x240 | 1.2" | [GC9A01A](assets/datasheets/GC9A01A.pdf) | yes | yes | [CST816S](assets/datasheets/CST816S.pdf) | no | no | no | no | [Ali Express](https://www.aliexpress.com/item/1005005453515690.html) | | ESP32-2432S024N | ESP32 | 240x320 | 2.4" | [ILI9341](assets/datasheets/ILI9341.pdf) | yes | yes | n/a | yes | yes | yes | yes | [Ali Express](https://www.aliexpress.com/item/1005005865107357.html) | | ESP32-2432S024R | ESP32 | 240x320 | 2.4" | [ILI9341](assets/datasheets/ILI9341.pdf) | yes | yes | [XPT2046](assets/datasheets/XPT2046.pdf) | yes | yes | yes | yes | [Ali Express](https://www.aliexpress.com/item/1005005865107357.html) | | ESP32-2432S024C | ESP32 | 240x320 | 2.4" | [ILI9341](assets/datasheets/ILI9341.pdf) | yes | yes | [CST816S](assets/datasheets/CST816S.pdf) | yes | yes | yes | yes | [Ali Express](https://www.aliexpress.com/item/1005005865107357.html) | @@ -56,17 +56,6 @@ This library depends on: - LVGL (version ^8.3.2) -To use the LVGL library, a `lv_conf.h` file is required to define the settings for LVGL. -This file needs to be provided by the application. -As this file is referenced from the build of LVGL, the path must be known. -Normally this file is included in the include directory of **your** project so the define must be - -```ini - -D LV_CONF_PATH=${PROJECT_INCLUDE_DIR}/lv_conf.h -``` - -The template for the `lv_conf.h` file can be found in the LVGL library at `.pio/libdeps/esp32dev/lvgl/lv_conf_template.h`. - ## How to use Basically there is only **ONE** define that need to be defined: The type of board assuming everything is default. @@ -162,8 +151,30 @@ build_flags = #-D ESP32_8048S070C ``` -The path for the lv_conf.h above is `${PROJECT_INCLUDE_DIR}`. -This needs to be specified because the LVGL library included this header file. +## LVGL.h + +To use the LVGL library, a `lv_conf.h` file is required to define the settings for LVGL. +This file needs to be provided by the application. +As this file is referenced from the build of LVGL, the path must be known. +Normally this file is included in the include directory of **your** project and used by the LVGL library. +To include it globally, the define must be (for the include directory): + +```ini + -D LV_CONF_PATH=${PROJECT_INCLUDE_DIR}/lv_conf.h +``` + +The template for the `lv_conf.h` file can be found in the LVGL library at `.pio/libdeps/esp32dev/lvgl/lv_conf_template.h`. + +## LV_COLOR_16_SWAP + +The LVGL library has a define called **LV_COLOR_16_SWAP**. The value can be 1 (yes) or 0 (no). +This variable will swap the byte order of the color16_t. This is required because the SPI is by default MSB first. +Swapping these bytes will undo this. This is required for the GC9A01A, ILI9341 and ST7796 controllers. + +Additionally, when using the [SquareLine Studio](https://squareline.io/) for designing the user interface, the display properties (under the project settings) must match this variable. +So, it needs to be set both in `lv_conf.h` and the corresponding display properties (16 bit swap or 16 bit). + +![SquareLine display properties](assets/images/Squareline-display-properties.png) ## Demo application @@ -185,7 +196,7 @@ The resolution is 12 bit so valid values are from 0-1023. - November 2023 - Major version update: 2.0.0 - - Rewrote library to also support the new ESP32-S3 panels and new esp_lcd interface + - Rewrote library to also support the new ESP32-S3 panels and use new esp_lcd interface - October 2023 - Added support for esp32_8048S034N/C - Added option for flipped/mirrored TFT's @@ -211,4 +222,4 @@ The resolution is 12 bit so valid values are from 0-1023. - RGB Led output - CDS light sensor input - July 2022 - - Initial work started \ No newline at end of file + - Initial work started diff --git a/assets/images/Squareline-display-properties.png b/assets/images/Squareline-display-properties.png new file mode 100644 index 0000000000000000000000000000000000000000..3b43baf3868b9f14d1312b4deab704b37d7d0345 GIT binary patch literal 13793 zcmeHuRa{iv-!BT%p@>ofN~bi+5F;qv9ZGkDbT=px0+KQyIUvmtN{7&DyhPul10QHlVU0v8PpjX*~FjVc-%1{c^)!Nvry zQ=Q#(;O&mHs+2fdN&k}#@Bza@OhF6{tvm(~X><>K#&ML^aYjRX%z*m4Bcn>c4|bYZ zscXBa*;_d(n7J648o3yOeQ0Rjv?jJzj>-;J_Abt}khk8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Ml0IW)^XRpRQzF|678QqFT2+6aRH(XI-_jURn)d!>;@AneKr&S?!zO)B;sGN5K!1 zmk}CyFNEwz$X*pYe^g^ZEYJpi6n2|dRC{vN`4*#x7$iGk*&aqViIr)au+sk_slV!^eP z-E>Oijq}**)9Cl`d~~&|u-u1f(~tVb9mX}5Ncu{nXkU%uvgdZ$Y$uI`k}a4f`Ahzi zR`zpzL$<+1vuk0%(LY8 zAZ{j3sPcdE1S4PRGtlhMB5Z^&xM}j`IlIygh#Jmy6zZC}^JW zAd=3p-6ES?&M`zS2qDOC6F26U2y5uz+f&H%zS3!`QXE1~GozkE$nncXm~j&)jzw*6zvQ4$w!LBK(qJvRP*%s4ecZODb5VlG-lb`+8p;R?LDw4cloo$qIq4o zrQlfpzYC-YEk1W`ZHjPB!cy*vzYcG$mp1zMj5*EL8kr1_BqX$SrcOGL-`!YJNsG~i zGIrAEOdGNlRr#6(x<$AsxX5s_Z~m3TBJ$*7Rj>=jB37YCh10o~b3oVgsrL4YKZ%CO zz}K39FUke8;mYgChctQ*f5QgA4k&2EM}^(3^^@M~B+07{9rLvi8M=!q+giU&hP9{W zuoz6zdBJ&KI(fvQr2v&6%@029PKQJxR`jjrx!0-uwKsE@70x<)`SE;eFA`*wwn=__ z+DE-7q;A|YAKtJD1s>!#^{<|ey$({ow^kr6tw5t**~Xfbf_zn)0B@_0=A x&pN$P#Q%J><^Sl>lK($w`2WfjEQ_D}GqDm;nTs91Ks{_FBcb@FMBFgwe*gv`Xh8q~ literal 0 HcmV?d00001 diff --git a/src/smartdisplay_cst816s.c b/src/smartdisplay_cst816s.c index a4aa19d..2240e76 100644 --- a/src/smartdisplay_cst816s.c +++ b/src/smartdisplay_cst816s.c @@ -14,9 +14,9 @@ static void cst816s_lvgl_touch_cb(lv_indev_drv_t *drv, lv_indev_data_t *data) uint16_t touchpad_y[1] = {0}; uint8_t touchpad_cnt = 0; - /* Read touch controller data */ + // Read touch controller data ESP_ERROR_CHECK(esp_lcd_touch_read_data(touch_handle)); - /* Get coordinates */ + // Get coordinates bool pressed = esp_lcd_touch_get_coordinates(touch_handle, touchpad_x, touchpad_y, NULL, &touchpad_cnt, 1); if (pressed && touchpad_cnt > 0) { diff --git a/src/smartdisplay_gt911.c b/src/smartdisplay_gt911.c index 4746cc3..76eb37b 100644 --- a/src/smartdisplay_gt911.c +++ b/src/smartdisplay_gt911.c @@ -14,9 +14,9 @@ static void gt911_lvgl_touch_cb(lv_indev_drv_t *drv, lv_indev_data_t *data) uint16_t touchpad_y[1] = {0}; uint8_t touchpad_cnt = 0; - /* Read touch controller data */ + // Read touch controller data ESP_ERROR_CHECK(esp_lcd_touch_read_data(touch_handle)); - /* Get coordinates */ + // Get coordinates bool pressed = esp_lcd_touch_get_coordinates(touch_handle, touchpad_x, touchpad_y, NULL, &touchpad_cnt, 1); if (pressed && touchpad_cnt > 0) { diff --git a/src/smartdisplay_xpt2046.c b/src/smartdisplay_xpt2046.c index 61a96e2..e07e72f 100644 --- a/src/smartdisplay_xpt2046.c +++ b/src/smartdisplay_xpt2046.c @@ -14,7 +14,9 @@ static void xpt2046_lvgl_touch_cb(lv_indev_drv_t *drv, lv_indev_data_t *data) uint16_t touchpad_y[1] = {0}; uint8_t touchpad_cnt = 0; + // Read touch controller data ESP_ERROR_CHECK(esp_lcd_touch_read_data(touch_handle)); + // Get coordinates bool pressed = esp_lcd_touch_get_coordinates(touch_handle, touchpad_x, touchpad_y, NULL, &touchpad_cnt, 1); if (pressed && touchpad_cnt > 0) {