From e7c714f72ab578026acccfe057414a55ce47d3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 25 Jul 2024 22:38:16 +0200 Subject: [PATCH 1/9] Update GT911.h ESP_PanelTouch_GT911 with addr --- src/touch/GT911.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/touch/GT911.h b/src/touch/GT911.h index 73d55449..05929e98 100644 --- a/src/touch/GT911.h +++ b/src/touch/GT911.h @@ -33,9 +33,17 @@ class ESP_PanelTouch_GT911 : public ESP_PanelTouch { * * @param bus Pointer to panel bus * @param config Touch device configuration - * @param address The address of the touch device, default set to `0` to use the default address */ ESP_PanelTouch_GT911(ESP_PanelBus *bus, const esp_lcd_touch_config_t &config); + + /** + * @brief Construct a new touch device in a complex way, the `init()` function should be called after this function + * + * @param bus Pointer to panel bus + * @param config Touch device configuration + * @param address The address of the touch device, default set to `0` to use the default address + */ + ESP_PanelTouch_GT911(ESP_PanelBus *bus, const esp_lcd_touch_config_t &config, int address); /** * @brief Destroy the LCD device From c46490db3d4ee86af5e6ad0f8f199edca3f7d931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 25 Jul 2024 22:53:01 +0200 Subject: [PATCH 2/9] Update GT911.cpp --- src/touch/GT911.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/touch/GT911.cpp b/src/touch/GT911.cpp index cc3a06f8..9836d12b 100644 --- a/src/touch/GT911.cpp +++ b/src/touch/GT911.cpp @@ -19,6 +19,11 @@ ESP_PanelTouch_GT911::ESP_PanelTouch_GT911(ESP_PanelBus *bus, const esp_lcd_touc { } +ESP_PanelTouch_GT911::ESP_PanelTouch_GT911(ESP_PanelBus *bus, const esp_lcd_touch_config_t &config, int address): + ESP_PanelTouch(bus, config, address) +{ +} + ESP_PanelTouch_GT911::~ESP_PanelTouch_GT911() { ESP_PANEL_ENABLE_TAG_DEBUG_LOG(); From 8241bc51f7940fae35e4fa308385874f67b8f42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 25 Jul 2024 22:53:41 +0200 Subject: [PATCH 3/9] Update ESP_PanelTouch.cpp --- src/touch/ESP_PanelTouch.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/touch/ESP_PanelTouch.cpp b/src/touch/ESP_PanelTouch.cpp index 64e93065..abda3d07 100644 --- a/src/touch/ESP_PanelTouch.cpp +++ b/src/touch/ESP_PanelTouch.cpp @@ -78,6 +78,25 @@ ESP_PanelTouch::ESP_PanelTouch(ESP_PanelBus *bus, const esp_lcd_touch_config_t & } } +ESP_PanelTouch::ESP_PanelTouch(ESP_PanelBus *bus, const esp_lcd_touch_config_t &config, int address): + bus(bus), + config(config), + handle(NULL), + _swap_xy(false), + _mirror_x(false), + _mirror_y(false), + _tp_points_num(0), + _tp_buttons_state{0}, + onTouchInterruptCallback(NULL), + _isr_sem(NULL), + callback_data(CALLBACK_DATA_DEFAULT()) +{ + if ((config.int_gpio_num != GPIO_NUM_NC) && (config.interrupt_callback == NULL) && (config.user_data == NULL)) { + this->config.interrupt_callback = onTouchInterrupt; + this->config.user_data = &callback_data; + } +} + bool ESP_PanelTouch::attachInterruptCallback(std::function callback, void *user_data) { ESP_PANEL_CHECK_FALSE_RET((config.interrupt_callback == onTouchInterrupt), false, "Interruption is not enabled"); From 609fd779ddd81539367d1768a34e8cbbd69dbfab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 25 Jul 2024 22:54:06 +0200 Subject: [PATCH 4/9] Update ESP_PanelTouch.h --- src/touch/ESP_PanelTouch.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/touch/ESP_PanelTouch.h b/src/touch/ESP_PanelTouch.h index 3ea8662b..caaf59f6 100644 --- a/src/touch/ESP_PanelTouch.h +++ b/src/touch/ESP_PanelTouch.h @@ -78,6 +78,15 @@ class ESP_PanelTouch { */ ESP_PanelTouch(ESP_PanelBus *bus, const esp_lcd_touch_config_t &config); + /** + * @brief Construct a new touch device in a complex way, the `init()` function should be called after this function + * + * @param bus Pointer to panel bus + * @param config Touch device configuration + * @param address The address of the touch device, default set to `0` to use the default address + */ + ESP_PanelTouch(ESP_PanelBus *bus, const esp_lcd_touch_config_t &config, int address); + /** * @brief Destroy the LCD device * From b2c8ac61a87140e25de17e9ae61fc57f232be41f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 25 Jul 2024 22:56:09 +0200 Subject: [PATCH 5/9] Update library.properties --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index e29ffed2..2f8a775e 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESP32_Display_Panel -version=0.1.5 +version=0.1.6 author=espressif maintainer=espressif sentence=ESP32_Display_Panel is an Arduino library designed for ESP SoCs to drive display panels and facilitate rapid GUI development. From 607da04a27f10991d4e7a8d62594eaf1abcfabad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 25 Jul 2024 22:56:24 +0200 Subject: [PATCH 6/9] Update ESP_PanelVersions.h --- src/ESP_PanelVersions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ESP_PanelVersions.h b/src/ESP_PanelVersions.h index ac7043f8..6d15df0f 100644 --- a/src/ESP_PanelVersions.h +++ b/src/ESP_PanelVersions.h @@ -11,7 +11,7 @@ /* Library Version */ #define ESP_PANEL_VERSION_MAJOR 0 #define ESP_PANEL_VERSION_MINOR 1 -#define ESP_PANEL_VERSION_PATCH 5 +#define ESP_PANEL_VERSION_PATCH 6 /* File `ESP_Panel_Conf.h` */ #define ESP_PANEL_CONF_VERSION_MAJOR 0 From 5220fdf7a10e04e35171d980d6d1d77ec5770ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 25 Jul 2024 22:59:02 +0200 Subject: [PATCH 7/9] Update ESP_PanelTouch.h --- src/touch/ESP_PanelTouch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/touch/ESP_PanelTouch.h b/src/touch/ESP_PanelTouch.h index caaf59f6..6199a69c 100644 --- a/src/touch/ESP_PanelTouch.h +++ b/src/touch/ESP_PanelTouch.h @@ -83,7 +83,7 @@ class ESP_PanelTouch { * * @param bus Pointer to panel bus * @param config Touch device configuration - * @param address The address of the touch device, default set to `0` to use the default address + * @param address The address of the touch device, default set to `0` to use the default address */ ESP_PanelTouch(ESP_PanelBus *bus, const esp_lcd_touch_config_t &config, int address); From 57691ee069e1a24c5fab9c3330b92f0c7216e960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 25 Jul 2024 23:07:31 +0200 Subject: [PATCH 8/9] Update GT911.h --- src/touch/GT911.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/touch/GT911.h b/src/touch/GT911.h index 05929e98..af936ad8 100644 --- a/src/touch/GT911.h +++ b/src/touch/GT911.h @@ -35,7 +35,7 @@ class ESP_PanelTouch_GT911 : public ESP_PanelTouch { * @param config Touch device configuration */ ESP_PanelTouch_GT911(ESP_PanelBus *bus, const esp_lcd_touch_config_t &config); - + /** * @brief Construct a new touch device in a complex way, the `init()` function should be called after this function * From b6235d8c589a4e435ac9c45beecf70aa36b7c93b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Thu, 25 Jul 2024 23:08:26 +0200 Subject: [PATCH 9/9] Update ESP_PanelTouch.h --- src/touch/ESP_PanelTouch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/touch/ESP_PanelTouch.h b/src/touch/ESP_PanelTouch.h index 6199a69c..3dca153f 100644 --- a/src/touch/ESP_PanelTouch.h +++ b/src/touch/ESP_PanelTouch.h @@ -86,7 +86,7 @@ class ESP_PanelTouch { * @param address The address of the touch device, default set to `0` to use the default address */ ESP_PanelTouch(ESP_PanelBus *bus, const esp_lcd_touch_config_t &config, int address); - + /** * @brief Destroy the LCD device *