Fix GPIO # callback parameter #880

Merged
earlephilhower merged 1 commit from fcb into develop 2022-06-24 03:58:36 -05:00
earlephilhower commented 2022-06-23 21:08:16 -05:00 (Migrated from github.com)

Fixes #879

Correctly returns i, the actual GPIO number, and not the GPIO set-of-8 we're scanning.

Tested to fix https://github.com/earlephilhower/arduino-pico/issues/651

Fixes #879 Correctly returns `i`, the actual GPIO number, and not the GPIO set-of-8 we're scanning. Tested to fix https://github.com/earlephilhower/arduino-pico/issues/651
kilograham (Migrated from github.com) approved these changes 2022-06-24 03:58:24 -05:00
kilograham (Migrated from github.com) left a comment

oops; thanks

oops; thanks
lurch commented 2022-06-24 04:06:16 -05:00 (Migrated from github.com)

@kilograham I wonder if it's worth changing for (uint gpio = 0; ... to for (uint gpio8 = 0; ..., and for(uint i=gpio;... to for(uint gpio=gpio8;... to make the code slightly more readable? 🤷 (and mirroring the events8 and events variable naming)

@kilograham I wonder if it's worth changing `for (uint gpio = 0; ...` to `for (uint gpio8 = 0; ...`, and `for(uint i=gpio;...` to `for(uint gpio=gpio8;...` to make the code slightly more readable? :shrug: (and mirroring the `events8` and `events` variable naming)
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!880
No description provided.