Add gpio_init_mask64 function#2907
Open
FLyrfors-MI wants to merge 3 commits intoraspberrypi:developfrom
Open
Conversation
lurch
reviewed
Apr 23, 2026
Comment on lines
+51
to
52
| * The number of GPIO pins available depends on the package. There are 30 user GPIOs in bank 0 in the QFN-60 package (RP2350A), or 48 user GPIOs | ||
| * in the QFN-80 package. Bank 1 contains the 6 QSPI pins and the USB DP/DM pins. |
Contributor
There was a problem hiding this comment.
Suggested change
| * The number of GPIO pins available depends on the package. There are 30 user GPIOs in bank 0 in the QFN-60 package (RP2350A), or 48 user GPIOs | |
| * in the QFN-80 package. Bank 1 contains the 6 QSPI pins and the USB DP/DM pins. | |
| * The number of GPIO pins available depends on the package. There are 30 user GPIOs in bank 0 in the QFN-60 package (RP2350A), or 48 user GPIOs | |
| * in the QFN-80 package (RP2350B). Bank 1 contains the 6 QSPI pins and the USB DP/DM pins. |
lurch
reviewed
Apr 23, 2026
| void gpio_init_mask(uint gpio_mask) { | ||
| for(uint i=0;i<NUM_BANK0_GPIOS;i++) { | ||
| void gpio_init_mask(uint32_t gpio_mask) { | ||
| for(uint32_t i=0;i<NUM_BANK0_GPIOS;i++) { |
Contributor
There was a problem hiding this comment.
gpio_set_function_masked does
for (uint i = 0; i < MIN(NUM_BANK0_GPIOS, 32u); i++) {Probably makes sense to do the same here?
lurch
reviewed
Apr 23, 2026
| } | ||
|
|
||
| void gpio_init_mask64(uint64_t gpio_mask) { | ||
| for(uint64_t i=0;i<NUM_BANK0_GPIOS;i++) { |
Contributor
There was a problem hiding this comment.
Similarly, gpio_set_function_masked64 does
for (uint i = 0; i < MIN(NUM_BANK0_GPIOS, 64u); i++) {
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.
Add
gpio_init_mask64function mirroring the othermask64/masked64GPIO functions used by RP2350B with more than 32 GPIO's.See #2643