hwdrv_apci1032.h revision c995fe9475e062bab6f5a45ed28cd2d3d955ef43
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 25/********* Definitions for APCI-1032 card *****/ 26 27#define APCI1032_BOARD_VENDOR_ID 0x15B8 28#define APCI1032_ADDRESS_RANGE 20 29//DIGITAL INPUT DEFINE 30 31#define APCI1032_DIGITAL_IP 0 32#define APCI1032_DIGITAL_IP_INTERRUPT_MODE1 4 33#define APCI1032_DIGITAL_IP_INTERRUPT_MODE2 8 34#define APCI1032_DIGITAL_IP_IRQ 16 35 36//Digital Input IRQ Function Selection 37#define ADDIDATA_OR 0 38#define ADDIDATA_AND 1 39 40//Digital Input Interrupt Status 41#define APCI1032_DIGITAL_IP_INTERRUPT_STATUS 12 42 43//Digital Input Interrupt Enable Disable. 44#define APCI1032_DIGITAL_IP_INTERRUPT_ENABLE 0x4 45#define APCI1032_DIGITAL_IP_INTERRUPT_DISABLE 0xFFFFFFFB 46 47//ADDIDATA Enable Disable 48 49#define ADDIDATA_ENABLE 1 50#define ADDIDATA_DISABLE 0 51 52// Hardware Layer functions for Apci1032 53 54//DI 55// for di read 56 57INT i_APCI1032_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s, 58 comedi_insn * insn, lsampl_t * data); 59 60INT i_APCI1032_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s, 61 comedi_insn * insn, lsampl_t * data); 62 63INT i_APCI1032_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s, 64 comedi_insn * insn, lsampl_t * data); 65 66// Interrupt functions..... 67 68static VOID v_APCI1032_Interrupt(int irq, void *d); 69//Reset 70INT i_APCI1032_Reset(comedi_device * dev); 71