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:
Meco Man
2023-02-07 21:43:57 -05:00
committed by Man, Jianting (Meco)
parent 890c1c9264
commit f58d3c5200
308 changed files with 671 additions and 685 deletions
+2 -2
View File
@@ -311,7 +311,7 @@ RTM_EXPORT(rt_device_close);
*
* @note the unit of size/pos is a block for block device.
*/
rt_size_t rt_device_read(rt_device_t dev,
rt_ssize_t rt_device_read(rt_device_t dev,
rt_off_t pos,
void *buffer,
rt_size_t size)
@@ -354,7 +354,7 @@ RTM_EXPORT(rt_device_read);
*
* @note the unit of size/pos is a block for block device.
*/
rt_size_t rt_device_write(rt_device_t dev,
rt_ssize_t rt_device_write(rt_device_t dev,
rt_off_t pos,
const void *buffer,
rt_size_t size)