summaryrefslogtreecommitdiff
path: root/nuttx/drivers
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-04-30 14:08:34 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-04-30 14:08:34 -0600
commitdc9c2633f86894a4be35596994464c1e616fedf8 (patch)
tree84d9c46b32ecbe73db5a96d23c5c5c5f34c4d3ab /nuttx/drivers
parentbc484165db04a5c4c8bcfbce28e48eb3d6a11cbb (diff)
downloadnuttx-dc9c2633f86894a4be35596994464c1e616fedf8.tar.gz
nuttx-dc9c2633f86894a4be35596994464c1e616fedf8.tar.bz2
nuttx-dc9c2633f86894a4be35596994464c1e616fedf8.zip
Enhanced timer interface from Bob Doiron
Diffstat (limited to 'nuttx/drivers')
-rw-r--r--nuttx/drivers/timer.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/nuttx/drivers/timer.c b/nuttx/drivers/timer.c
index 01195d6c9..45581f3be 100644
--- a/nuttx/drivers/timer.c
+++ b/nuttx/drivers/timer.c
@@ -372,12 +372,16 @@ static int timer_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
break;
- /* cmd: TCIOC_CAPTURE
- * Description: Called this handler on timeout
+ /* cmd: TCIOC_SETHANDLER
+ * Description: Call this handler on timeout
* Argument: A pointer to struct timer_capture_s.
+ *
+ * NOTE: This ioctl cannot be support in the kernel build mode. In that
+ * case direct callbacks from kernel space into user space is forbidden.
*/
- case TCIOC_CAPTURE:
+#ifndef CONFIG_NUTTX_KERNEL
+ case TCIOC_SETHANDLER:
{
FAR struct timer_capture_s *capture;
@@ -406,7 +410,7 @@ static int timer_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
}
break;
-
+#endif
/* Any unrecognized IOCTL commands might be platform-specific ioctl commands */