hwdrv_apci16xx.h revision 15d8826a6a2ed954ce7daf1d321cce99d5c12668
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 18#ifndef COMEDI_SUBD_TTLIO 19#define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ 20#endif 21 22#ifndef ADDIDATA_ENABLE 23#define ADDIDATA_ENABLE 1 24#define ADDIDATA_DISABLE 0 25#endif 26 27#define APCI16XX_TTL_INIT 0 28#define APCI16XX_TTL_INITDIRECTION 1 29#define APCI16XX_TTL_OUTPUTMEMORY 2 30 31#define APCI16XX_TTL_READCHANNEL 0 32#define APCI16XX_TTL_READPORT 1 33 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 38 39#define APCI16XX_TTL_READ_ALL_INPUTS 0 40#define APCI16XX_TTL_READ_ALL_OUTPUTS 1 41 42#ifdef __KERNEL__ 43 44static const comedi_lrange range_apci16xx_ttl = { 12, 45 {BIP_RANGE(1), 46 BIP_RANGE(1), 47 BIP_RANGE(1), 48 BIP_RANGE(1), 49 BIP_RANGE(1), 50 BIP_RANGE(1), 51 BIP_RANGE(1), 52 BIP_RANGE(1), 53 BIP_RANGE(1), 54 BIP_RANGE(1), 55 BIP_RANGE(1), 56 BIP_RANGE(1)} 57}; 58 59/* 60+----------------------------------------------------------------------------+ 61| TTL INISIALISATION FUNCTION | 62+----------------------------------------------------------------------------+ 63*/ 64 65int i_APCI16XX_InsnConfigInitTTLIO(comedi_device *dev, 66 comedi_subdevice *s, comedi_insn *insn, 67 lsampl_t *data); 68 69/* 70+----------------------------------------------------------------------------+ 71| TTL INPUT FUNCTION | 72+----------------------------------------------------------------------------+ 73*/ 74 75int i_APCI16XX_InsnBitsReadTTLIO(comedi_device *dev, 76 comedi_subdevice *s, comedi_insn *insn, 77 lsampl_t *data); 78 79int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device *dev, 80 comedi_subdevice *s, 81 comedi_insn *insn, lsampl_t *data); 82 83/* 84+----------------------------------------------------------------------------+ 85| TTL OUTPUT FUNCTIONS | 86+----------------------------------------------------------------------------+ 87*/ 88 89int i_APCI16XX_InsnBitsWriteTTLIO(comedi_device *dev, 90 comedi_subdevice *s, comedi_insn *insn, 91 lsampl_t *data); 92 93int i_APCI16XX_Reset(comedi_device *dev); 94#endif 95