Skip to content

Conversation

@lurch
Copy link
Contributor

@lurch lurch commented Nov 20, 2024

No description provided.

peterharperuk
peterharperuk previously approved these changes Nov 20, 2024
@kilograham
Copy link
Contributor

I know the old max was incorrect in some places, but I'm not sure in terms of helping the user that using NUM_BANK0_GPIOS-1 is useful. maybe we should use a pseudo value here like (highest GPIO) or (GPIO count) depending on the context...

Still on the fence though so open to thoughts (cc @liamfraser @will-v-pi @peterharperuk)

@peterharperuk
Copy link
Contributor

Yes, it's a bit techy. What's a bank anyway?

@lurch
Copy link
Contributor Author

lurch commented Nov 20, 2024

Yes, it's a bit techy.

I don't know if what I've added here is any more "techy" than anything else in section 5.1 of https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf ? 🤔

What's a bank anyway?

I think it's a building where you used to get money from, before everything became card-only 💳

@kilograham kilograham added this to the 2.1.0 milestone Nov 20, 2024
@kilograham
Copy link
Contributor

Yes, it's a bit techy.

I don't know if what I've added here is any more "techy" than anything else in section 5.1 of https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf ? 🤔

well most of those actually refer to other configuration values whereas NUM_BANK0_GPIOS is a bit of an internal thing.

we are a bit more conversational on others, e.g "1 on RP2350", so I'd say either "highest GPIO number", or "47 on RP2350B, 31 otherwise"

@kilograham
Copy link
Contributor

kilograham commented Nov 20, 2024

29 if you are being pedantic

edit: not pedantic actually, accurate (except in some cases - e.g. PIO where it is actually 32)

@lurch
Copy link
Contributor Author

lurch commented Nov 21, 2024

Thanks for the suggestion - I'm much happier with something specific like "47 on RP2350B, 31 otherwise" than with something vague like "highest GPIO". (That change has been pushed)

@kilograham
Copy link
Contributor

presumably we can't have a comma in the middle of the max value though (oops)

@kilograham
Copy link
Contributor

kilograham commented Nov 21, 2024

maybe / instead of ,

@lurch
Copy link
Contributor Author

lurch commented Nov 21, 2024

presumably we can't have a comma in the middle of the max value though (oops)

Yes we can, the hand-written parser for this is "clever" 😂 (and I also tested before submitting the PR)

@kilograham kilograham merged commit f3459a4 into develop Nov 21, 2024
8 checks passed
@kilograham kilograham deleted the update_max_gpio branch November 21, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants