diff options
| author | Bernard Xiong <[email protected]> | 2021-06-10 15:16:49 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-06-10 15:16:49 +0800 |
| commit | c8f72a215c41c2914b6cc84f818be11f5763cf36 (patch) | |
| tree | e859c62969cb1502e8dfdcc55ae0b6dce1d41296 /src/device.c | |
| parent | 0949986cf1ded275f163006ccabaabc00d247814 (diff) | |
| parent | 24b4b6cbb9d4b646ed52f1fc996e90f638a7aba6 (diff) | |
Merge pull request #4780 from mysterywolf/endif
[kernel]补充endif后缀注释
Diffstat (limited to 'src/device.c')
| -rw-r--r-- | src/device.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/device.c b/src/device.c index 50b83c7692..a9c244d306 100644 --- a/src/device.c +++ b/src/device.c @@ -16,9 +16,9 @@ */ #include <rtthread.h> -#if defined(RT_USING_POSIX) +#ifdef RT_USING_POSIX #include <rtdevice.h> /* for wqueue_init */ -#endif +#endif /* RT_USING_POSIX */ #ifdef RT_USING_DEVICE @@ -36,7 +36,7 @@ #define device_read (dev->read) #define device_write (dev->write) #define device_control (dev->control) -#endif +#endif /* RT_USING_DEVICE_OPS */ /** * This function registers a device driver with specified name. @@ -62,10 +62,10 @@ rt_err_t rt_device_register(rt_device_t dev, dev->ref_count = 0; dev->open_flag = 0; -#if defined(RT_USING_POSIX) +#ifdef RT_USING_POSIX dev->fops = RT_NULL; rt_wqueue_init(&(dev->wait_queue)); -#endif +#endif /* RT_USING_POSIX */ return RT_EOK; } @@ -150,7 +150,7 @@ void rt_device_destroy(rt_device_t dev) rt_free(dev); } RTM_EXPORT(rt_device_destroy); -#endif +#endif /* RT_USING_HEAP */ /** * This function will initialize the specified device @@ -434,4 +434,4 @@ rt_device_set_tx_complete(rt_device_t dev, } RTM_EXPORT(rt_device_set_tx_complete); -#endif +#endif /* RT_USING_DEVICE */ |
