diff options
author | robert-hh <robert@hammelrath.com> | 2025-08-16 14:43:37 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-09-11 12:42:24 +1000 |
commit | 66fb82e44e0beecb64225189ec8fb788b2076fb4 (patch) | |
tree | cfdddadd7b697385c0343b0c5b30a4efa3d50206 /extmod/machine_uart.c | |
parent | c50f9cbb4244a4aef2a77098939af3b7eb7410b3 (diff) |
py/stream: Add a stream.readinto1() method for machine.UART.
Avoiding the double timeout when used with the UART class.
`stream.readinto1()` returns after the first timeout.
Fixes issue #17611.
Signed-off-by: robert-hh <robert@hammelrath.com>
Diffstat (limited to 'extmod/machine_uart.c')
-rw-r--r-- | extmod/machine_uart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/machine_uart.c b/extmod/machine_uart.c index 77d5ec01f..c7e761ccd 100644 --- a/extmod/machine_uart.c +++ b/extmod/machine_uart.c @@ -142,7 +142,7 @@ static const mp_rom_map_elem_t machine_uart_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_flush), MP_ROM_PTR(&mp_stream_flush_obj) }, { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_stream_read1_obj) }, { MP_ROM_QSTR(MP_QSTR_readline), MP_ROM_PTR(&mp_stream_unbuffered_readline_obj) }, - { MP_ROM_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&mp_stream_readinto_obj) }, + { MP_ROM_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&mp_stream_readinto1_obj) }, { MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write1_obj) }, { MP_ROM_QSTR(MP_QSTR_any), MP_ROM_PTR(&machine_uart_any_obj) }, |