rp2/machine_pin: Change N_GPIOS to NUM_BANK0_GPIOS for pico-sdk compat.

This fixes machine_pin.c to build against the new pico-sdk coming down the
pipeline, whilst still working with the existing version.
This commit is contained in:
Andrew Scheller 2021-02-01 18:21:12 +00:00 committed by Damien George
parent ffded48810
commit c9210a65df
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ typedef struct _machine_pin_irq_obj_t {
STATIC const mp_irq_methods_t machine_pin_irq_methods;
STATIC const machine_pin_obj_t machine_pin_obj[N_GPIOS] = {
STATIC const machine_pin_obj_t machine_pin_obj[NUM_BANK0_GPIOS] = {
{{&machine_pin_type}, 0},
{{&machine_pin_type}, 1},
{{&machine_pin_type}, 2},
@ -134,7 +134,7 @@ void machine_pin_init(void) {
}
void machine_pin_deinit(void) {
for (int i = 0; i < N_GPIOS; ++i) {
for (int i = 0; i < NUM_BANK0_GPIOS; ++i) {
gpio_set_irq_enabled(i, GPIO_IRQ_ALL, false);
}
irq_set_enabled(IO_IRQ_BANK0, false);