37 #include "../comedidev.h"
39 #define CNT_DRIVER_NAME "ke_counter"
40 #define PCI_VENDOR_ID_KOLTER 0x1001
41 #define CNT_CARD_DEVICE_ID 0x0014
71 outb((
unsigned char)((data[0] >> 24) & 0xff),
72 dev->
iobase + chan * 0x20 + 0x10);
73 outb((
unsigned char)((data[0] >> 16) & 0xff),
74 dev->
iobase + chan * 0x20 + 0x0c);
75 outb((
unsigned char)((data[0] >> 8) & 0xff),
76 dev->
iobase + chan * 0x20 + 0x08);
77 outb((
unsigned char)((data[0] >> 0) & 0xff),
78 dev->
iobase + chan * 0x20 + 0x04);
95 a1 =
inb(dev->
iobase + chan * 0x20 + 0x04);
96 a2 =
inb(dev->
iobase + chan * 0x20 + 0x08);
97 a3 =
inb(dev->
iobase + chan * 0x20 + 0x0c);
98 a4 =
inb(dev->
iobase + chan * 0x20 + 0x10);
100 result = (a1 + (a2 * 256) + (a3 * 65536));
104 *data = (
unsigned int)result;
110 static const void *cnt_find_boardinfo(
struct comedi_device *dev,
116 for (i = 0; i <
ARRAY_SIZE(cnt_boards); i++) {
117 board = &cnt_boards[
i];
131 comedi_set_hw_dev(dev, &pcidev->
dev);
133 board = cnt_find_boardinfo(dev, pcidev);
174 struct pci_dev *pcidev = comedi_to_pci_dev(dev);
183 .driver_name =
"ke_counter",
185 .attach_pci = cnt_attach_pci,
186 .detach = cnt_detach,
206 static struct pci_driver ke_counter_pci_driver = {
207 .name =
"ke_counter",
208 .id_table = ke_counter_pci_table,
209 .probe = ke_counter_pci_probe,