diff options
| author | zhkag <[email protected]> | 2023-06-21 10:22:42 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-06-21 18:22:42 +0800 |
| commit | 33f550cb65c950068ff04c331daeeda3547d2e50 (patch) | |
| tree | d04ca979398cfaa280cd9f19e400a40943f96bde /documentation/device/uart | |
| parent | b4e59bac4e2d8b039a2365ddc219ac9a3caf0f77 (diff) | |
[Kernel] message 可以返回消息的实际大小 (#7709)
Diffstat (limited to 'documentation/device/uart')
| -rw-r--r-- | documentation/device/uart/uart.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/documentation/device/uart/uart.md b/documentation/device/uart/uart.md index d49a005019..92ca9b4bf8 100644 --- a/documentation/device/uart/uart.md +++ b/documentation/device/uart/uart.md @@ -575,7 +575,7 @@ static void serial_thread_entry(void *parameter) rt_memset(&msg, 0, sizeof(msg)); /* Read messages from the message queue*/ result = rt_mq_recv(&rx_mq, &msg, sizeof(msg), RT_WAITING_FOREVER); - if (result == RT_EOK) + if (result >= 0) { /*Read data from the serial port*/ rx_length = rt_device_read(msg.dev, 0, rx_buffer, msg.size); |
