Make NuttX drivers cross platform (VDev -> CDev)

This commit is contained in:
Daniel Agar
2017-08-31 09:27:36 +02:00
committed by Lorenz Meier
parent 6562dd496b
commit 07619cf723
29 changed files with 216 additions and 306 deletions
@@ -99,11 +99,11 @@ public:
size_t _read_offset;
};
class VCDevNode : public VDev
class VCDevNode : public CDev
{
public:
VCDevNode() :
VDev("vcdevtest", TESTDEV),
CDev("vcdevtest", TESTDEV),
_is_open_for_write(false),
_write_offset(0) {};
@@ -127,7 +127,7 @@ int VCDevNode::open(device::file_t *handlep)
return -1;
}
int ret = VDev::open(handlep);
int ret = CDev::open(handlep);
if (ret != 0) {
return ret;
@@ -146,7 +146,7 @@ int VCDevNode::close(device::file_t *handlep)
{
delete (PrivData *)handlep->priv;
handlep->priv = nullptr;
VDev::close(handlep);
CDev::close(handlep);
// Enable a new writer of the device is re-opened for write
if ((handlep->flags & PX4_F_WRONLY) && _is_open_for_write) {