You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found ads.fs adc-pin ( adc pin -- ) still had the pin on TOS when validate-adc executed.
Made to work by adding a 'drop" prior to validate-adc. When swap was tried, left pin on TOS.
\ Set a pin to be an ADC pin ( Modified )
: adc-pin ( adc pin -- )
dup pin-internal::validate-pin
dup 26 >= swap 29 <= and averts x-pin-has-no-adc-chan
drop \ <<<<<<<<<<<<<< added because the pin was on TOS, causing validate-adc to fail.
validate-adc
;
The text was updated successfully, but these errors were encountered:
Yeah that is a bug. Actually, if you are targeting the RP2040, don't even use adc-pin because it is completely unnecessary. It is there only for compatibility with the STM32 API's sake, and I didn't catch the bug in my testing because I never used adc-pin on the RP2040.
Found ads.fs adc-pin ( adc pin -- ) still had the pin on TOS when validate-adc executed.
Made to work by adding a 'drop" prior to validate-adc. When swap was tried, left pin on TOS.
\ Set a pin to be an ADC pin ( Modified )
: adc-pin ( adc pin -- )
dup pin-internal::validate-pin
dup 26 >= swap 29 <= and averts x-pin-has-no-adc-chan
drop \ <<<<<<<<<<<<<< added because the pin was on TOS, causing validate-adc to fail.
validate-adc
;
The text was updated successfully, but these errors were encountered: