-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(esp32/lcd/spi_lcd_touch):Adding driver for XPT2046 #15414
base: master
Are you sure you want to change the base?
Conversation
👋 Hello qvd808, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
9d7cf9d
to
059a96e
Compare
examples/peripherals/lcd/spi_lcd_touch/main/spi_lcd_touch_example_main.c
Show resolved
Hide resolved
Hi @qvd808 Thanks for the contribution. Please fix the pre-commit errors: https://github.com/espressif/esp-idf/actions/runs/13386255248/job/37440111031?pr=15414 You can run the pre-commit locally: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/contribute/install-pre-commit-hook.html |
059a96e
to
963a50d
Compare
@@ -125,8 +129,8 @@ static void example_lvgl_flush_cb(lv_display_t *disp, const lv_area_t *area, uin | |||
esp_lcd_panel_draw_bitmap(panel_handle, offsetx1, offsety1, offsetx2 + 1, offsety2 + 1, px_map); | |||
} | |||
|
|||
#if CONFIG_EXAMPLE_LCD_TOUCH_ENABLED | |||
static void example_lvgl_touch_cb(lv_indev_t * indev, lv_indev_data_t * data) | |||
#ifdef CONFIG_EXAMPLE_LCD_TOUCH_CONTROLLER_STMPE610 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition check can be reverted as the two versions of example_lvgl_touch_cb
are identical. The APIs are common so we can simplify the logic here.
@@ -145,6 +149,29 @@ static void example_lvgl_touch_cb(lv_indev_t * indev, lv_indev_data_t * data) | |||
data->state = LV_INDEV_STATE_RELEASED; | |||
} | |||
} | |||
#elif CONFIG_EXAMPLE_LCD_TOUCH_CONTROLLER_XPT2046 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as noted above, this block can be dropped
.swap_xy = 0, | ||
.mirror_x = 0, | ||
.mirror_y = 0, | ||
.mirror_y = 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a specific need to change this entry? Is it specific to XPT2046? If so, it likely would be best to move this (or other entries) into the Kconfig.projbuild and set them based on the selected touch controller
Description
Related
Testing
Checklist
Before submitting a Pull Request, please ensure the following: