test with the ni_6527 Driver

 I have made a Test with the ni_6527 Driver.
 First, I have seen in the "comedi/comedi/Cinfig.in" File the new symbol
 "CONFIG_COMEDI_NI_6527". This Modul must also used with the mite Modul!
 Therefore it must insert the folowing text:
 if [ "$CONFIG_COMEDI_NI_PCIMIO" = "y" -o "$CONFIG_COMEDI_NI_PCIDIO" =
"y" -o
 "$CONFIG_COMEDI_NI_670X" = "y" -o "$CONFIG_COMEDI_NI_6527" = "y" ];then
    define_bool CONFIG_COMEDI_MITE y
   else
    if [ "$CONFIG_COMEDI_NI_PCIMIO" = "m" -o "$CONFIG_COMEDI_NI_PCIDIO" =
 "m" -o "$CONFIG_COMEDI_NI_670X" = "m" -o "$CONFIG_COMEDI_NI_6527" =
 "m" ];then
     define_bool CONFIG_COMEDI_MITE m
    fi
   fi

 I have changed the driver name from ni6527 to ni_6527. It is better the
driver name have the same name like the driver module file ni_6527.o.
In the function "ni6527_di_insn_bits" (in file ni_6527.c) I have found a
bug:
The Port_Register makro have 0 as operation value in all three lines. Line
to line it must be 0, 1 and 2.

 In the function "ni6527_attach" (in file ni_6527.c) I have found a bug:
The function fill three subdevice structs but the "n_subdevices" variable is
set with 2. I have set the variable with 3.

 How can I use the "ni6527_di_insn_config" function? The function
"comedi_dio_config" can not be used but the insn->data have only one
element. Must I use in following way?

comedi_insn insn;
unsigned int val[2];
unsigned chan;

val[0] = INSN_CONFIG_FILTER;
val[1] = 0;    /* what means this value? */
chan = 0;
memset(&insn,0,sizeof(insn));
insn.insn = INSN_CONFIG;
insn.n = 2;
insn.data = val;
insn.subdev = 0;
insn.chanspec = CR_PACK(chan,0,0);
comedi_do_insn(dev,&insn);


What means the insn.data[1] value?

 In the function "ni6527_di_insn_config" I have seen the following lines:

 writeb(interval&0xff, dev->iobase + Filter_Interval(0));
writeb((interval>>8)&0xff, dev->iobase + Filter_Interval(1));
writeb((interval>>16)&0x0f, dev->iobase + Filter_Interval(1));

 Have the makro "Filter_Interval" in the last line the right operation
value?

 I have made a test with an PCI-6527 Board (without Filter config). With the
modification in "ni6527_di_insn_bits" and "ni6527_attach" it was successful.
All digital inputs and outputs works.



 Markus Dostal

Received on 2003-06-06Z09:31:46