Follow the IOExpander_Base pull API of M5Unified 0.2.21 - #3
Merged
Merged
Conversation
M5Unified 0.2.21 replaced IOExpander_Base::setPullMode(pin, bool) and enablePull(pin, bool) with setPullMode(pin, gpio_pull_t), so the library no longer compiled against it. Call the new form (setPullMode(pin, pull_up), which writes the same two register bits as the old pair) and require M5Unified >= 0.2.21 in library.properties / library.json so the dependency is resolved by the Library Manager and PlatformIO.
ainyan03
force-pushed
the
ioexpander_m5unified_0_2_21
branch
from
August 28, 2026 07:39
faea95b to
511fa11
Compare
Collaborator
|
Thanks! |
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.
Problem
M5Unified 0.2.21 changed the
IOExpander_Basepull API:setPullMode(pin, bool)andenablePull(pin, bool)were replaced bysetPullMode(pin, gpio_pull_t). M5Module-QRCode 1.0.1 calls the old form on itsPI4IOE5V6408_Class, so it no longer compiles against the current M5Unified release:(Same class of problem as m5stack/StackChan-BSP#12 for StackChan-BSP.)
Change
setPullMode(pin, true)+enablePull(pin, true)→setPullMode(pin, pull_up). The register writes are identical: both forms set the PI4IOE5V6408 pull-select bit (0x0D) and then the pull-enable bit (0x0B).depends=M5Unified (>=0.2.21)inlibrary.propertiesand"M5Unified": ">=0.2.21"inlibrary.json, so the Library Manager and PlatformIO install a matching M5Unified instead of failing at compile time.Verification
Compiled a sketch including
M5ModuleQRCode.hwith PlatformIO (pioarduino 55.03.34,m5stack-cores3, Arduino) against M5Unified 0.2.21 (develop) + M5GFX 0.2.28: fails on the unmodified library with the errors above, builds with this change.clang-format --dry-runreports no differences.