diff options
| -rw-r--r-- | ports/stm32/machine_uart.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/stm32/machine_uart.c b/ports/stm32/machine_uart.c index 9bd4c5e01..6be6bcdac 100644 --- a/ports/stm32/machine_uart.c +++ b/ports/stm32/machine_uart.c @@ -533,6 +533,7 @@ static mp_uint_t mp_machine_uart_write(mp_obj_t self_in, const void *buf_in, mp_ if (*errcode == 0 || *errcode == MP_ETIMEDOUT) { // return number of bytes written, even if there was a timeout + *errcode = 0; return num_tx << self->char_width; } else { return MP_STREAM_ERROR; |
