Skip to content

Fix ADCInput masking #2937

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

Merged
merged 1 commit into from
May 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions libraries/ADCInput/src/ADCInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ bool ADCInput::setBuffers(size_t buffers, size_t bufferWords) {
int ADCInput::_mask(pin_size_t p) {
switch (p) {
#if defined(PICO_RP2350) && !PICO_RP2350A // RP2350B
case 26: return 1;
case 27: return 2;
case 28: return 4;
case 29: return 8;
#else // Starts at 40 and there are 8 of them
case 40: return 1;
case 41: return 2;
case 42: return 4;
Expand All @@ -63,6 +58,11 @@ int ADCInput::_mask(pin_size_t p) {
case 45: return 32;
case 46: return 64;
case 47: return 128;
#else
case 26: return 1;
case 27: return 2;
case 28: return 4;
case 29: return 8;
#endif
default: return 0;
}
Expand Down
Loading