[components][drivers][serial] serial.c 修复串口有时重复发送 '\r' 的问题 (#7767)
This commit is contained in:
parent
67b38d1aad
commit
75f65b6af6
@ -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 --;
|
||||
|
Loading…
x
Reference in New Issue
Block a user