45 #include "../comedidev.h"
50 #define PCI_DEVICE_ID_PCI6208 0x6208
51 #define PCI_DEVICE_ID_PCI6216 0x6216
56 #define PCI6208_AO_CONTROL(x) (0x00 + (2 * (x)))
57 #define PCI6208_AO_STATUS 0x00
58 #define PCI6208_AO_STATUS_DATA_SEND (1 << 0)
59 #define PCI6208_DIO 0x40
60 #define PCI6208_DIO_DO_MASK (0x0f)
61 #define PCI6208_DIO_DO_SHIFT (0)
62 #define PCI6208_DIO_DI_MASK (0xf0)
63 #define PCI6208_DIO_DI_SHIFT (4)
65 #define PCI6208_MAX_AO_CHANNELS 16
75 .name =
"adl_pci6208",
79 .name =
"adl_pci6216",
95 unsigned long invert = 1 << (16 - 1);
96 unsigned long value = 0;
100 for (i = 0; i < insn->
n; i++) {
101 value = data[
i] ^ invert;
122 for (i = 0; i < insn->
n; i++)
148 unsigned int mask = data[0];
149 unsigned int bits = data[1];
163 static const void *pci6208_find_boardinfo(
struct comedi_device *dev,
169 for (i = 0; i <
ARRAY_SIZE(pci6208_boards); i++) {
170 boardinfo = &pci6208_boards[
i];
186 comedi_set_hw_dev(dev, &pcidev->
dev);
188 boardinfo = pci6208_find_boardinfo(dev, pcidev);
194 ret = alloc_private(dev,
sizeof(*devpriv));
253 struct pci_dev *pcidev = comedi_to_pci_dev(dev);
262 .driver_name =
"adl_pci6208",
264 .attach_pci = pci6208_attach_pci,
265 .detach = pci6208_detach,
286 static struct pci_driver adl_pci6208_pci_driver = {
287 .name =
"adl_pci6208",
288 .id_table = adl_pci6208_pci_table,
289 .probe = adl_pci6208_pci_probe,