-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Possible fix for slow pin mode on Arduino >= 2.0.3 #3998
Conversation
if CORE.using_arduino: | ||
return cv.declare_id(ArduinoInternalGPIOPin)(value) | ||
raise NotImplementedError | ||
return cv.declare_id(IDFInternalGPIOPin)(value) |
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.
Might as well remove the function entirely.
@@ -1,6 +1,5 @@ | |||
#pragma once | |||
|
|||
#ifdef USE_ESP32_FRAMEWORK_ESP_IDF | |||
#include "esphome/core/hal.h" | |||
#include <driver/gpio.h> |
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.
Did this compile for you? I think when compiling with Arduino, the IDF headers aren't available (at least by default).
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.
They are available and work, the issue here is that this file still needs #ifdef USE_ESP32
as the failure comes from the esp8266 test
This most important thing to check is that this works with the existing arduino version which uses esp-idf v3. If not then it will have to be merged as part of #3564 only |
Closing this as it's already fixed in #3564 @jesserockz did you take a look at the different timings regarding idf and Arduino in the esp_one_wire.cpp? esphome/esphome/components/dallas/esp_one_wire.cpp Lines 88 to 94 in 3e11068
|
Oh I did not, I will fix that up too. Thanks |
What does this implement/fix?
The GPIO implementation changed in Arduino 2.0.3, resulting in a slow pin mode change, resulting in dallas component stop working.
The PR changes to always use idf gpio handling i ESPHome regardless of compiling using IDF or using Arduino.
esphome/issues#3401
espressif/arduino-esp32#7049
Types of changes
Related issue or feature (if applicable): fixes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#
Test Environment
Example entry for
config.yaml
:# Example config.yaml
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: