diff options
| author | robert-hh <robert@hammelrath.com> | 2023-06-06 21:47:46 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-07-20 17:30:17 +1000 |
| commit | c02da6d81dcc668fd719dc78efb848388a561074 (patch) | |
| tree | f288c062ca6f86323b871d55fa495287fea4eed6 /tests/run-tests-exp.py | |
| parent | 7d66ae603d91157069d7cdee065919a61f678fb9 (diff) | |
rp2/machine_pin: Factor out pin-find code from machine_pin_make_new.
And use it in mp_hal_get_pin_obj() and machine_pin_make_new(). That way,
mp_hal_get_pin_obj() accepts both int and str objects as argument, allowing
use of a pin specifier instead of a pin object in the constructor of
devices which need a pin as parameter.
E.g. instead of
uart = UART(0, tx=Pin(0), rx=Pin(1))
one can write:
uart = UART(0, tx=0, rx=1)
Signed-off-by: robert-hh <robert@hammelrath.com>
Diffstat (limited to 'tests/run-tests-exp.py')
0 files changed, 0 insertions, 0 deletions
