Skip to content

Commit 3bd2e21

Browse files
Jackistanggitee-org
authored andcommitted
update src/device.c.
Correct "rt_device_read()" and "rt_device_write()" comments error. They should return 0 on fail, otherwise negative.
1 parent 6bf76a3 commit 3bd2e21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ RTM_EXPORT(rt_device_close);
339339
* @param buffer the data buffer to save read data
340340
* @param size the size of buffer
341341
*
342-
* @return the actually read size on successful, otherwise negative returned.
342+
* @return the actually read size on successful, otherwise zero returned.
343343
*
344344
* @note since 0.4.0, the unit of size/pos is a block for block device.
345345
*/
@@ -378,7 +378,7 @@ RTM_EXPORT(rt_device_read);
378378
* @param buffer the data buffer to be written to device
379379
* @param size the size of buffer
380380
*
381-
* @return the actually written size on successful, otherwise negative returned.
381+
* @return the actually written size on successful, otherwise zero returned.
382382
*
383383
* @note since 0.4.0, the unit of size/pos is a block for block device.
384384
*/

0 commit comments

Comments
 (0)