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 APCI3501_BOARD_VENDOR_ID 0x15B8
20 #define APCI3501_ADDRESS_RANGE 255
22 #define APCI3501_DIGITAL_IP 0x50
23 #define APCI3501_DIGITAL_OP 0x40
24 #define APCI3501_ANALOG_OUTPUT 0x00
26 /* Analog Output related Defines */
27 #define APCI3501_AO_VOLT_MODE 0
28 #define APCI3501_AO_PROG 4
29 #define APCI3501_AO_TRIG_SCS 8
34 /* ANALOG OUTPUT RANGE */
35 static struct comedi_lrange range_apci3501_ao = { 2, {
41 /* Watchdog Related Defines */
43 #define APCI3501_WATCHDOG 0x20
44 #define APCI3501_TCW_SYNC_ENABLEDISABLE 0
45 #define APCI3501_TCW_RELOAD_VALUE 4
46 #define APCI3501_TCW_TIMEBASE 8
47 #define APCI3501_TCW_PROG 12
48 #define APCI3501_TCW_TRIG_STATUS 16
49 #define APCI3501_TCW_IRQ 20
50 #define APCI3501_TCW_WARN_TIMEVAL 24
51 #define APCI3501_TCW_WARN_TIMEBASE 28
52 #define ADDIDATA_TIMER 0
53 #define ADDIDATA_WATCHDOG 2
55 /* Hardware Layer functions for Apci3501 */
58 int i_APCI3501_ConfigAnalogOutput(struct comedi_device *dev, struct comedi_subdevice *s,
59 struct comedi_insn *insn, unsigned int *data);
60 int i_APCI3501_WriteAnalogOutput(struct comedi_device *dev, struct comedi_subdevice *s,
61 struct comedi_insn *insn, unsigned int *data);
64 * DI for di read INT i_APCI3501_ReadDigitalInput(struct
65 * comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn
66 * *insn,unsigned int *data);
69 int i_APCI3501_ReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
70 struct comedi_insn *insn, unsigned int *data);
73 int i_APCI3501_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
74 struct comedi_insn *insn, unsigned int *data);
75 int i_APCI3501_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
76 struct comedi_insn *insn, unsigned int *data);
77 int i_APCI3501_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
78 struct comedi_insn *insn, unsigned int *data);
81 * timer value is passed as u seconds
84 int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device *dev,
85 struct comedi_subdevice *s,
86 struct comedi_insn *insn, unsigned int *data);
87 int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
88 struct comedi_subdevice *s,
89 struct comedi_insn *insn,
91 int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device *dev,
92 struct comedi_subdevice *s,
93 struct comedi_insn *insn, unsigned int *data);
95 void v_APCI3501_Interrupt(int irq, void *d);
98 int i_APCI3501_Reset(struct comedi_device *dev);