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 #ifndef COMEDI_SUBD_TTLIO
19 #define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */
22 #ifndef ADDIDATA_ENABLE
23 #define ADDIDATA_ENABLE 1
24 #define ADDIDATA_DISABLE 0
27 #define APCI16XX_TTL_INIT 0
28 #define APCI16XX_TTL_INITDIRECTION 1
29 #define APCI16XX_TTL_OUTPUTMEMORY 2
31 #define APCI16XX_TTL_READCHANNEL 0
32 #define APCI16XX_TTL_READPORT 1
34 #define APCI16XX_TTL_WRITECHANNEL_ON 0
35 #define APCI16XX_TTL_WRITECHANNEL_OFF 1
36 #define APCI16XX_TTL_WRITEPORT_ON 2
37 #define APCI16XX_TTL_WRITEPORT_OFF 3
39 #define APCI16XX_TTL_READ_ALL_INPUTS 0
40 #define APCI16XX_TTL_READ_ALL_OUTPUTS 1
45 +----------------------------------------------------------------------------+
46 | TTL INISIALISATION FUNCTION |
47 +----------------------------------------------------------------------------+
50 int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev,
51 struct comedi_subdevice *s, struct comedi_insn *insn,
55 +----------------------------------------------------------------------------+
56 | TTL INPUT FUNCTION |
57 +----------------------------------------------------------------------------+
60 int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev,
61 struct comedi_subdevice *s, struct comedi_insn *insn,
64 int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
65 struct comedi_subdevice *s,
66 struct comedi_insn *insn, unsigned int *data);
69 +----------------------------------------------------------------------------+
70 | TTL OUTPUT FUNCTIONS |
71 +----------------------------------------------------------------------------+
74 int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device *dev,
75 struct comedi_subdevice *s, struct comedi_insn *insn,
78 int i_APCI16XX_Reset(struct comedi_device *dev);