diff --git a/src/rp2040/gpio.c b/src/rp2040/gpio.c index bac67d23..98e07789 100644 --- a/src/rp2040/gpio.c +++ b/src/rp2040/gpio.c @@ -48,7 +48,7 @@ mask_to_pin(uint32_t mask) struct gpio_out gpio_out_setup(uint8_t pin, uint8_t val) { - if (pin > 30) + if (pin >= 30) goto fail; struct gpio_out g = { .bit=1< 30) + if (pin >= 30) goto fail; struct gpio_in g = { .bit=1<