Shouldn't buf[] on line tp->data.button[i].status = buf[0] ? 1 : 0; use index i as opposed to 0?
Regardless, ESP_LCD_TOUCH_GT911_READ_KEY_REG[] are just button s' index during configuration, and does not report actual button trigger status.
On my application, with CONFIG_ESP_LCD_TOUCH_MAX_BUTTONS = 4, instead of reading from ESP_LCD_TOUCH_GT911_READ_KEY_REG[] to find out which button(s) is pressed, the actual status is reported at register ESP_LCD_TOUCH_GT911_READ_XY_REG + 1, which only reports single button index at a time. Multiple buttons pressed simultaneously may not get reported on my current register configurations.
Board
Custom board
Hardware Description
Module: ESP32-S3-WROOM-2 (Octal SPI), 32MB flash, 8MB PSRAM Compiler: xtensa-esp32s3-elf-gcc (crosstool-NG esp-12.2.0_20230208) 12.2.0 espressif/esp_lcd_touch: component_hash: d4d8f2dc33205797169a97a02e0d89a8982f59fe0509129b54422052b8522f59 source: service_url: https://api.components.espressif.com/ type: service version: 1.1.1 espressifesp_lcd_touch_gt911: component_hash: null source: path: /home/hian/esp/projects/cq50-idf5.1/components/espressifesp_lcd_touch_gt911 type: local version: 1.1.0 idf: component_hash: null source: type: idf version: 5.1.1 lvgl/lvgl: component_hash: 948bff879a345149b83065535bbc4a026ce9f47498a22881e432a264b9098015 source: service_url: https://api.components.espressif.com/ type: service version: 8.3.11 manifest_hash: 7b2ebc9db852776c29c4ccc0ebb1d97eb22f359e564723e1935582025185a84f target: esp32s3 version: 1.0.0
IDE Name
Eclipse
Operating System
Ubuntu 20.04.5 LTS
Description
Cap-touch button not detected from
static esp_err_t esp_lcd_touch_gt911_read_data(esp_lcd_touch_handle_t tp)
Shouldn't
buf[]
on linetp->data.button[i].status = buf[0] ? 1 : 0;
use indexi
as opposed to0
? Regardless,ESP_LCD_TOUCH_GT911_READ_KEY_REG[]
are just button s' index during configuration, and does not report actual button trigger status. On my application, withCONFIG_ESP_LCD_TOUCH_MAX_BUTTONS = 4
, instead of reading fromESP_LCD_TOUCH_GT911_READ_KEY_REG[]
to find out which button(s) is pressed, the actual status is reported at registerESP_LCD_TOUCH_GT911_READ_XY_REG + 1
, which only reports single button index at a time. Multiple buttons pressed simultaneously may not get reported on my current register configurations.Sketch
Other Steps to Reproduce
No response
I have checked existing issues, README.md and ESP32 Forum