diff options
| author | guo <[email protected]> | 2022-03-29 10:09:23 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-29 10:09:23 +0800 |
| commit | 846bec58a40ac72f3520d6c398f2646f98a003ed (patch) | |
| tree | 9d69228e15304bc31261d361d83540231e0e1369 /src | |
| parent | 7fee6530f97b6b33d3abde469496d06766e30905 (diff) | |
| parent | 4f97d6e1d3ceef5915bfc072931ef7b7573e7e74 (diff) | |
Merge pull request #5724 from mysterywolf/arduino
处理多处细节问题(合并时采用merge方式)
Diffstat (limited to 'src')
| -rw-r--r-- | src/device.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/device.c b/src/device.c index 4e1abbeb6f..1079e2c38f 100644 --- a/src/device.c +++ b/src/device.c @@ -178,8 +178,8 @@ rt_err_t rt_device_init(rt_device_t dev) result = device_init(dev); if (result != RT_EOK) { - rt_kprintf("To initialize device:%s failed. The error code is %d\n", - dev->parent.name, result); + RT_DEBUG_LOG(RT_DEBUG_DEVICE, ("To initialize device:%s failed. The error code is %d\n", + dev->parent.name, result)); } else { @@ -216,8 +216,8 @@ rt_err_t rt_device_open(rt_device_t dev, rt_uint16_t oflag) result = device_init(dev); if (result != RT_EOK) { - rt_kprintf("To initialize device:%s failed. The error code is %d\n", - dev->parent.name, result); + RT_DEBUG_LOG(RT_DEBUG_DEVICE, ("To initialize device:%s failed. The error code is %d\n", + dev->parent.name, result)); return result; } @@ -307,9 +307,9 @@ RTM_EXPORT(rt_device_close); * * @param size is the size of buffer. * - * @return the actually read size on successful, otherwise zero returned. + * @return the actually read size on successful, otherwise 0 will be returned. * - * @note since 0.4.0, the unit of size/pos is a block for block device. + * @note the unit of size/pos is a block for block device. */ rt_size_t rt_device_read(rt_device_t dev, rt_off_t pos, @@ -350,9 +350,9 @@ RTM_EXPORT(rt_device_read); * * @param size is the size of buffer. * - * @return the actually written size on successful, otherwise zero returned. + * @return the actually written size on successful, otherwise 0 will be returned. * - * @note since 0.4.0, the unit of size/pos is a block for block device. + * @note the unit of size/pos is a block for block device. */ rt_size_t rt_device_write(rt_device_t dev, rt_off_t pos, |
