[components][drivers][serial] serial.c 修复串口有时重复发送 '\r' 的问题 (#7767)

This commit is contained in:
sp-cai 2023-07-08 11:52:32 +08:00 committed by GitHub
parent 67b38d1aad
commit 75f65b6af6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 --;