diff options
| author | Meco Man <[email protected]> | 2023-03-17 00:12:16 -0400 |
|---|---|---|
| committer | Man, Jianting (Meco) <[email protected]> | 2023-03-20 00:06:16 -0400 |
| commit | 0f461e870c481a24ce2690cca1949706bb80f9e7 (patch) | |
| tree | e77c8813658be76824bb848346cf9ef2340806f2 /examples/rt-link/rtlink_dev_example.c | |
| parent | de963feef4c5075626858c97413186fc2a309ffe (diff) | |
[errno code][-RT_ERROR] fix that use RT_ERROR without -
Diffstat (limited to 'examples/rt-link/rtlink_dev_example.c')
| -rw-r--r-- | examples/rt-link/rtlink_dev_example.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/rt-link/rtlink_dev_example.c b/examples/rt-link/rtlink_dev_example.c index 027292769d..fb3629538a 100644 --- a/examples/rt-link/rtlink_dev_example.c +++ b/examples/rt-link/rtlink_dev_example.c @@ -311,18 +311,18 @@ void create_thead_to_test_speed(rt_uint8_t mutil_num) } } -static void rtlink_dwrite(int argc, char *argv[]) +static rt_err_t rtlink_dwrite(int argc, char *argv[]) { char *data = RT_NULL; rt_size_t length = 0; rt_uint16_t count = 0; - rt_size_t ret = RT_ERROR; + rt_size_t ret = -RT_ERROR; rt_device_t dev = rt_device_find(RTLINK01); if (dev == RT_NULL) { LOG_E("device not find!"); - return ; + return ret; } if (argc == 1) @@ -352,6 +352,7 @@ static void rtlink_dwrite(int argc, char *argv[]) LOG_E("Invalid parameter."); } } + return ret; } MSH_CMD_EXPORT(rtlink_dwrite, rtlink device interface example); |
