mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 08:03:34 +08:00
Linux: changed CDev to VDev for virtual device implementation
To avoid confusion when a real device and a virtual device is being used, changed CDev to VDev for Linux. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -218,9 +218,9 @@ private:
|
||||
};
|
||||
|
||||
/**
|
||||
* Abstract class for any character device
|
||||
* Abstract class for any virtual character device
|
||||
*/
|
||||
class __EXPORT CDev : public Device
|
||||
class __EXPORT VDev : public Device
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@@ -229,12 +229,12 @@ public:
|
||||
* @param name Driver name
|
||||
* @param devname Device node name
|
||||
*/
|
||||
CDev(const char *name, const char *devname);
|
||||
VDev(const char *name, const char *devname);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~CDev();
|
||||
virtual ~VDev();
|
||||
|
||||
virtual int init();
|
||||
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
*/
|
||||
virtual int ioctl(px4_dev_handle_t *handlep, int cmd, unsigned long arg);
|
||||
|
||||
static CDev *getDev(const char *path);
|
||||
static VDev *getDev(const char *path);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -452,14 +452,15 @@ private:
|
||||
int remove_poll_waiter(px4_pollfd_struct_t *fds);
|
||||
|
||||
/* do not allow copying this class */
|
||||
CDev(const CDev&);
|
||||
CDev operator=(const CDev&);
|
||||
VDev(const VDev&);
|
||||
VDev operator=(const VDev&);
|
||||
};
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* Abstract class for character device accessed via PIO
|
||||
*/
|
||||
class __EXPORT PIO : public CDev
|
||||
class __EXPORT VPIO : public CDev
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@@ -519,6 +520,7 @@ protected:
|
||||
private:
|
||||
unsigned long _base;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // namespace device
|
||||
|
||||
|
||||
Reference in New Issue
Block a user