Update documented max PIN values, to accomodate RP2350B #2072

Merged
lurch merged 1 commit from update_max_gpio into develop 2024-11-20 20:28:54 -06:00
lurch commented 2024-11-20 05:45:14 -06:00 (Migrated from github.com)
No description provided.
peterharperuk (Migrated from github.com) reviewed 2024-11-20 06:12:02 -06:00
kilograham commented 2024-11-20 10:52:15 -06:00 (Migrated from github.com)

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)

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 commented 2024-11-20 11:06:54 -06:00 (Migrated from github.com)

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

Yes, it's a bit techy. What's a bank anyway?
lurch commented 2024-11-20 15:06:06 -06:00 (Migrated from github.com)

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 💳

> 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 ? :thinking: > What's a bank anyway? I think it's a building where you used to get money from, before everything became card-only :credit_card:
kilograham (Migrated from github.com) reviewed 2024-11-20 16:51:09 -06:00
@ -1403,12 +1403,12 @@ extern void gpio_debug_pins_init(void);
#endif
kilograham (Migrated from github.com) commented 2024-11-20 16:51:09 -06:00

this is actually 0-31 still

this is actually 0-31 still
kilograham (Migrated from github.com) reviewed 2024-11-20 16:51:40 -06:00
@ -1403,12 +1403,12 @@ extern void gpio_debug_pins_init(void);
#endif
kilograham (Migrated from github.com) commented 2024-11-20 16:51:40 -06:00

this is 32 still (though actually really BASE + COUNT <=32), but i don't think we care atm

this is 32 still (though actually really BASE + COUNT <=32), but i don't think we care atm
kilograham commented 2024-11-20 16:53:39 -06:00 (Migrated from github.com)

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"

> > 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 commented 2024-11-20 16:53:54 -06:00 (Migrated from github.com)

29 if you are being pedantic

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

29 if you are being pedantic edit: not pedantic actually, accurate (except in some cases - e.g. PIO where it is actually 32)
lurch (Migrated from github.com) reviewed 2024-11-20 18:00:52 -06:00
@ -1403,12 +1403,12 @@ extern void gpio_debug_pins_init(void);
#endif
lurch (Migrated from github.com) commented 2024-11-20 18:00:52 -06:00

Ah, thanks!

Ah, thanks!
lurch commented 2024-11-20 18:29:59 -06:00 (Migrated from github.com)

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)

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)
lurch (Migrated from github.com) reviewed 2024-11-20 18:30:54 -06:00
@ -1403,12 +1403,12 @@ extern void gpio_debug_pins_init(void);
#endif
lurch (Migrated from github.com) commented 2024-11-20 18:30:54 -06:00

Actually, I'm not able to test it, but would what I've done in the latest commit actually work? 🤔

Actually, I'm not able to test it, but would what I've done in the latest commit actually work? :thinking:
lurch (Migrated from github.com) reviewed 2024-11-20 18:33:12 -06:00
lurch (Migrated from github.com) commented 2024-11-20 18:33:11 -06:00

Happy to move this change into a separate commit or separate PR if you'd prefer.

Happy to move this change into a separate commit or separate PR if you'd prefer.
kilograham (Migrated from github.com) reviewed 2024-11-20 18:58:35 -06:00
kilograham (Migrated from github.com) commented 2024-11-20 18:58:34 -06:00

yeah, I'm not sure i want to make that change - DEBUG_PINS is not really used much anyway; not sure anyone yet cares about using pins > 32

yeah, I'm not sure i want to make that change - DEBUG_PINS is not really used much anyway; not sure anyone yet cares about using pins > 32
kilograham commented 2024-11-20 18:59:12 -06:00 (Migrated from github.com)

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

presumably we can't have a comma in the middle of the max value though (oops)
kilograham commented 2024-11-20 19:00:19 -06:00 (Migrated from github.com)

maybe / instead of ,

maybe / instead of ,
lurch commented 2024-11-20 19:11:20 -06:00 (Migrated from github.com)

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)

> 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" :joy: (and I also tested before submitting the PR)
lurch (Migrated from github.com) reviewed 2024-11-20 19:12:01 -06:00
lurch (Migrated from github.com) commented 2024-11-20 19:12:01 -06:00

Fair. I've removed this change, squashed and force-pushed.

Fair. I've removed this change, squashed and force-pushed.
kilograham (Migrated from github.com) approved these changes 2024-11-20 20:28:44 -06:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!2072
No description provided.