letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.28k stars 2.22k forks source link

Fix plugins for ESP32 calling pinMode often #4165

Open TD-er opened 2 years ago

TD-er commented 2 years ago

The Dallas plugins were reported to no longer work since ESP32 SDK 2.0.3. (see: https://github.com/letscontrolit/ESPEasy/pull/4164 ) Apparently the time needed to switch pin mode now takes 16 usec instead of 4 usec it was before.

Since the 1Wire protocol needs to toggle quite often between input and output mode on the same GPIO, this really makes a difference.

There are probably more plugins suffering from the same issues.

Plugins to test/check:

Fixes: https://github.com/letscontrolit/ESPEasy/issues/4026 Fixes: https://github.com/letscontrolit/ESPEasy/issues/2745

tonhuisman commented 2 years ago

Tested 7DGT (P073) on an ESP32s2 and that is working as intended 👍, without fixes or patches applied.

tonhuisman commented 2 years ago

Tested ST77xx with a ST7789 320x240 display using an ESP32, and that's also working as expected.

I guess the display-related devices aren't very timing-critical.