Skip to content

Add gpio_init_mask64 function#2907

Merged
kilograham merged 11 commits into
raspberrypi:developfrom
FLyrfors-MI:gpio_init_mask64
May 14, 2026
Merged

Add gpio_init_mask64 function#2907
kilograham merged 11 commits into
raspberrypi:developfrom
FLyrfors-MI:gpio_init_mask64

Conversation

@FLyrfors-MI
Copy link
Copy Markdown

Add gpio_init_mask64 function mirroring the other mask64/masked64 GPIO functions used by RP2350B with more than 32 GPIO's.

See #2643

Comment thread src/rp2_common/hardware_gpio/include/hardware/gpio.h Outdated
Comment thread src/rp2_common/hardware_gpio/gpio.c Outdated
Comment thread src/rp2_common/hardware_gpio/gpio.c Outdated
kilograham and others added 3 commits May 9, 2026 13:45
Co-authored-by: Andrew Scheller <lurch@durge.org>
Early out on no remaining bits in mask for no code cost vs the MIN() version
Also optimize the 64 bit methods for NUM_BANK0_GPIOS <= 32
@kilograham kilograham requested review from lurch and will-v-pi May 9, 2026 19:27
@kilograham kilograham added this to the 2.2.1 milestone May 9, 2026
Comment thread src/rp2_common/hardware_gpio/gpio.c
Comment thread src/rp2_common/hardware_gpio/gpio.c Outdated
@kilograham kilograham requested review from lurch and will-v-pi May 12, 2026 21:32
Comment thread src/rp2_common/hardware_gpio/gpio.c Outdated
Comment thread src/rp2_common/hardware_gpio/gpio.c Outdated
kilograham and others added 2 commits May 13, 2026 11:00
Co-authored-by: Andrew Scheller <lurch@durge.org>
Comment thread src/rp2_common/hardware_gpio/gpio.c Outdated
Comment thread src/rp2_common/hardware_gpio/gpio.c Outdated
Comment thread src/rp2_common/hardware_gpio/gpio.c Outdated
will-v-pi
will-v-pi previously approved these changes May 14, 2026
Copy link
Copy Markdown
Contributor

@will-v-pi will-v-pi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One possible improvement, but that can easily go in a separate PR if it's worth it, so approving

Comment thread src/rp2_common/hardware_gpio/gpio.c
@kilograham kilograham merged commit bf02d41 into raspberrypi:develop May 14, 2026
7 checks passed
carlwhamilton pushed a commit to carlwhamilton/pico-sdk that referenced this pull request May 14, 2026
* Add gpio_init_mask64 function
* Improve efficiency of various gpio mask functions

Fixes raspberrypi#2643

Co-authored-by: Andrew Scheller <lurch@durge.org>
Co-authored-by: Graham Sanderson <graham.sanderson@raspberrypi.com>
Co-authored-by: will-v-pi <108662275+will-v-pi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants