2 * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
7 * Tel: +19(0)7223/9493-0
8 * Fax: +49(0)7223/9493-92
9 * http://www.addi-data-com
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the Free
14 * Software Foundation; either version 2 of the License, or (at your option)
18 /********* Definitions for APCI-2032 card *****/
20 // Card Specific information
21 #define APCI2032_BOARD_VENDOR_ID 0x15B8
22 #define APCI2032_ADDRESS_RANGE 63
24 //DIGITAL INPUT-OUTPUT DEFINE
26 #define APCI2032_DIGITAL_OP 0
27 #define APCI2032_DIGITAL_OP_RW 0
28 #define APCI2032_DIGITAL_OP_INTERRUPT 4
29 #define APCI2032_DIGITAL_OP_IRQ 12
31 //Digital Output Interrupt Status
32 #define APCI2032_DIGITAL_OP_INTERRUPT_STATUS 8
34 //Digital Output Interrupt Enable Disable.
35 #define APCI2032_DIGITAL_OP_VCC_INTERRUPT_ENABLE 0x1
36 #define APCI2032_DIGITAL_OP_VCC_INTERRUPT_DISABLE 0xFFFFFFFE
37 #define APCI2032_DIGITAL_OP_CC_INTERRUPT_ENABLE 0x2
38 #define APCI2032_DIGITAL_OP_CC_INTERRUPT_DISABLE 0xFFFFFFFD
40 //ADDIDATA Enable Disable
42 #define ADDIDATA_ENABLE 1
43 #define ADDIDATA_DISABLE 0
45 // TIMER COUNTER WATCHDOG DEFINES
47 #define ADDIDATA_WATCHDOG 2
48 #define APCI2032_DIGITAL_OP_WATCHDOG 16
49 #define APCI2032_TCW_RELOAD_VALUE 4
50 #define APCI2032_TCW_TIMEBASE 8
51 #define APCI2032_TCW_PROG 12
52 #define APCI2032_TCW_TRIG_STATUS 16
53 #define APCI2032_TCW_IRQ 20
55 // Hardware Layer functions for Apci2032
58 int i_APCI2032_ConfigDigitalOutput(comedi_device
*dev
, comedi_subdevice
*s
,
59 comedi_insn
*insn
, unsigned int *data
);
60 INT
i_APCI2032_WriteDigitalOutput(comedi_device
*dev
, comedi_subdevice
*s
,
61 comedi_insn
*insn
, unsigned int *data
);
62 INT
i_APCI2032_ReadDigitalOutput(comedi_device
*dev
, comedi_subdevice
*s
,
63 comedi_insn
*insn
, unsigned int *data
);
64 int i_APCI2032_ReadInterruptStatus(comedi_device
*dev
, comedi_subdevice
*s
,
65 comedi_insn
*insn
, unsigned int *data
);
68 // timer value is passed as u seconds
69 INT
i_APCI2032_ConfigWatchdog(comedi_device
*dev
, comedi_subdevice
*s
,
70 comedi_insn
*insn
, unsigned int *data
);
71 int i_APCI2032_StartStopWriteWatchdog(comedi_device
*dev
, comedi_subdevice
*s
,
72 comedi_insn
*insn
, unsigned int *data
);
73 int i_APCI2032_ReadWatchdog(comedi_device
*dev
, comedi_subdevice
*s
,
74 comedi_insn
*insn
, unsigned int *data
);
76 // Interrupt functions.....
78 void v_APCI2032_Interrupt(int irq
, void *d
);
81 int i_APCI2032_Reset(comedi_device
*dev
);