Module: xenomai-head
Branch: master
Commit: eb74d94fd8660749b9536222d999fb4d8dcc6c39
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=eb74d94fd8660749b9536222d999fb4d8dcc6c39

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Mon May 18 23:36:30 2009 +0200

Update indentation, add flags related macros

---

 include/comedi/command.h |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/include/comedi/command.h b/include/comedi/command.h
index 1306a3b..ac107f7 100644
--- a/include/comedi/command.h
+++ b/include/comedi/command.h
@@ -44,6 +44,10 @@
  * Perform data recovery / transmission in bulk mode
  */
 #define COMEDI_CMD_BULK 0x2
+/** 
+ * Perform a command which will write data to the device
+ */
+#define COMEDI_CMD_WRITE 0x4
 
          /*! @} COMEDI_CMD_xxx */
 
@@ -126,15 +130,27 @@
 /** 
  * Channel indication macro
  */
-#define CHAN(a) ((a)&0xffff)
+#define CHAN(a) ((a) & 0xffff)
 /** 
  * Range definition macro
  */
-#define RNG(a) (((a)&0xff)<<16)
+#define RNG(a) (((a) & 0xff) << 16)
 /** 
  * Reference definition macro
  */
-#define AREF(a) (((a)&0xf)<<24)
+#define AREF(a) (((a) & 0xf) << 24)
+/** 
+ * Flags definition macro
+ */
+#define FLAGS(a) ((a) & CR_FLAGS_MASK)
+/** 
+ * Channel + range + reference definition macro
+ */
+#define PACK(a, b, c) (CHAN(a) | RNG(b) | AREF(c))
+/** 
+ * Channel + range + reference + flags definition macro
+ */
+#define PACK_FLAGS(a, b, c, d) (CHAN(a) | RNG(b) | AREF(c) | FLAGS(d))
 
 /** 
  * Analog reference is analog ground


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to