Skip to content

Fix ESP32 touch; rework common code a bit #6772

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

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

dhalbert
Copy link
Collaborator

Fixes #6606.

  • Use ESP32 touch API properly. Note that the values returned by touch_pad_read() are lower rather than higher when the pin is touched.
  • Use TOUCH_FSM_MODE_SW instead of TOUCH_FSM_MODE_TIMER for all Espressif. It seems to work fine.
  • Refactor some code into espressif/peripherals/touch.c.

Tested on Feather Huzzah32 (ESP32), Feather ESP32 V2, Feather ESP32-S2, Feather ESP32-S3. (C3 does not have native touch.). I'd welcome other hands-on testing.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit 2f0e209 into adafruit:main Aug 17, 2022
@dhalbert dhalbert deleted the esp32-touch-fix branch August 18, 2022 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

esp32: touchio: raw_value always 65535?
2 participants