revise some RT_USING_POSIX to RT_USING_POSIX_DEVIO

This commit is contained in:
Meco Man
2021-11-24 09:14:46 -05:00
parent bd80b7a4a1
commit 7c789d4b11
14 changed files with 34 additions and 52 deletions

View File

@@ -19,7 +19,7 @@
#define RTLINK_SERV(dev) (((struct rt_link_device*)dev)->service)
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX_DEVIO
#include <dfs_posix.h>
#include <poll.h>
@@ -148,7 +148,7 @@ const static struct dfs_file_ops _rtlink_fops =
RT_NULL, /* getdents */
rtlink_fops_poll,
};
#endif /* RT_USING_POSIX */
#endif /* RT_USING_POSIX_DEVIO */
/* The event type for the service channel number,
* which is used to wake up the service thread in blocking receive mode */
@@ -386,7 +386,7 @@ rt_err_t rt_link_dev_register(struct rt_link_device *rtlink,
/* register a character device */
ret = rt_device_register(device, name, flag);
#if defined(RT_USING_POSIX)
#ifdef RT_USING_POSIX_DEVIO
/* set fops */
device->fops = &_rtlink_fops;
#endif