Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rp2/machine_adc: Initialise ADC GPIO when a Pin is referenced by int.
The change closes the gap in the API when an integer is used as Pin reference. With the change, e.g. ADC(26), ADC(Pin(26)) and ADC("GP26") behave identically and the GPIO is initialised in ACD/high-Z mode. Only when using ADC channel numbers 0-3 are the corresponding GPIO left uninitialised, and then the user is responsible for configuring the GPIO. Signed-off-by: robert-hh <[email protected]>
- Loading branch information