int div1, div2;
int base;
- for (div1 = 1; div1 <= (1 << 16); div1 <<= 1) {
+ for (div1 = 2; div1 <= (1 << 16); div1 <<= 1) {
base = i8253_osc_base * div1;
switch (round_mode) {
case TRIG_ROUND_NEAREST:
div2 = (*nanosec + base - 1) / base;
break;
}
+ if (div2 < 2) div2 = 2;
if (div2 <= 65536) {
*nanosec = div2 * base;
*d1 = div1 & 0xffff;
This driver is for both the NI PCI-DIO-32HS and the PCI-DIO-96,
which have very different architectures. But, since the '96 is
so simple, it is included here.
+
+ Manuals (available from ftp://ftp.natinst.com/support/manuals)
+
+ 320938c.pdf PCI-DIO-96/PXI-6508/PCI-6503 User Manual
+ 321464a.pdf AT/PCI-DIO-32HS User Manual
+ 321464b.pdf AT/PCI-DIO-32HS User Manual
+ 321329A.pdf PCI-6533 Register-Level Programmer Manual
+ 321330A.pdf DAQ-DIO Technical Reference Manual
+
*/
#include <linux/kernel.h>
data = it->data[i];
outb((data & 0xff), dev->iobase + (chan ? PCL812_DA2_LO : PCL812_DA1_LO));
- outb(((data & 0xf) >> 8), dev->iobase + (chan ? PCL812_DA2_HI : PCL812_DA1_HI));
+ outb((data >> 8) & 0x0f, dev->iobase + (chan ? PCL812_DA2_HI : PCL812_DA1_HI));
}
return i;
if (s->cur_trig.flags & TRIG_WAKE_EOS) {
comedi_eos(dev, s);
} else {
- comedi_eobuf(dev, s);
+ comedi_bufcheck(dev, s);
}
devpriv->int13_act_scan++;
} else {
*
*/
+#define __NO_VERSION__
+
#include <comedi_module.h>
#include <linux/kernel.h>