esp-rs / esp-idf-hal

embedded-hal implementation for Rust on ESP32 and ESP-IDF
https://docs.esp-rs.org/esp-idf-hal/
Apache License 2.0
415 stars 170 forks source link

ESP32/S2/S3 touch sensor support #342

Open keirlawson opened 7 months ago

keirlawson commented 7 months ago

Currently this sensor is supported by esp-idf-sys but there is no higher level wrapper, it would be great to have one!

joeatbayes commented 2 months ago

@keirlawson - Do you know when the touch driver will be available in a stable release?

keirlawson commented 2 months ago

I'm afraid I stopped working on it as my embedded Rust skills are not really up to the challenge!

joeatbayes commented 2 months ago

@keirlawson This doesn't bring in the touch driver but it does deliver similar basic capability using Rust and would work on CPU that do not have the touch pins. The main downside is this version uses core CPU cycles whereas the native touch function can run while in sleep and function as a wake-up source. https://github.com/joeatbayes/embedded-rust-examples/tree/main/ex-gpio-change-pin-direction-var-cap-read-1-pin