4 Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
10 Fax: +49(0)7223/9493-92
11 http://www.addi-data-com
14 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
16 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 You shoud also find the complete GPL in the COPYING file accompanying this source code.
24 // Card Specific information
25 #define APCI3501_BOARD_VENDOR_ID 0x15B8
26 #define APCI3501_ADDRESS_RANGE 255
28 #define APCI3501_DIGITAL_IP 0x50
29 #define APCI3501_DIGITAL_OP 0x40
30 #define APCI3501_ANALOG_OUTPUT 0x00
32 //Analog Output related Defines
33 #define APCI3501_AO_VOLT_MODE 0
34 #define APCI3501_AO_PROG 4
35 #define APCI3501_AO_TRIG_SCS 8
40 // ANALOG OUTPUT RANGE
41 comedi_lrange range_apci3501_ao = { 2, {
47 //Watchdog Related Defines
49 #define APCI3501_WATCHDOG 0x20
50 #define APCI3501_TCW_SYNC_ENABLEDISABLE 0
51 #define APCI3501_TCW_RELOAD_VALUE 4
52 #define APCI3501_TCW_TIMEBASE 8
53 #define APCI3501_TCW_PROG 12
54 #define APCI3501_TCW_TRIG_STATUS 16
55 #define APCI3501_TCW_IRQ 20
56 #define APCI3501_TCW_WARN_TIMEVAL 24
57 #define APCI3501_TCW_WARN_TIMEBASE 28
58 #define ADDIDATA_TIMER 0
59 #define ADDIDATA_WATCHDOG 2
61 // Hardware Layer functions for Apci3501
64 INT i_APCI3501_ConfigAnalogOutput(comedi_device * dev, comedi_subdevice * s,
65 comedi_insn * insn, lsampl_t * data);
66 INT i_APCI3501_WriteAnalogOutput(comedi_device * dev, comedi_subdevice * s,
67 comedi_insn * insn, lsampl_t * data);
71 //INT i_APCI3501_ReadDigitalInput(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
73 INT i_APCI3501_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s,
74 comedi_insn * insn, lsampl_t * data);
77 int i_APCI3501_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
78 comedi_insn * insn, lsampl_t * data);
79 INT i_APCI3501_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
80 comedi_insn * insn, lsampl_t * data);
81 INT i_APCI3501_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
82 comedi_insn * insn, lsampl_t * data);
85 // timer value is passed as u seconds
86 INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device * dev,
87 comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
88 int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device * dev,
89 comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
90 int i_APCI3501_ReadTimerCounterWatchdog(comedi_device * dev,
91 comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
93 void v_APCI3501_Interrupt(int irq, void *d);
96 int i_APCI3501_Reset(comedi_device * dev);