diff options
author | robert-hh <robert@hammelrath.com> | 2024-01-24 16:48:43 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-07-04 11:50:28 +1000 |
commit | 2b8de7436bbdb54da99bf6bdb79359876fd3bc1d (patch) | |
tree | 16a0feff85716266f0f38f478e6c9c7969b17146 /extmod/vfs.c | |
parent | f61fac0ba6e2684b8bb4b11c7a768b0cb805c198 (diff) | |
download | micropython-2b8de7436bbdb54da99bf6bdb79359876fd3bc1d.tar.gz micropython-2b8de7436bbdb54da99bf6bdb79359876fd3bc1d.zip |
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 <robert@hammelrath.com>
Diffstat (limited to 'extmod/vfs.c')
0 files changed, 0 insertions, 0 deletions