mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
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>
This commit is contained in:
@@ -583,7 +583,7 @@ static const mp_rom_map_elem_t pyb_uart_locals_dict_table[] = {
|
||||
/// \method readline()
|
||||
{ MP_ROM_QSTR(MP_QSTR_readline), MP_ROM_PTR(&mp_stream_unbuffered_readline_obj) },
|
||||
/// \method readinto(buf[, nbytes])
|
||||
{ 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) },
|
||||
/// \method write(buf)
|
||||
{ MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write1_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_flush), MP_ROM_PTR(&mp_stream_flush_obj) },
|
||||
|
||||
Reference in New Issue
Block a user