evert-arias / EasyButton

Arduino library for debouncing momentary contact switches, detect press, release, long press and sequences with event definitions and callbacks.
https://easybtn.earias.me
MIT License
447 stars 62 forks source link

ESP32-C3 does not support Touch #74

Closed Cvaniak closed 1 year ago

Cvaniak commented 1 year ago

Overview

In file where is defined support for Touch there is check if Micro Controller is ESP32: https://github.com/evert-arias/EasyButton/blob/4e818410252e9518564fc55f8d4a976fac70a9b2/src/EasyButtonTouch.cpp#L8
How ever ESP32-C3 include this flag but also does not support Touch what causes error on build.

Solution

So this check should be more precise excluding this MC.

Temp Solution

If you have project on ESP32-C3 you can just write in this line #if false or remove files ended with *Touch.cpp.

Some links

ESP32 Comparison Full ESP32 Datasheets