Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[sfrench/cifs-2.6.git] / drivers / staging / comedi / drivers / addi-data / hwdrv_apci2016.h
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  */
17 /*********      Definitions for APCI-2016 card  *****/
18
19 #define APCI2016_BOARD_VENDOR_ID 0x15B8
20 #define APCI2016_ADDRESS_RANGE   8
21
22 //DIGITAL INPUT-OUTPUT DEFINE
23
24 #define APCI2016_DIGITAL_OP                     0x04
25 #define APCI2016_DIGITAL_OP_RW                  4
26
27 //ADDIDATA Enable Disable
28
29 #define ADDIDATA_ENABLE                            1
30 #define ADDIDATA_DISABLE                           0
31
32 // TIMER COUNTER WATCHDOG DEFINES
33
34 #define ADDIDATA_WATCHDOG                          2
35 #define APCI2016_DIGITAL_OP_WATCHDOG               0
36 #define APCI2016_WATCHDOG_ENABLEDISABLE            12
37 #define APCI2016_WATCHDOG_RELOAD_VALUE             4
38 #define APCI2016_WATCHDOG_STATUS                   16
39
40 // Hardware Layer  functions for Apci2016
41
42 //DO
43 int i_APCI2016_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
44                                    struct comedi_insn *insn, unsigned int *data);
45
46 int i_APCI2016_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
47                                   struct comedi_insn *insn, unsigned int *data);
48
49 int i_APCI2016_BitsDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
50                                  struct comedi_insn *insn, unsigned int *data);
51
52 // TIMER
53 // timer value is passed as u seconds
54
55 int i_APCI2016_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
56                               struct comedi_insn *insn, unsigned int *data);
57
58 int i_APCI2016_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
59                                       struct comedi_insn *insn, unsigned int *data);
60
61 int i_APCI2016_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
62                             struct comedi_insn *insn, unsigned int *data);
63
64 // Interrupt functions.....
65
66 // void v_APCI2016_Interrupt(int irq, void *d) ;
67
68  //void v_APCI2016_Interrupt(int irq, void *d);
69 // RESET
70 INT i_APCI2016_Reset(struct comedi_device *dev);