From 75f65b6af6e48f61e36e951aaa447bfc97e46773 Mon Sep 17 00:00:00 2001 From: sp-cai <70000077+sp-cai@users.noreply.github.com> Date: Sat, 8 Jul 2023 11:52:32 +0800 Subject: [PATCH] =?UTF-8?q?[components][drivers][serial]=20serial.c=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=B2=E5=8F=A3=E6=9C=89=E6=97=B6=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=8F=91=E9=80=81=20'\r'=20=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#7767)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/serial/serial.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index fe5ea0f294..fd904078f7 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -359,10 +359,9 @@ rt_inline int _serial_int_tx(struct rt_serial_device *serial, const rt_uint8_t * } } - if (serial->ops->putc(serial, *(char*)data) == -1) + while (serial->ops->putc(serial, *(char*)data) == -1) { rt_completion_wait(&(tx->completion), RT_WAITING_FOREVER); - continue; } data ++; length --;