aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/device/cdev.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-02-11 08:24:18 +0100
committerLorenz Meier <lm@inf.ethz.ch>2014-02-11 08:24:18 +0100
commit1b978293d9cce0ddd49299ac893864fea27ae491 (patch)
tree78e6e03a233a5addc6be6fd7703438076e3a2682 /src/drivers/device/cdev.cpp
parent268f3d757f264fcd1c2217a41d5fa480e0c91a8f (diff)
parent0388d9adefb33c98f1e4350e3f2ed59a7fdd5359 (diff)
downloadpx4-firmware-1b978293d9cce0ddd49299ac893864fea27ae491.tar.gz
px4-firmware-1b978293d9cce0ddd49299ac893864fea27ae491.tar.bz2
px4-firmware-1b978293d9cce0ddd49299ac893864fea27ae491.zip
Merged master into beta
Diffstat (limited to 'src/drivers/device/cdev.cpp')
-rw-r--r--src/drivers/device/cdev.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/drivers/device/cdev.cpp b/src/drivers/device/cdev.cpp
index 7954ce5ab..b157b3f18 100644
--- a/src/drivers/device/cdev.cpp
+++ b/src/drivers/device/cdev.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
*
- * Copyright (C) 2012 PX4 Development Team. All rights reserved.
+ * Copyright (c) 2012-2014 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -38,6 +38,7 @@
*/
#include "device.h"
+#include "drivers/drv_device.h"
#include <sys/ioctl.h>
#include <arch/irq.h>
@@ -93,6 +94,7 @@ CDev::CDev(const char *name,
Device(name, irq),
// public
// protected
+ _pub_blocked(false),
// private
_devname(devname),
_registered(false),
@@ -256,6 +258,14 @@ CDev::ioctl(struct file *filp, int cmd, unsigned long arg)
case DIOC_GETPRIV:
*(void **)(uintptr_t)arg = (void *)this;
return OK;
+ break;
+ case DEVIOCSPUBBLOCK:
+ _pub_blocked = (arg != 0);
+ return OK;
+ break;
+ case DEVIOCGPUBBLOCK:
+ return _pub_blocked;
+ break;
}
return -ENOTTY;