Support RP2350B parallel high GPIO pins - #57
Merged
soypat merged 1 commit intoSep 10, 2026
Merged
Conversation
Map physical GPIO pins to the correct PIO-relative GPIOBASE window before claiming resources in NewParallel, so the parallel bus can drive data lines above GPIO31 on RP2350B (e.g. Pimoroni Tufty 2350 using pico-plus2: WR on GPIO30, DB0..DB7 on GPIO32..GPIO39). RP2040 and low-GPIO RP2350 behavior is preserved unchanged (GPIOBASE 0). RP2350 layouts spanning incompatible GPIOBASE windows, or exceeding the supported GPIO range, are rejected. Physical machine pins are configured with their original numbers; PIO pin masks and state-machine OUT/SIDESET bases use the mapped relative numbers. Target-specific pin mapping lives in build-tagged parallel_pins_rp2040.go and parallel_pins_rp2350.go so RP2040 does not reference the RP2350-only SetGPIOBase method. Also validate BusWidth == 0 before evaluating BitsPerPull % BusWidth, so invalid zero-width input returns an error instead of panicking.
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.
Fixes #56; unlocks Tufty2350 support
Map physical GPIO pins to the correct PIO-relative GPIOBASE window before claiming resources in NewParallel, so the parallel bus can drive data lines above GPIO31 on RP2350B (e.g. Pimoroni Tufty 2350 using pico-plus2: WR on GPIO30, DB0..DB7 on GPIO32..GPIO39).
RP2040 and low-GPIO RP2350 behavior is preserved unchanged (GPIOBASE 0). RP2350 layouts spanning incompatible GPIOBASE windows, or exceeding the supported GPIO range, are rejected. Physical machine pins are configured with their original numbers; PIO pin masks and state-machine OUT/SIDESET bases use the mapped relative numbers. Target-specific pin mapping lives in build-tagged
parallel_pins_rp2040.go and parallel_pins_rp2350.go so RP2040 does not reference the RP2350-only SetGPIOBase method.
Also validate BusWidth == 0 before evaluating BitsPerPull % BusWidth, so invalid zero-width input returns an error instead of panicking.