diff options
| author | robert-hh <robert@hammelrath.com> | 2023-06-07 15:10:11 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-07-20 17:33:04 +1000 |
| commit | 29e9573de7200cc64654a77c2c20a57f89d11082 (patch) | |
| tree | d87d5d0076c93df42e21a057b2d7d848a0765386 /tests/micropython/heapalloc_traceback.py.exp | |
| parent | 3819ee4a6f07aa01f6e9d41c6617b931499f406b (diff) | |
esp32: Use always machine_pin_get_id for getting a Pin id.
This applies to all machine modules which have pins as arguments. Since
machine_pin_get_id() calls pin_find(), these pin arguments may be at the
moment either integer objects or Pin objects. That allows for instance to
write
uart = UART(1, tx=Pin(4), rx=Pin(5))
instead of
uart = UART(1, tx=4, rx=5)
which is consistent with other ports. Since this handling is done at a
single place in the code, extending that scheme to accept strings for named
pins is easy.
Signed-off-by: robert-hh <robert@hammelrath.com>
Diffstat (limited to 'tests/micropython/heapalloc_traceback.py.exp')
0 files changed, 0 insertions, 0 deletions
