mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-23 01:48:50 +08:00
rt_device_write/read return data type as rt_ssize_t
rt_ssize_t can give negative error code, which follows the unix style correctly
This commit is contained in:

committed by
Man, Jianting (Meco)

parent
890c1c9264
commit
f58d3c5200
@@ -284,7 +284,7 @@ __exit:
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_size_t _sensor_read(rt_device_t dev, rt_off_t pos, void *buf, rt_size_t len)
|
||||
static rt_ssize_t _sensor_read(rt_device_t dev, rt_off_t pos, void *buf, rt_size_t len)
|
||||
{
|
||||
rt_sensor_t sensor = (rt_sensor_t)dev;
|
||||
rt_size_t result = 0;
|
||||
|
Reference in New Issue
Block a user