From 6d4764ad69483e4f7ec38471d4b0023df4f4bd0b Mon Sep 17 00:00:00 2001 From: jonas Date: Thu, 23 Feb 2023 15:56:15 +0800 Subject: [PATCH] serial_v2 rt_device_write/read return data type as rt_ssize_t --- components/drivers/serial/serial_v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/drivers/serial/serial_v2.c b/components/drivers/serial/serial_v2.c index 9e809048bd..c88df7aabe 100644 --- a/components/drivers/serial/serial_v2.c +++ b/components/drivers/serial/serial_v2.c @@ -296,7 +296,7 @@ static rt_ssize_t rt_serial_update_write_index(struct rt_ringbuffer *rb, * @param size Receive data buffer length. * @return Return the final length of data received. */ -rt_size_t _serial_poll_rx(struct rt_device *dev, +rt_ssize_t _serial_poll_rx(struct rt_device *dev, rt_off_t pos, void *buffer, rt_size_t size) @@ -343,7 +343,7 @@ rt_size_t _serial_poll_rx(struct rt_device *dev, * @param size Transmit data buffer length. * @return Return the final length of data received. */ -rt_size_t _serial_poll_tx(struct rt_device *dev, +rt_ssize_t _serial_poll_tx(struct rt_device *dev, rt_off_t pos, const void *buffer, rt_size_t size)