From: Ian Abbott Date: Mon, 16 May 2011 09:31:42 +0000 (+0100) Subject: adv_pci_dio: Add 8254 counter subdevice to PCI-1751 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f190ed7b631830e5e7f9ce7dba26b2c43a0ea467;p=comedi.git adv_pci_dio: Add 8254 counter subdevice to PCI-1751 The Advantech PCI-1751 has a 8254 counter chip providing 3 counter channels. Add a counter subdevice for this card. Patch from Иван Русских (vanekrus at gmail dot com). Signed-off-by: Ian Abbott --- diff --git a/comedi/drivers/adv_pci_dio.c b/comedi/drivers/adv_pci_dio.c index 93559d99..d8b91764 100644 --- a/comedi/drivers/adv_pci_dio.c +++ b/comedi/drivers/adv_pci_dio.c @@ -110,6 +110,7 @@ typedef enum { // Advantech PCI-1751/3/3E #define PCI1751_DIO 0 /* R/W: begin of 8255 registers block */ +#define PCI1751_CNT 24 /* R/W: begin of 8254 registers block */ #define PCI1751_ICR 32 /* W: Interrupt control register */ #define PCI1751_ISR 32 /* R: Interrupt status register */ #define PCI1753_DIO 0 /* R/W: begin of 8255 registers block */ @@ -294,7 +295,7 @@ static const boardtype boardtypes[] = { {{0, 0, 0, 0}, {0, 0, 0, 0}}, {{48, PCI1751_DIO, 2, 0}, {0, 0, 0, 0}}, {0, 0, 0, 0}, - {{0, 0, 0, 0}}, + {{3, PCI1751_CNT, 1, 0}}, IO_8b}, {"pci1752", PCI_VENDOR_ID_ADVANTECH, 0x1752, PCIDIO_MAINREG, TYPE_PCI1752,