atanisoft / esp_lcd_touch_xpt2046 Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hello @atanisoft and thank you for sharing your library.
Could you provide some working example that makes use of the LVGL framework with ESP-ISD v5.x.x?
It would be greatly appreciated.
Thanks!
Hi,
I'm using your component in a ESP32-2432S028 board. I'm running spi_lcd_touch example with ESP-IDF v5.0-rc1. I had to edit some lines at ESP_LCD_TOUCH_IO_SPI_XPT2046_CONFIG struct, but the touch component works fine! Thank you!
However, display buttons and touch coords do not match and I wonder what would be the best way to convert them applying some offsets. By now, I implemented data_convert function from esp_lcd_touch_stmpe610 component and looks good. But, would you do this conversion at app level? Maybe by implementing a process_coordinates callback function from esp_lcd_touch_config_t struct?
Thanks!
`
if (config->int_gpio_num != GPIO_NUM_NC)
{
ESP_GOTO_ON_FALSE(GPIO_IS_VALID_GPIO(config->int_gpio_num),
ESP_ERR_INVALID_ARG, err, TAG, "Invalid GPIO Interrupt Pin");
`
This should be int_gpio_num instead of rst_gpio_num, or?
I try to use Touch with ILI9488 3,5" 480x320 V1.0 XPT2046
But i don't get any error or Data.
I had it working 2021 with an older version of driver.
https://github.com/lvgl/lvgl_esp32_drivers
I have disconnected the SDO from the touch, according too lvgl/lvgl_esp32_drivers#91
But even with that no data from the touch.
Do you have any idea what can be wrong? Its the same touch code that i use with an ili9341 where the xtp2046 is working with lvgl.
I use the esp error check function and so on but nothing, not even an error.
I call from the lvgl timer handler loop
ESP_ERROR_CHECK(esp_lcd_touch_read_data(tp));
but
void touch_driver_read(lv_indev_drv_t *drv, lv_indev_data_t *data)
{
ESP_LOGI(TAG, "Read Touch Data");
uint16_t x[1];
uint16_t y[1];
uint16_t strength[1];
uint8_t count = 0;
// Update touch point data.
ESP_ERROR_CHECK(esp_lcd_touch_read_data(tp));
data->state = LV_INDEV_STATE_REL;
if (esp_lcd_touch_get_coordinates(tp, x, y, strength, &count, 1))
{
ESP_LOGI(TAG, "Touch Data %hu, %hu, %hu", *x, *y, *strength);
data->point.x = x[0];
data->point.y = y[0];
data->state = LV_INDEV_STATE_PR;
}
data->continue_reading = false;
}
seems never get called.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.