Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Usage of Bootsel Button for Pico 2 #2869

Merged
merged 4 commits into from
Nov 14, 2024
Merged

Conversation

subsonicpulse
Copy link
Contributor

Function board_button_read() was always returning TRUE on pico 2 board.

This fix make the button on pico2 board usable again.
The code that fixes the problem is from https://github.com/raspberrypi/pico-examples/blob/master/picoboard/button/button.c

@subsonicpulse
Copy link
Contributor Author

I tested that on pico and pico 2 with the HID example:
pico-sdk\sdk\2.0.0\lib\tinyusb\examples\device\hid_multiple_interface\src

Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the fix, tested and working great. I change the ifdef condition to detect arm arch to make it more generic for other vendor pico/pico2 board.

@subsonicpulse
Copy link
Contributor Author

thank you for the fix, tested and working great. I change the ifdef condition to detect arm arch to make it more generic for other vendor pico/pico2 board.

Thanks also. I was not aware of these Preprocessor Macros. I just used what was in the pico example code. ;-)

Copy link
Contributor Author

@subsonicpulse subsonicpulse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.
Really nice. I was not aware of the ARM preprocessor define.
Thats of course a more generic solution.

@hathach hathach merged commit 0569188 into hathach:master Nov 14, 2024
105 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants