Repository navigation
Conversation
|
Code size report: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19504 +/- ##
=======================================
Coverage 98.55% 98.55%
=======================================
Files 179 179
Lines 23244 23244
=======================================
Hits 22908 22908
Misses 336 336
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
@giri256 Hi! Thanks for your contribution, but please edit the description to fill in the pull request template with an explanation of this change and to confirm you've met our Generative AI Policy. |
giri256
force-pushed
the
fix/esp32-pin-mode-sentinel-19456
branch
from
July 23, 2026 01:47
6ae3d9b to
50053db
Compare
Match the documented machine.Pin sentinel and the existing pull=-1 behavior. Keep None accepted as a no-change value for compatibility, and add coverage for both constructor and init paths. Signed-off-by: Giridhar <[email protected]>
giri256
force-pushed
the
fix/esp32-pin-mode-sentinel-19456
branch
from
July 23, 2026 02:03
50053db to
85da7df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On the ESP32 port,
machine.Pindocumentsmode=-1as the sentinel forleaving the current pin mode unchanged. The implementation instead forwarded
-1togpio_set_direction(), where its set bits could enable input, output,and open-drain mode together.
This change:
-1as the constructor's mode default;mode=-1andmode=Noneas no-change values;gpio_set_direction()for the sentinel; andPin.init()paths.Fixes #19456.
Testing
matrices passed.
tools/ci.sh commit_formatting_runpasses after correcting the commitprefix, message wrapping, author email, and sign-off.
ruff format --checkandpy_compile.No ESP32 hardware was available locally, so the new hardware regression has not
been run on a physical board.
Trade-offs and Alternatives
The fix is limited to the documented no-change sentinel and preserves
mode=Nonecompatibility. It has no reported code-size impact. Passing-1through to ESP-IDF was rejected because it is not a valid no-change operation
there.
Generative AI
Generative AI tools were used to investigate, implement, test, and prepare this
PR.