Staging: comedi: add addi-data drivers
[deliverable/linux.git] / drivers / staging / comedi / drivers / addi-data / hwdrv_apci3501.h
CommitLineData
c995fe94
ADG
1/**
2@verbatim
3
4Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
5
6 ADDI-DATA GmbH
7 Dieselstrasse 3
8 D-77833 Ottersweier
9 Tel: +19(0)7223/9493-0
10 Fax: +49(0)7223/9493-92
11 http://www.addi-data-com
12 info@addi-data.com
13
14This 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.
15
16This 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.
17
18You 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
19
20You shoud also find the complete GPL in the COPYING file accompanying this source code.
21
22@endverbatim
23*/
24// Card Specific information
25#define APCI3501_BOARD_VENDOR_ID 0x15B8
26#define APCI3501_ADDRESS_RANGE 255
27
28#define APCI3501_DIGITAL_IP 0x50
29#define APCI3501_DIGITAL_OP 0x40
30#define APCI3501_ANALOG_OUTPUT 0x00
31
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
36#define UNIPOLAR 0
37#define BIPOLAR 1
38#define MODE0 0
39#define MODE1 1
40// ANALOG OUTPUT RANGE
41comedi_lrange range_apci3501_ao = { 2, {
42 BIP_RANGE(10),
43 UNI_RANGE(10)
44 }
45};
46
47//Watchdog Related Defines
48
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
60
61// Hardware Layer functions for Apci3501
62
63//AO
64INT i_APCI3501_ConfigAnalogOutput(comedi_device * dev, comedi_subdevice * s,
65 comedi_insn * insn, lsampl_t * data);
66INT i_APCI3501_WriteAnalogOutput(comedi_device * dev, comedi_subdevice * s,
67 comedi_insn * insn, lsampl_t * data);
68
69//DI
70// for di read
71//INT i_APCI3501_ReadDigitalInput(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
72
73INT i_APCI3501_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s,
74 comedi_insn * insn, lsampl_t * data);
75
76//DO
77int i_APCI3501_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
78 comedi_insn * insn, lsampl_t * data);
79INT i_APCI3501_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
80 comedi_insn * insn, lsampl_t * data);
81INT i_APCI3501_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
82 comedi_insn * insn, lsampl_t * data);
83
84// TIMER
85// timer value is passed as u seconds
86INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device * dev,
87 comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
88int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device * dev,
89 comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
90int i_APCI3501_ReadTimerCounterWatchdog(comedi_device * dev,
91 comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
92//Interrupt
93void v_APCI3501_Interrupt(int irq, void *d);
94
95//Reset functions
96int i_APCI3501_Reset(comedi_device * dev);
This page took 0.027555 seconds and 5 git commands to generate.