Module: xenomai-abe
Branch: analogy
Commit: 666ccc31eca25852751111ddc7f675fbe228ea1a
URL:    
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=666ccc31eca25852751111ddc7f675fbe228ea1a

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Sat Nov 28 15:56:22 2009 +0100

analogy: fix the default writing subdevice.

The subdevice index changed from zero to one (the writing subdevice on
most of the drivers). This is a temporary fix because we are able to
find out the suitable subdevice to use.

---

 src/utils/analogy/insn_write.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/utils/analogy/insn_write.c b/src/utils/analogy/insn_write.c
index 6da24da..d54a5c2 100644
--- a/src/utils/analogy/insn_write.c
+++ b/src/utils/analogy/insn_write.c
@@ -30,16 +30,23 @@
 
 #include <analogy/analogy.h>
 
+/* For write operation, we consider 
+   the default subdevice index is 1 */
+#define ID_SUBD 1
+
+/* Ten triggered scans by default */
+#define SCAN_CNT 10
+
 #define FILENAME "analogy0"
+
 #define BUF_SIZE 10000
-#define SCAN_CNT 10
 
 static unsigned char buf[BUF_SIZE]= {[0 ... BUF_SIZE - 1] = 0x5a};
 static double dbuf[BUF_SIZE] = {[0 ... BUF_SIZE - 1] = 0};
 static char *filename = FILENAME;
 static int verbose;
 static int real_time;
-static int idx_subd;
+static int idx_subd = ID_SUBD;
 static int idx_chan;
 static int idx_rng = -1;
 static unsigned int scan_size = SCAN_CNT;


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

Reply via email to