]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.h
staging: comedi: hwrdv_apci1516: absorb private header
[karo-tx-linux.git] / drivers / staging / comedi / drivers / addi-data / hwdrv_apci1564.h
1 /*
2  * Copyright (C) 2004,2005  ADDI-DATA GmbH for the source code of this module.
3  *
4  *      ADDI-DATA GmbH
5  *      Dieselstrasse 3
6  *      D-77833 Ottersweier
7  *      Tel: +19(0)7223/9493-0
8  *      Fax: +49(0)7223/9493-92
9  *      http://www.addi-data.com
10  *      info@addi-data.com
11  *
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)
15  * any later version.
16  */
17
18 /*********      Definitions for APCI-1564 card  *****/
19
20 #define APCI1564_ADDRESS_RANGE                  128
21
22 /* DIGITAL INPUT-OUTPUT DEFINE */
23 /* Input defines */
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
28
29 /* Output defines */
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
34
35 /* Digital Input IRQ Function Selection */
36 #define ADDIDATA_OR                             0
37 #define ADDIDATA_AND                            1
38
39 /* Digital Input Interrupt Status */
40 #define APCI1564_DIGITAL_IP_INTERRUPT_STATUS    12
41
42 /* Digital Output Interrupt Status */
43 #define APCI1564_DIGITAL_OP_INTERRUPT_STATUS    8
44
45 /* Digital Input Interrupt Enable Disable. */
46 #define APCI1564_DIGITAL_IP_INTERRUPT_ENABLE    0x4
47 #define APCI1564_DIGITAL_IP_INTERRUPT_DISABLE   0xFFFFFFFB
48
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
54
55 /* ADDIDATA Enable Disable */
56
57 #define ADDIDATA_ENABLE                            1
58 #define ADDIDATA_DISABLE                           0
59
60 /* TIMER COUNTER WATCHDOG DEFINES */
61
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