@@ -178,8 +178,8 @@ rt_err_t rt_device_init(rt_device_t dev)
178178 result = device_init (dev );
179179 if (result != RT_EOK )
180180 {
181- rt_kprintf ("To initialize device:%s failed. The error code is %d\n" ,
182- dev -> parent .name , result );
181+ RT_DEBUG_LOG ( RT_DEBUG_DEVICE , ("To initialize device:%s failed. The error code is %d\n" ,
182+ dev -> parent .name , result )) ;
183183 }
184184 else
185185 {
@@ -216,8 +216,8 @@ rt_err_t rt_device_open(rt_device_t dev, rt_uint16_t oflag)
216216 result = device_init (dev );
217217 if (result != RT_EOK )
218218 {
219- rt_kprintf ("To initialize device:%s failed. The error code is %d\n" ,
220- dev -> parent .name , result );
219+ RT_DEBUG_LOG ( RT_DEBUG_DEVICE , ("To initialize device:%s failed. The error code is %d\n" ,
220+ dev -> parent .name , result )) ;
221221
222222 return result ;
223223 }
@@ -307,9 +307,9 @@ RTM_EXPORT(rt_device_close);
307307 *
308308 * @param size is the size of buffer.
309309 *
310- * @return the actually read size on successful, otherwise negative returned.
310+ * @return the actually read size on successful, otherwise 0 will be returned.
311311 *
312- * @note since 0.4.0, the unit of size/pos is a block for block device.
312+ * @note the unit of size/pos is a block for block device.
313313 */
314314rt_size_t rt_device_read (rt_device_t dev ,
315315 rt_off_t pos ,
@@ -350,9 +350,9 @@ RTM_EXPORT(rt_device_read);
350350 *
351351 * @param size is the size of buffer.
352352 *
353- * @return the actually written size on successful, otherwise negative returned.
353+ * @return the actually written size on successful, otherwise 0 will be returned.
354354 *
355- * @note since 0.4.0, the unit of size/pos is a block for block device.
355+ * @note the unit of size/pos is a block for block device.
356356 */
357357rt_size_t rt_device_write (rt_device_t dev ,
358358 rt_off_t pos ,
0 commit comments