Update documented max PIN values, to accomodate RP2350B #2072
No reviewers
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk!2072
Loading…
Reference in a new issue
No description provided.
Delete branch "update_max_gpio"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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-1is 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)
Yes, it's a bit techy. What's a bank anyway?
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 ? 🤔
I think it's a building where you used to get money from, before everything became card-only 💳
@ -1403,12 +1403,12 @@ extern void gpio_debug_pins_init(void);#endifthis is actually 0-31 still
@ -1403,12 +1403,12 @@ extern void gpio_debug_pins_init(void);#endifthis is 32 still (though actually really BASE + COUNT <=32), but i don't think we care atm
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"
29 if you are being pedantic
edit: not pedantic actually, accurate (except in some cases - e.g. PIO where it is actually 32)
@ -1403,12 +1403,12 @@ extern void gpio_debug_pins_init(void);#endifAh, thanks!
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)
@ -1403,12 +1403,12 @@ extern void gpio_debug_pins_init(void);#endifActually, I'm not able to test it, but would what I've done in the latest commit actually work? 🤔
Happy to move this change into a separate commit or separate PR if you'd prefer.
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
presumably we can't have a comma in the middle of the max value though (oops)
maybe / instead of ,
Yes we can, the hand-written parser for this is "clever" 😂 (and I also tested before submitting the PR)
Fair. I've removed this change, squashed and force-pushed.