51 #include "../comedidev.h"
53 #define PCI_VENDOR_ID_ADVANTECH 0x13fe
56 #define PCI1723_DA(N) ((N)<<1)
58 #define PCI1723_SYN_SET 0x12
59 #define PCI1723_ALL_CHNNELE_SYN_STROBE 0x12
62 #define PCI1723_RANGE_CALIBRATION_MODE 0x14
64 #define PCI1723_RANGE_CALIBRATION_STATUS 0x14
67 #define PCI1723_CONTROL_CMD_CALIBRATION_FUN 0x16
72 #define PCI1723_STATUS_CMD_CALIBRATION_FUN 0x16
78 #define PCI1723_CALIBRATION_PARA_STROBE 0x18
81 #define PCI1723_DIGITAL_IO_PORT_SET 0x1A
82 #define PCI1723_DIGITAL_IO_PORT_MODE 0x1A
84 #define PCI1723_WRITE_DIGITAL_OUTPUT_CMD 0x1C
86 #define PCI1723_READ_DIGITAL_INPUT_DATA 0x1C
88 #define PCI1723_WRITE_CAL_CMD 0x1E
89 #define PCI1723_READ_CAL_STATUS 0x1E
91 #define PCI1723_SYN_STROBE 0x20
93 #define PCI1723_RESET_ALL_CHN_STROBE 0x22
96 #define PCI1723_RESET_CAL_CONTROL_STROBE 0x24
102 #define PCI1723_CHANGE_CHA_OUTPUT_TYPE_STROBE 0x26
108 #define PCI1723_SELECT_CALIBRATION 0x28
126 for (i = 0; i < 8; i++) {
154 for (n = 0; n < insn->
n; n++)
155 data[n] = devpriv->
ao_data[chan];
171 for (n = 0; n < insn->
n; n++) {
183 static int pci1723_dio_insn_config(
struct comedi_device *dev,
189 unsigned short dio_mode;
213 if ((s->
io_bits & 0x00FF) == 0)
215 if ((s->
io_bits & 0xFF00) == 0)
229 s->
state &= ~data[0];
230 s->
state |= (data[0] & data[1]);
244 comedi_set_hw_dev(dev, &pcidev->
dev);
247 ret = alloc_private(dev,
sizeof(*devpriv));
309 struct pci_dev *pcidev = comedi_to_pci_dev(dev);
320 .driver_name =
"adv_pci1723",
322 .attach_pci = pci1723_attach_pci,
323 .detach = pci1723_detach,
343 static struct pci_driver adv_pci1723_pci_driver = {
344 .name =
"adv_pci1723",
345 .id_table = adv_pci1723_pci_table,
346 .probe = adv_pci1723_pci_probe,