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-1564 card *****/
20 #define APCI1564_ADDRESS_RANGE 128
22 /* DIGITAL INPUT-OUTPUT DEFINE */
24 #define APCI1564_DIGITAL_IP 0x04
25 #define APCI1564_DIGITAL_IP_INTERRUPT_MODE1 4
26 #define APCI1564_DIGITAL_IP_INTERRUPT_MODE2 8
27 #define APCI1564_DIGITAL_IP_IRQ 16
30 #define APCI1564_DIGITAL_OP 0x18
31 #define APCI1564_DIGITAL_OP_RW 0
32 #define APCI1564_DIGITAL_OP_INTERRUPT 4
33 #define APCI1564_DIGITAL_OP_IRQ 12
35 /* Digital Input IRQ Function Selection */
37 #define ADDIDATA_AND 1
39 /* Digital Input Interrupt Status */
40 #define APCI1564_DIGITAL_IP_INTERRUPT_STATUS 12
42 /* Digital Output Interrupt Status */
43 #define APCI1564_DIGITAL_OP_INTERRUPT_STATUS 8
45 /* Digital Input Interrupt Enable Disable. */
46 #define APCI1564_DIGITAL_IP_INTERRUPT_ENABLE 0x4
47 #define APCI1564_DIGITAL_IP_INTERRUPT_DISABLE 0xFFFFFFFB
49 /* Digital Output Interrupt Enable Disable. */
50 #define APCI1564_DIGITAL_OP_VCC_INTERRUPT_ENABLE 0x1
51 #define APCI1564_DIGITAL_OP_VCC_INTERRUPT_DISABLE 0xFFFFFFFE
52 #define APCI1564_DIGITAL_OP_CC_INTERRUPT_ENABLE 0x2
53 #define APCI1564_DIGITAL_OP_CC_INTERRUPT_DISABLE 0xFFFFFFFD
55 /* ADDIDATA Enable Disable */
57 #define ADDIDATA_ENABLE 1
58 #define ADDIDATA_DISABLE 0
60 /* TIMER COUNTER WATCHDOG DEFINES */
62 #define ADDIDATA_TIMER 0
63 #define ADDIDATA_COUNTER 1
64 #define ADDIDATA_WATCHDOG 2
65 #define APCI1564_DIGITAL_OP_WATCHDOG 0x28
66 #define APCI1564_TIMER 0x48
67 #define APCI1564_COUNTER1 0x0
68 #define APCI1564_COUNTER2 0x20
69 #define APCI1564_COUNTER3 0x40
70 #define APCI1564_COUNTER4 0x60
71 #define APCI1564_TCW_SYNC_ENABLEDISABLE 0
72 #define APCI1564_TCW_RELOAD_VALUE 4
73 #define APCI1564_TCW_TIMEBASE 8
74 #define APCI1564_TCW_PROG 12
75 #define APCI1564_TCW_TRIG_STATUS 16
76 #define APCI1564_TCW_IRQ 20
77 #define APCI1564_TCW_WARN_TIMEVAL 24
78 #define APCI1564_TCW_WARN_TIMEBASE 28