Repository navigation
Fix Leafony AP03 PB5 pin mapping to D4 - #3094
Merged
Merged
Conversation
Map PB5 to D4, matching digitalPin[4] = PB_5. The previous value 1 aliases PA2 and targets the wrong GPIO. Signed-off-by: Shuya Nakagawa <taltalpmh@gmail.com>
Member
|
@taltalp |
fpistm
force-pushed
the
main
branch
2 times, most recently
from
October 12, 2026 14:10
288ec52 to
0845fd7
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
Change the Leafony AP03
PB5definition from1to4.In
variant_LEAFONY_AP03.cpp,digitalPin[1]isPA_2anddigitalPin[4]isPB_5. However, the header definesPB5as1, so calls such aspinMode(PB5, ...)target PA2 (the default Serial TX pin) instead of PB5.This one-line change makes the header consistent with the pin mapping table.
PB5_ALT1also inherits the corrected definition.Validation
21c906e95078b1a8ee5a5a68059cda1fc33945f0.digitalPin[]. PB5 was the only mismatch before the fix; all 18 match after the fix.ststm32@19.3.0, Arduino STM32 Core2.10.1, and the standardboard = leafony_ap03definition. Bothstatic_assertchecks failed before the fix. The same sketch built successfully after applying the one-line change to an isolated copy of the framework.setup()was compiled but not executed.Code formatting
The change replaces a single digit and preserves the existing formatting. CI and AStyle results will be available in the PR checks.