Staging: comedi: Remove comedi_t typedef
[deliverable/linux.git] / drivers / staging / comedi / drivers / addi-data / hwdrv_apci3501.h
CommitLineData
15d8826a
GKH
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 */
c995fe94 17
c995fe94
ADG
18// Card Specific information
19#define APCI3501_BOARD_VENDOR_ID 0x15B8
20#define APCI3501_ADDRESS_RANGE 255
21
22#define APCI3501_DIGITAL_IP 0x50
23#define APCI3501_DIGITAL_OP 0x40
24#define APCI3501_ANALOG_OUTPUT 0x00
25
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
30#define UNIPOLAR 0
31#define BIPOLAR 1
32#define MODE0 0
33#define MODE1 1
34// ANALOG OUTPUT RANGE
35comedi_lrange range_apci3501_ao = { 2, {
15d8826a
GKH
36 BIP_RANGE(10),
37 UNI_RANGE(10)
38 }
c995fe94
ADG
39};
40
41//Watchdog Related Defines
42
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
54
55// Hardware Layer functions for Apci3501
56
57//AO
15d8826a
GKH
58INT i_APCI3501_ConfigAnalogOutput(comedi_device *dev, comedi_subdevice *s,
59 comedi_insn *insn, lsampl_t *data);
60INT i_APCI3501_WriteAnalogOutput(comedi_device *dev, comedi_subdevice *s,
61 comedi_insn *insn, lsampl_t *data);
c995fe94
ADG
62
63//DI
64// for di read
65//INT i_APCI3501_ReadDigitalInput(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
66
15d8826a
GKH
67INT i_APCI3501_ReadDigitalInput(comedi_device *dev, comedi_subdevice *s,
68 comedi_insn *insn, lsampl_t *data);
c995fe94
ADG
69
70//DO
15d8826a
GKH
71int i_APCI3501_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
72 comedi_insn *insn, lsampl_t *data);
73INT i_APCI3501_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
74 comedi_insn *insn, lsampl_t *data);
75INT i_APCI3501_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
76 comedi_insn *insn, lsampl_t *data);
c995fe94
ADG
77
78// TIMER
79// timer value is passed as u seconds
15d8826a
GKH
80INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device *dev,
81 comedi_subdevice *s,
82 comedi_insn *insn, lsampl_t *data);
83int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device *dev,
84 comedi_subdevice *s,
85 comedi_insn *insn,
86 lsampl_t *data);
87int i_APCI3501_ReadTimerCounterWatchdog(comedi_device *dev,
88 comedi_subdevice *s,
89 comedi_insn *insn, lsampl_t *data);
c995fe94
ADG
90//Interrupt
91void v_APCI3501_Interrupt(int irq, void *d);
92
93//Reset functions
15d8826a 94int i_APCI3501_Reset(comedi_device *dev);
This page took 0.048311 seconds and 5 git commands to generate.