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 /* Card Specific information */
19 #define APCI035_BOARD_VENDOR_ID 0x15B8
20 #define APCI035_ADDRESS_RANGE 255
29 INT i_AutoCalibration;
31 UINT ui_TimeUnitReloadVal;
33 INT i_ModuleSelection;
34 } Config_Parameters_Main;
36 /* ANALOG INPUT RANGE */
37 struct comedi_lrange range_apci035_ai = { 8, {
49 /* Timer / Watchdog Related Defines */
50 #define APCI035_TCW_SYNC_ENABLEDISABLE 0
51 #define APCI035_TCW_RELOAD_VALUE 4
52 #define APCI035_TCW_TIMEBASE 8
53 #define APCI035_TCW_PROG 12
54 #define APCI035_TCW_TRIG_STATUS 16
55 #define APCI035_TCW_IRQ 20
56 #define APCI035_TCW_WARN_TIMEVAL 24
57 #define APCI035_TCW_WARN_TIMEBASE 28
59 #define ADDIDATA_TIMER 0
60 /* #define ADDIDATA_WATCHDOG 1 */
63 #define APCI035_TW2 32
64 #define APCI035_TW3 64
65 #define APCI035_TW4 96
67 #define APCI035_AI_OFFSET 0
68 #define APCI035_TEMP 128
69 #define APCI035_ALR_SEQ 4
70 #define APCI035_START_STOP_INDEX 8
71 #define APCI035_ALR_START_STOP 12
72 #define APCI035_ALR_IRQ 16
73 #define APCI035_EOS 20
74 #define APCI035_CHAN_NO 24
75 #define APCI035_CHAN_VAL 28
76 #define APCI035_CONV_TIME_TIME_BASE 36
77 #define APCI035_RELOAD_CONV_TIME_VAL 32
78 #define APCI035_DELAY_TIME_TIME_BASE 44
79 #define APCI035_RELOAD_DELAY_TIME_VAL 40
80 #define ENABLE_EXT_TRIG 1
81 #define ENABLE_EXT_GATE 2
82 #define ENABLE_EXT_TRIG_GATE 3
84 #define ANALOG_INPUT 0
88 #define ADDIDATA_GREATER_THAN_TEST 0
89 #define ADDIDATA_LESS_THAN_TEST 1
91 #define APCI035_MAXVOLT 2.5
93 #define ADDIDATA_UNIPOLAR 1
94 #define ADDIDATA_BIPOLAR 2
96 /* ADDIDATA Enable Disable */
97 #define ADDIDATA_ENABLE 1
98 #define ADDIDATA_DISABLE 0
100 /* Hardware Layer functions for Apci035 */
103 /* timer value is passed as u seconds */
104 INT i_APCI035_ConfigTimerWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
105 comedi_insn *insn, unsigned int *data);
106 INT i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device *dev,
107 struct comedi_subdevice *s,
108 comedi_insn *insn, unsigned int *data);
109 INT i_APCI035_ReadTimerWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
110 comedi_insn *insn, unsigned int *data);
112 /* Temperature Related Defines (Analog Input Subdevice) */
114 INT i_APCI035_ConfigAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
115 comedi_insn *insn, unsigned int *data);
116 INT i_APCI035_ReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
117 comedi_insn *insn, unsigned int *data);
120 static void v_APCI035_Interrupt(int irq, void *d);
122 /* Reset functions */
123 INT i_APCI035_Reset(struct comedi_device *dev);