Commit 15d8826a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: comedi: addi-data header file cleanups

Clean up lots of coding style issues in the addi-data header
files.

Cc: David Schleef <ds@schleef.org>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 851a2c10
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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 #define APCI1710_PCI_BUS_CLOCK 0
#define APCI1710_FRONT_CONNECTOR_INPUT 1
You shoud also find the complete GPL in the COPYING file accompanying this source code. #define APCI1710_TIMER_READVALUE 0
#define APCI1710_TIMER_GETOUTPUTLEVEL 1
@endverbatim #define APCI1710_TIMER_GETPROGRESSSTATUS 2
*/ #define APCI1710_TIMER_WRITEVALUE 3
#define APCI1710_PCI_BUS_CLOCK 0 #define APCI1710_TIMER_READINTERRUPT 1
#define APCI1710_FRONT_CONNECTOR_INPUT 1 #define APCI1710_TIMER_READALLTIMER 2
#define APCI1710_TIMER_READVALUE 0
#define APCI1710_TIMER_GETOUTPUTLEVEL 1 /* BEGIN JK 27.10.03 : Add the possibility to use a 40 Mhz quartz */
#define APCI1710_TIMER_GETPROGRESSSTATUS 2
#define APCI1710_TIMER_WRITEVALUE 3
#define APCI1710_TIMER_READINTERRUPT 1
#define APCI1710_TIMER_READALLTIMER 2
// BEGIN JK 27.10.03 : Add the possibility to use a 40 Mhz quartz
#ifndef APCI1710_10MHZ #ifndef APCI1710_10MHZ
#define APCI1710_10MHZ 10 #define APCI1710_10MHZ 10
#endif #endif
// END JK 27.10.03 : Add the possibility to use a 40 Mhz quartz /* END JK 27.10.03 : Add the possibility to use a 40 Mhz quartz */
/* /*
+----------------------------------------------------------------------------+ * 82X54 TIMER INISIALISATION FUNCTION
| 82X54 TIMER INISIALISATION FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnConfigInitTimer(comedi_device *dev, comedi_subdevice *s,
*/ comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnConfigInitTimer(comedi_device * dev, comedi_subdevice * s, INT i_APCI1710_InsnWriteEnableDisableTimer(comedi_device *dev,
comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnWriteEnableDisableTimer(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
/* /*
+----------------------------------------------------------------------------+ * 82X54 READ FUNCTION
| 82X54 READ FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnReadAllTimerValue(comedi_device *dev, comedi_subdevice *s,
*/ comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnReadAllTimerValue(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
INT i_APCI1710_InsnBitsTimer(comedi_device * dev, comedi_subdevice * s, INT i_APCI1710_InsnBitsTimer(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
/* /*
+----------------------------------------------------------------------------+ * 82X54 READ & WRITE FUNCTION
| 82X54 READ & WRITE FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_ReadTimerValue(comedi_device *dev,
*/ BYTE b_ModulNbr, BYTE b_TimerNbr,
INT i_APCI1710_ReadTimerValue(comedi_device * dev, PULONG pul_TimerValue);
BYTE b_ModulNbr, BYTE b_TimerNbr, PULONG pul_TimerValue);
INT i_APCI1710_GetTimerOutputLevel(comedi_device * dev, INT i_APCI1710_GetTimerOutputLevel(comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr, PBYTE pb_OutputLevel); BYTE b_ModulNbr, BYTE b_TimerNbr,
PBYTE pb_OutputLevel);
INT i_APCI1710_GetTimerProgressStatus(comedi_device * dev, INT i_APCI1710_GetTimerProgressStatus(comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr, PBYTE pb_TimerStatus); BYTE b_ModulNbr, BYTE b_TimerNbr,
PBYTE pb_TimerStatus);
/* /*
+----------------------------------------------------------------------------+ * 82X54 WRITE FUNCTION
| 82X54 WRITE FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_WriteTimerValue(comedi_device *dev,
*/ BYTE b_ModulNbr, BYTE b_TimerNbr,
INT i_APCI1710_WriteTimerValue(comedi_device * dev, ULONG ul_WriteValue);
BYTE b_ModulNbr, BYTE b_TimerNbr, ULONG ul_WriteValue);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
#define APCI1710_30MHZ 30 #define APCI1710_30MHZ 30
#define APCI1710_33MHZ 33 #define APCI1710_33MHZ 33
#define APCI1710_40MHZ 40 #define APCI1710_40MHZ 40
#define APCI1710_SINGLE 0 #define APCI1710_SINGLE 0
#define APCI1710_CONTINUOUS 1 #define APCI1710_CONTINUOUS 1
#define APCI1710_CHRONO_PROGRESS_STATUS 0 #define APCI1710_CHRONO_PROGRESS_STATUS 0
#define APCI1710_CHRONO_READVALUE 1 #define APCI1710_CHRONO_READVALUE 1
#define APCI1710_CHRONO_CONVERTVALUE 2 #define APCI1710_CHRONO_CONVERTVALUE 2
#define APCI1710_CHRONO_READINTERRUPT 3 #define APCI1710_CHRONO_READINTERRUPT 3
#define APCI1710_CHRONO_SET_CHANNELON 0 #define APCI1710_CHRONO_SET_CHANNELON 0
#define APCI1710_CHRONO_SET_CHANNELOFF 1 #define APCI1710_CHRONO_SET_CHANNELOFF 1
#define APCI1710_CHRONO_READ_CHANNEL 2 #define APCI1710_CHRONO_READ_CHANNEL 2
#define APCI1710_CHRONO_READ_PORT 3 #define APCI1710_CHRONO_READ_PORT 3
/* /*
+----------------------------------------------------------------------------+ * CHRONOMETER INISIALISATION FUNCTION
| CHRONOMETER INISIALISATION FUNCTION |
+----------------------------------------------------------------------------+
*/ */
INT i_APCI1710_InsnConfigInitChrono(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnConfigInitChrono(comedi_device * dev, comedi_subdevice * s, INT i_APCI1710_InsnWriteEnableDisableChrono(comedi_device *dev,
comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
comedi_insn *insn,
INT i_APCI1710_InsnWriteEnableDisableChrono(comedi_device * dev, lsampl_t *data);
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
/* /*
+----------------------------------------------------------------------------+ * CHRONOMETER READ FUNCTION
| CHRONOMETER READ FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnReadChrono(comedi_device *dev, comedi_subdevice *s,
*/ comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnReadChrono(comedi_device * dev, comedi_subdevice * s, INT i_APCI1710_GetChronoProgressStatus(comedi_device *dev,
comedi_insn * insn, lsampl_t * data); BYTE b_ModulNbr, PBYTE pb_ChronoStatus);
INT i_APCI1710_GetChronoProgressStatus(comedi_device * dev, INT i_APCI1710_ReadChronoValue(comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_ChronoStatus); BYTE b_ModulNbr,
UINT ui_TimeOut, PBYTE pb_ChronoStatus,
INT i_APCI1710_ReadChronoValue(comedi_device * dev, PULONG pul_ChronoValue);
BYTE b_ModulNbr,
UINT ui_TimeOut, PBYTE pb_ChronoStatus, PULONG pul_ChronoValue); INT i_APCI1710_ConvertChronoValue(comedi_device *dev,
BYTE b_ModulNbr,
INT i_APCI1710_ConvertChronoValue(comedi_device * dev, ULONG ul_ChronoValue,
BYTE b_ModulNbr, PULONG pul_Hour,
ULONG ul_ChronoValue, PBYTE pb_Minute,
PULONG pul_Hour, PBYTE pb_Second,
PBYTE pb_Minute, PUINT pui_MilliSecond, PUINT pui_MicroSecond,
PBYTE pb_Second, PUINT pui_NanoSecond);
PUINT pui_MilliSecond, PUINT pui_MicroSecond, PUINT pui_NanoSecond);
/* /*
+----------------------------------------------------------------------------+ * CHRONOMETER DIGITAL INPUT OUTPUT FUNCTION
| CHRONOMETER DIGITAL INPUT OUTPUT FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnBitsChronoDigitalIO(comedi_device *dev,
*/ comedi_subdevice *s, comedi_insn *insn,
lsampl_t *data);
INT i_APCI1710_InsnBitsChronoDigitalIO(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
/**
@verbatim
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
ADDI-DATA GmbH
Dieselstrasse 3
D-77833 Ottersweier
Tel: +19(0)7223/9493-0
Fax: +49(0)7223/9493-92
http://www.addi-data-com
info@addi-data.com
This 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.
This 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.
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
#define APCI1710_ON 1 // Digital Output ON or OFF
#define APCI1710_OFF 0
#define APCI1710_INPUT 0 // Digital I/O
#define APCI1710_OUTPUT 1
#define APCI1710_DIGIO_MEMORYONOFF 0x10 //
#define APCI1710_DIGIO_INIT 0x11
/* /*
+----------------------------------------------------------------------------+ * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
| DIGITAL I/O INISIALISATION FUNCTION | *
+----------------------------------------------------------------------------+ * ADDI-DATA GmbH
*/ * Dieselstrasse 3
* D-77833 Ottersweier
INT i_APCI1710_InsnConfigDigitalIO(comedi_device * dev, comedi_subdevice * s, * Tel: +19(0)7223/9493-0
comedi_insn * insn, lsampl_t * data); * Fax: +49(0)7223/9493-92
* http://www.addi-data-com
* info@addi-data.com
*
* This 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.
*/
#define APCI1710_ON 1 /* Digital Output ON or OFF */
#define APCI1710_OFF 0
#define APCI1710_INPUT 0 /* Digital I/O */
#define APCI1710_OUTPUT 1
#define APCI1710_DIGIO_MEMORYONOFF 0x10
#define APCI1710_DIGIO_INIT 0x11
/* /*
+----------------------------------------------------------------------------+ * DIGITAL I/O INISIALISATION FUNCTION
| INPUT OUTPUT FUNCTIONS | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnConfigDigitalIO(comedi_device *dev, comedi_subdevice *s,
*/ comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnReadDigitalIOChlValue(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
INT i_APCI1710_InsnWriteDigitalIOChlOnOff(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
INT i_APCI1710_InsnBitsDigitalIOPortOnOff(comedi_device * dev, /*
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); * INPUT OUTPUT FUNCTIONS
*/
INT i_APCI1710_InsnReadDigitalIOChlValue(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnWriteDigitalIOChlOnOff(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnBitsDigitalIOPortOnOff(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
/**
@verbatim
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
ADDI-DATA GmbH
Dieselstrasse 3
D-77833 Ottersweier
Tel: +19(0)7223/9493-0
Fax: +49(0)7223/9493-92
http://www.addi-data-com
info@addi-data.com
This 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.
This 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.
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
#define APCI1710_SINGLE 0
#define APCI1710_CONTINUOUS 1
#define APCI1710_PULSEENCODER_READ 0
#define APCI1710_PULSEENCODER_WRITE 1
INT i_APCI1710_InsnConfigInitPulseEncoder(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
/* /*
+----------------------------------------------------------------------------+ * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
| READ PULSE ENCODER FUNCTIONS | *
+----------------------------------------------------------------------------+ * ADDI-DATA GmbH
*/ * Dieselstrasse 3
* D-77833 Ottersweier
INT i_APCI1710_InsnReadInterruptPulseEncoder(comedi_device * dev, * Tel: +19(0)7223/9493-0
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); * Fax: +49(0)7223/9493-92
* http://www.addi-data-com
* info@addi-data.com
*
* This 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.
*/
#define APCI1710_SINGLE 0
#define APCI1710_CONTINUOUS 1
#define APCI1710_PULSEENCODER_READ 0
#define APCI1710_PULSEENCODER_WRITE 1
INT i_APCI1710_InsnConfigInitPulseEncoder(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
lsampl_t *data);
/* /*
+----------------------------------------------------------------------------+ * READ PULSE ENCODER FUNCTIONS
| WRITE PULSE ENCODER FUNCTIONS | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnReadInterruptPulseEncoder(comedi_device *dev,
*/ comedi_subdevice *s,
comedi_insn *insn,
lsampl_t *data);
INT i_APCI1710_InsnBitsReadWritePulseEncoder(comedi_device * dev, /*
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); * WRITE PULSE ENCODER FUNCTIONS
*/
INT i_APCI1710_InsnBitsReadWritePulseEncoder(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
lsampl_t *data);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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 #define APCI1710_30MHZ 30
#define APCI1710_33MHZ 33
You shoud also find the complete GPL in the COPYING file accompanying this source code. #define APCI1710_40MHZ 40
@endverbatim #define APCI1710_PWM_INIT 0
*/
#define APCI1710_30MHZ 30
#define APCI1710_33MHZ 33
#define APCI1710_40MHZ 40
#define APCI1710_PWM_INIT 0
#define APCI1710_PWM_GETINITDATA 1 #define APCI1710_PWM_GETINITDATA 1
#define APCI1710_PWM_DISABLE 0 #define APCI1710_PWM_DISABLE 0
#define APCI1710_PWM_ENABLE 1 #define APCI1710_PWM_ENABLE 1
#define APCI1710_PWM_NEWTIMING 2 #define APCI1710_PWM_NEWTIMING 2
INT i_APCI1710_InsnConfigPWM(comedi_device * dev, comedi_subdevice * s, INT i_APCI1710_InsnConfigPWM(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InitPWM(comedi_device * dev, INT i_APCI1710_InitPWM(comedi_device *dev,
BYTE b_ModulNbr, BYTE b_ModulNbr,
BYTE b_PWM, BYTE b_PWM,
BYTE b_ClockSelection, BYTE b_ClockSelection,
BYTE b_TimingUnit, BYTE b_TimingUnit,
ULONG ul_LowTiming, ULONG ul_LowTiming,
ULONG ul_HighTiming, ULONG ul_HighTiming,
PULONG pul_RealLowTiming, PULONG pul_RealHighTiming); PULONG pul_RealLowTiming, PULONG pul_RealHighTiming);
INT i_APCI1710_GetPWMInitialisation(comedi_device * dev, INT i_APCI1710_GetPWMInitialisation(comedi_device *dev,
BYTE b_ModulNbr, BYTE b_ModulNbr,
BYTE b_PWM, BYTE b_PWM,
PBYTE pb_TimingUnit, PBYTE pb_TimingUnit,
PULONG pul_LowTiming, PULONG pul_LowTiming,
PULONG pul_HighTiming, PULONG pul_HighTiming,
PBYTE pb_StartLevel, PBYTE pb_StartLevel,
PBYTE pb_StopMode, PBYTE pb_StopMode,
PBYTE pb_StopLevel, PBYTE pb_StopLevel,
PBYTE pb_ExternGate, PBYTE pb_InterruptEnable, PBYTE pb_Enable); PBYTE pb_ExternGate,
PBYTE pb_InterruptEnable, PBYTE pb_Enable);
INT i_APCI1710_InsnWritePWM(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data); INT i_APCI1710_InsnWritePWM(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_EnablePWM(comedi_device * dev,
BYTE b_ModulNbr, INT i_APCI1710_EnablePWM(comedi_device *dev,
BYTE b_PWM, BYTE b_ModulNbr,
BYTE b_StartLevel, BYTE b_PWM,
BYTE b_StopMode, BYTE b_StartLevel,
BYTE b_StopLevel, BYTE b_ExternGate, BYTE b_InterruptEnable); BYTE b_StopMode,
BYTE b_StopLevel, BYTE b_ExternGate,
INT i_APCI1710_SetNewPWMTiming(comedi_device * dev, BYTE b_InterruptEnable);
BYTE b_ModulNbr,
BYTE b_PWM, BYTE b_TimingUnit, ULONG ul_LowTiming, ULONG ul_HighTiming); INT i_APCI1710_SetNewPWMTiming(comedi_device *dev,
BYTE b_ModulNbr,
INT i_APCI1710_DisablePWM(comedi_device * dev, BYTE b_ModulNbr, BYTE b_PWM); BYTE b_PWM, BYTE b_TimingUnit,
ULONG ul_LowTiming, ULONG ul_HighTiming);
INT i_APCI1710_InsnReadGetPWMStatus(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data); INT i_APCI1710_DisablePWM(comedi_device *dev, BYTE b_ModulNbr, BYTE b_PWM);
INT i_APCI1710_InsnBitsReadPWMInterrupt(comedi_device * dev, INT i_APCI1710_InsnReadGetPWMStatus(comedi_device *dev, comedi_subdevice *s,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnBitsReadPWMInterrupt(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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 #define APCI1710_30MHZ 30
#define APCI1710_33MHZ 33
You shoud also find the complete GPL in the COPYING file accompanying this source code. #define APCI1710_40MHZ 40
@endverbatim #define APCI1710_BINARY_MODE 0x1
*/ #define APCI1710_GRAY_MODE 0x0
#define APCI1710_30MHZ 30 #define APCI1710_SSI_READ1VALUE 1
#define APCI1710_33MHZ 33 #define APCI1710_SSI_READALLVALUE 2
#define APCI1710_40MHZ 40
#define APCI1710_SSI_SET_CHANNELON 0
#define APCI1710_BINARY_MODE 0x1 #define APCI1710_SSI_SET_CHANNELOFF 1
#define APCI1710_GRAY_MODE 0x0 #define APCI1710_SSI_READ_1CHANNEL 2
#define APCI1710_SSI_READ_ALLCHANNEL 3
#define APCI1710_SSI_READ1VALUE 1
#define APCI1710_SSI_READALLVALUE 2
#define APCI1710_SSI_SET_CHANNELON 0
#define APCI1710_SSI_SET_CHANNELOFF 1
#define APCI1710_SSI_READ_1CHANNEL 2
#define APCI1710_SSI_READ_ALLCHANNEL 3
/* /*
+----------------------------------------------------------------------------+ * SSI INISIALISATION FUNCTION
| SSI INISIALISATION FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnConfigInitSSI(comedi_device *dev, comedi_subdevice *s,
*/ comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnConfigInitSSI(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
INT i_APCI1710_InsnReadSSIValue(comedi_device * dev, comedi_subdevice * s, INT i_APCI1710_InsnReadSSIValue(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnBitsSSIDigitalIO(comedi_device * dev, comedi_subdevice * s, INT i_APCI1710_InsnBitsSSIDigitalIO(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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 #define APCI1710_30MHZ 30
#define APCI1710_33MHZ 33
You shoud also find the complete GPL in the COPYING file accompanying this source code. #define APCI1710_40MHZ 40
@endverbatim #define APCI1710_GATE_INPUT 10
*/
#define APCI1710_TOR_SIMPLE_MODE 2
#define APCI1710_30MHZ 30 #define APCI1710_TOR_DOUBLE_MODE 3
#define APCI1710_33MHZ 33 #define APCI1710_TOR_QUADRUPLE_MODE 4
#define APCI1710_40MHZ 40
#define APCI1710_SINGLE 0
#define APCI1710_GATE_INPUT 10 #define APCI1710_CONTINUOUS 1
#define APCI1710_TOR_SIMPLE_MODE 2
#define APCI1710_TOR_DOUBLE_MODE 3
#define APCI1710_TOR_QUADRUPLE_MODE 4
#define APCI1710_SINGLE 0
#define APCI1710_CONTINUOUS 1
#define APCI1710_TOR_GETPROGRESSSTATUS 0 #define APCI1710_TOR_GETPROGRESSSTATUS 0
#define APCI1710_TOR_GETCOUNTERVALUE 1 #define APCI1710_TOR_GETCOUNTERVALUE 1
#define APCI1710_TOR_READINTERRUPT 2 #define APCI1710_TOR_READINTERRUPT 2
/* /*
+----------------------------------------------------------------------------+ * TOR_COUNTER INISIALISATION FUNCTION
| TOR_COUNTER INISIALISATION FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnConfigInitTorCounter(comedi_device *dev,
*/ comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnConfigInitTorCounter(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); INT i_APCI1710_InsnWriteEnableDisableTorCounter(comedi_device *dev,
comedi_subdevice *s,
INT i_APCI1710_InsnWriteEnableDisableTorCounter(comedi_device * dev, comedi_insn *insn,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); lsampl_t *data);
INT i_APCI1710_InsnReadGetTorCounterInitialisation(comedi_device * dev, INT i_APCI1710_InsnReadGetTorCounterInitialisation(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
comedi_insn *insn,
lsampl_t *data);
/* /*
+----------------------------------------------------------------------------+ * TOR_COUNTER READ FUNCTION
| TOR_COUNTER READ FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(comedi_device *dev,
*/ comedi_subdevice *s,
comedi_insn *insn,
INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(comedi_device * dev, lsampl_t *data);
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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 #define APCI1710_TTL_INIT 0
#define APCI1710_TTL_INITDIRECTION 1
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
#define APCI1710_TTL_INIT 0
#define APCI1710_TTL_INITDIRECTION 1
#define APCI1710_TTL_READCHANNEL 0 #define APCI1710_TTL_READCHANNEL 0
#define APCI1710_TTL_READPORT 1 #define APCI1710_TTL_READPORT 1
/* /*
+----------------------------------------------------------------------------+ * TTL INISIALISATION FUNCTION
| TTL INISIALISATION FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnConfigInitTTLIO(comedi_device *dev, comedi_subdevice *s,
*/ comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnConfigInitTTLIO(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
/* /*
+----------------------------------------------------------------------------+ * TTL INPUT FUNCTION
| TTL INPUT FUNCTION | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnBitsReadTTLIO(comedi_device *dev, comedi_subdevice *s,
*/ comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnReadTTLIOAllPortValue(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnBitsReadTTLIO(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
INT i_APCI1710_InsnReadTTLIOAllPortValue(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
/* /*
+----------------------------------------------------------------------------+ * TTL OUTPUT FUNCTIONS
| TTL OUTPUT FUNCTIONS | */
+----------------------------------------------------------------------------+ INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(comedi_device *dev,
*/ comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
/**
@verbatim
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
ADDI-DATA GmbH
Dieselstrasse 3
D-77833 Ottersweier
Tel: +19(0)7223/9493-0
Fax: +49(0)7223/9493-92
http://www.addi-data-com
info@addi-data.com
This 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.
This 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.
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
/* /*
#define VOID void * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
#define INT int *
#define UINT unsigned int * ADDI-DATA GmbH
#define SHORT short * Dieselstrasse 3
#define USHORT unsigned short * D-77833 Ottersweier
#define CHAR char * Tel: +19(0)7223/9493-0
#define BYTE unsigned char * Fax: +49(0)7223/9493-92
#define WORD unsigned int * http://www.addi-data-com
#define LONG long * info@addi-data.com
#define ULONG unsigned long *
#define DWORD unsigned long * This program is free software; you can redistribute it and/or modify it
#define DOUBLE double * under the terms of the GNU General Public License as published by the Free
#define PINT int * * Software Foundation; either version 2 of the License, or (at your option)
#define PUINT unsigned int * * any later version.
#define PSHORT short * */
#define PUSHORT unsigned short *
#define PCHAR char * #define AMCC_OP_REG_MCSR 0x3c
#define PBYTE unsigned char * #define EEPROM_BUSY 0x80000000
#define PWORD unsigned int * #define NVCMD_LOAD_LOW (0x4 << 5) /* nvRam load low command */
#define PLONG long * #define NVCMD_LOAD_HIGH (0x5 << 5) /* nvRam load high command */
#define PULONG unsigned long * #define NVCMD_BEGIN_READ (0x7 << 5) /* nvRam begin read command */
#define PDWORD unsigned long * #define NVCMD_BEGIN_WRITE (0x6 << 5) /* EEPROM begin write command */
#define PDOUBLE double *
*/
#define AMCC_OP_REG_MCSR 0x3c
#define EEPROM_BUSY 0x80000000
#define NVCMD_LOAD_LOW (0x4 << 5 ) // nvRam load low command
#define NVCMD_LOAD_HIGH (0x5 << 5 ) // nvRam load high command
#define NVCMD_BEGIN_READ (0x7 << 5 ) // nvRam begin read command
#define NVCMD_BEGIN_WRITE (0x6 << 5) //EEPROM begin write command
INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead, INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead,
DWORD dw_PCIBoardEepromAddress, DWORD dw_PCIBoardEepromAddress,
WORD w_EepromStartAddress, PWORD pw_DataRead); WORD w_EepromStartAddress, PWORD pw_DataRead);
...@@ -219,21 +219,25 @@ struct pcilst_struct *amcc_devices; // ptr to root list of all amcc devices ...@@ -219,21 +219,25 @@ struct pcilst_struct *amcc_devices; // ptr to root list of all amcc devices
void v_pci_card_list_init(unsigned short pci_vendor, char display); void v_pci_card_list_init(unsigned short pci_vendor, char display);
void v_pci_card_list_cleanup(unsigned short pci_vendor); void v_pci_card_list_cleanup(unsigned short pci_vendor);
struct pcilst_struct *ptr_find_free_pci_card_by_device(unsigned short vendor_id, struct pcilst_struct *ptr_find_free_pci_card_by_device(unsigned short vendor_id,
unsigned short device_id); unsigned short
device_id);
int i_find_free_pci_card_by_position(unsigned short vendor_id, int i_find_free_pci_card_by_position(unsigned short vendor_id,
unsigned short device_id, unsigned short pci_bus, unsigned short device_id,
unsigned short pci_slot, struct pcilst_struct **card); unsigned short pci_bus,
unsigned short pci_slot,
struct pcilst_struct **card);
struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id, struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id,
unsigned short device_id, unsigned short pci_bus, unsigned short device_id,
unsigned short pci_slot); unsigned short pci_bus,
unsigned short pci_slot);
int i_pci_card_alloc(struct pcilst_struct *amcc); int i_pci_card_alloc(struct pcilst_struct *amcc);
int i_pci_card_free(struct pcilst_struct *amcc); int i_pci_card_free(struct pcilst_struct *amcc);
void v_pci_card_list_display(void); void v_pci_card_list_display(void);
int i_pci_card_data(struct pcilst_struct *amcc, int i_pci_card_data(struct pcilst_struct *amcc,
unsigned char *pci_bus, unsigned char *pci_slot, unsigned char *pci_bus, unsigned char *pci_slot,
unsigned char *pci_func, unsigned short *io_addr, unsigned short *irq, unsigned char *pci_func, unsigned short *io_addr,
unsigned short *master); unsigned short *irq, unsigned short *master);
/****************************************************************************/ /****************************************************************************/
...@@ -273,7 +277,7 @@ void v_pci_card_list_init(unsigned short pci_vendor, char display) ...@@ -273,7 +277,7 @@ void v_pci_card_list_init(unsigned short pci_vendor, char display)
amcc->pci_func = PCI_FUNC(pcidev->devfn); amcc->pci_func = PCI_FUNC(pcidev->devfn);
for (i = 0; i < 5; i++) for (i = 0; i < 5; i++)
amcc->io_addr[i] = amcc->io_addr[i] =
pcidev->base_address[i] & ~3UL; pcidev->base_address[i] & ~3UL;
amcc->irq = pcidev->irq; amcc->irq = pcidev->irq;
#else #else
amcc->vendor = pcidev->vendor; amcc->vendor = pcidev->vendor;
...@@ -286,7 +290,7 @@ void v_pci_card_list_init(unsigned short pci_vendor, char display) ...@@ -286,7 +290,7 @@ void v_pci_card_list_init(unsigned short pci_vendor, char display)
amcc->pci_func = PCI_FUNC(pcidev->devfn); amcc->pci_func = PCI_FUNC(pcidev->devfn);
for (i = 0; i < 5; i++) for (i = 0; i < 5; i++)
amcc->io_addr[i] = amcc->io_addr[i] =
pcidev->resource[i].start & ~3UL; pcidev->resource[i].start & ~3UL;
amcc->irq = pcidev->irq; amcc->irq = pcidev->irq;
#endif #endif
...@@ -314,14 +318,14 @@ void v_pci_card_list_cleanup(unsigned short pci_vendor) ...@@ -314,14 +318,14 @@ void v_pci_card_list_cleanup(unsigned short pci_vendor)
/****************************************************************************/ /****************************************************************************/
/* find first unused card with this device_id */ /* find first unused card with this device_id */
struct pcilst_struct *ptr_find_free_pci_card_by_device(unsigned short vendor_id, struct pcilst_struct *ptr_find_free_pci_card_by_device(unsigned short vendor_id,
unsigned short device_id) unsigned short device_id)
{ {
struct pcilst_struct *amcc, *next; struct pcilst_struct *amcc, *next;
for (amcc = amcc_devices; amcc; amcc = next) { for (amcc = amcc_devices; amcc; amcc = next) {
next = amcc->next; next = amcc->next;
if ((!amcc->used) && (amcc->device == device_id) if ((!amcc->used) && (amcc->device == device_id)
&& (amcc->vendor == vendor_id)) && (amcc->vendor == vendor_id))
return amcc; return amcc;
} }
...@@ -332,8 +336,10 @@ struct pcilst_struct *ptr_find_free_pci_card_by_device(unsigned short vendor_id, ...@@ -332,8 +336,10 @@ struct pcilst_struct *ptr_find_free_pci_card_by_device(unsigned short vendor_id,
/****************************************************************************/ /****************************************************************************/
/* find card on requested position */ /* find card on requested position */
int i_find_free_pci_card_by_position(unsigned short vendor_id, int i_find_free_pci_card_by_position(unsigned short vendor_id,
unsigned short device_id, unsigned short pci_bus, unsigned short device_id,
unsigned short pci_slot, struct pcilst_struct **card) unsigned short pci_bus,
unsigned short pci_slot,
struct pcilst_struct **card)
{ {
struct pcilst_struct *amcc, *next; struct pcilst_struct *amcc, *next;
...@@ -341,15 +347,15 @@ int i_find_free_pci_card_by_position(unsigned short vendor_id, ...@@ -341,15 +347,15 @@ int i_find_free_pci_card_by_position(unsigned short vendor_id,
for (amcc = amcc_devices; amcc; amcc = next) { for (amcc = amcc_devices; amcc; amcc = next) {
next = amcc->next; next = amcc->next;
if ((amcc->vendor == vendor_id) && (amcc->device == device_id) if ((amcc->vendor == vendor_id) && (amcc->device == device_id)
&& (amcc->pci_bus == pci_bus) && (amcc->pci_bus == pci_bus)
&& (amcc->pci_slot == pci_slot)) { && (amcc->pci_slot == pci_slot)) {
if (!(amcc->used)) { if (!(amcc->used)) {
*card = amcc; *card = amcc;
return 0; // ok, card is found return 0; // ok, card is found
} else { } else {
rt_printk rt_printk
(" - \nCard on requested position is used b:s %d:%d!\n", (" - \nCard on requested position is used b:s %d:%d!\n",
pci_bus, pci_slot); pci_bus, pci_slot);
return 2; // card exist but is used return 2; // card exist but is used
} }
} }
...@@ -395,7 +401,11 @@ void v_pci_card_list_display(void) ...@@ -395,7 +401,11 @@ void v_pci_card_list_display(void)
for (amcc = amcc_devices; amcc; amcc = next) { for (amcc = amcc_devices; amcc; amcc = next) {
next = amcc->next; next = amcc->next;
printk("%2d %2d %2d 0x%4x 0x%4x %3s 0x%4x 0x%4x %2d %2d\n", amcc->pci_bus, amcc->pci_slot, amcc->pci_func, amcc->vendor, amcc->device, amcc->master ? "yes" : "no", amcc->io_addr[0], amcc->io_addr[2], amcc->irq, amcc->used); printk
("%2d %2d %2d 0x%4x 0x%4x %3s 0x%4x 0x%4x %2d %2d\n",
amcc->pci_bus, amcc->pci_slot, amcc->pci_func,
amcc->vendor, amcc->device, amcc->master ? "yes" : "no",
amcc->io_addr[0], amcc->io_addr[2], amcc->irq, amcc->used);
} }
} }
...@@ -403,9 +413,9 @@ void v_pci_card_list_display(void) ...@@ -403,9 +413,9 @@ void v_pci_card_list_display(void)
/****************************************************************************/ /****************************************************************************/
/* return all card information for driver */ /* return all card information for driver */
int i_pci_card_data(struct pcilst_struct *amcc, int i_pci_card_data(struct pcilst_struct *amcc,
unsigned char *pci_bus, unsigned char *pci_slot, unsigned char *pci_bus, unsigned char *pci_slot,
unsigned char *pci_func, unsigned short *io_addr, unsigned short *irq, unsigned char *pci_func, unsigned short *io_addr,
unsigned short *master) unsigned short *irq, unsigned short *master)
{ {
int i; int i;
...@@ -424,29 +434,32 @@ int i_pci_card_data(struct pcilst_struct *amcc, ...@@ -424,29 +434,32 @@ int i_pci_card_data(struct pcilst_struct *amcc,
/****************************************************************************/ /****************************************************************************/
/* select and alloc card */ /* select and alloc card */
struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id, struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id,
unsigned short device_id, unsigned short pci_bus, unsigned short device_id,
unsigned short pci_slot) unsigned short pci_bus,
unsigned short pci_slot)
{ {
struct pcilst_struct *card; struct pcilst_struct *card;
if ((pci_bus < 1) & (pci_slot < 1)) { // use autodetection if ((pci_bus < 1) & (pci_slot < 1)) { // use autodetection
if ((card = ptr_find_free_pci_card_by_device(vendor_id, if ((card = ptr_find_free_pci_card_by_device(vendor_id,
device_id)) == NULL) { device_id)) ==
NULL) {
rt_printk(" - Unused card not found in system!\n"); rt_printk(" - Unused card not found in system!\n");
return NULL; return NULL;
} }
} else { } else {
switch (i_find_free_pci_card_by_position(vendor_id, device_id, switch (i_find_free_pci_card_by_position(vendor_id, device_id,
pci_bus, pci_slot, &card)) { pci_bus, pci_slot,
&card)) {
case 1: case 1:
rt_printk rt_printk
(" - Card not found on requested position b:s %d:%d!\n", (" - Card not found on requested position b:s %d:%d!\n",
pci_bus, pci_slot); pci_bus, pci_slot);
return NULL; return NULL;
case 2: case 2:
rt_printk rt_printk
(" - Card on requested position is used b:s %d:%d!\n", (" - Card on requested position is used b:s %d:%d!\n",
pci_bus, pci_slot); pci_bus, pci_slot);
return NULL; return NULL;
} }
} }
......
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
* ADDI-DATA GmbH
* Dieselstrasse 3
* D-77833 Ottersweier
* Tel: +19(0)7223/9493-0
* Fax: +49(0)7223/9493-92
* http://www.addi-data-com
* info@addi-data.com
*
* This 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.
*/
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. #define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */
#define COMEDI_SUBD_PWM 12 /* Pulse width Measurement */
#define COMEDI_SUBD_SSI 13 /* Synchronous serial interface */
#define COMEDI_SUBD_TOR 14 /* Tor counter */
#define COMEDI_SUBD_CHRONO 15 /* Chrono meter */
#define COMEDI_SUBD_PULSEENCODER 16 /* Pulse Encoder INP CPT */
#define COMEDI_SUBD_INCREMENTALCOUNTER 17 /* Incremental Counter */
ADDI-DATA GmbH #define APCI1710_BOARD_NAME "apci1710"
Dieselstrasse 3 #define APCI1710_BOARD_VENDOR_ID 0x10E8
D-77833 Ottersweier #define APCI1710_BOARD_DEVICE_ID 0x818F
Tel: +19(0)7223/9493-0 #define APCI1710_ADDRESS_RANGE 256
Fax: +49(0)7223/9493-92 #define APCI1710_CONFIG_ADDRESS_RANGE 8
http://www.addi-data-com #define APCI1710_INCREMENTAL_COUNTER 0x53430000UL
info@addi-data.com #define APCI1710_SSI_COUNTER 0x53490000UL
#define APCI1710_TTL_IO 0x544C0000UL
This 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. #define APCI1710_DIGITAL_IO 0x44490000UL
#define APCI1710_82X54_TIMER 0x49430000UL
This 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. #define APCI1710_CHRONOMETER 0x43480000UL
#define APCI1710_PULSE_ENCODER 0x495A0000UL
You 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 #define APCI1710_TOR_COUNTER 0x544F0000UL
#define APCI1710_PWM 0x50570000UL
You shoud also find the complete GPL in the COPYING file accompanying this source code. #define APCI1710_ETM 0x45540000UL
#define APCI1710_CDA 0x43440000UL
@endverbatim #define APCI1710_DISABLE 0
*/ #define APCI1710_ENABLE 1
#define APCI1710_SYNCHRONOUS_MODE 1
#define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ #define APCI1710_ASYNCHRONOUS_MODE 0
#define COMEDI_SUBD_PWM 12 /* Pulse width Measurement */
#define COMEDI_SUBD_SSI 13 /* Synchronous serial interface */
#define COMEDI_SUBD_TOR 14 /* Tor counter */
#define COMEDI_SUBD_CHRONO 15 /* Chrono meter */
#define COMEDI_SUBD_PULSEENCODER 16 /* Pulse Encoder INP CPT */
#define COMEDI_SUBD_INCREMENTALCOUNTER 17 /* Incremental Counter */
#define APCI1710_BOARD_NAME "apci1710"
#define APCI1710_BOARD_VENDOR_ID 0x10E8
#define APCI1710_BOARD_DEVICE_ID 0x818F
#define APCI1710_ADDRESS_RANGE 256
#define APCI1710_CONFIG_ADDRESS_RANGE 8
#define APCI1710_INCREMENTAL_COUNTER 0x53430000UL
#define APCI1710_SSI_COUNTER 0x53490000UL
#define APCI1710_TTL_IO 0x544C0000UL
#define APCI1710_DIGITAL_IO 0x44490000UL
#define APCI1710_82X54_TIMER 0x49430000UL
#define APCI1710_CHRONOMETER 0x43480000UL
#define APCI1710_PULSE_ENCODER 0x495A0000UL
#define APCI1710_TOR_COUNTER 0x544F0000UL
#define APCI1710_PWM 0x50570000UL
#define APCI1710_ETM 0x45540000UL
#define APCI1710_CDA 0x43440000UL
#define APCI1710_DISABLE 0
#define APCI1710_ENABLE 1
#define APCI1710_SYNCHRONOUS_MODE 1
#define APCI1710_ASYNCHRONOUS_MODE 0
//MODULE INFO STRUCTURE //MODULE INFO STRUCTURE
static const comedi_lrange range_apci1710_ttl = { 4, { static const comedi_lrange range_apci1710_ttl = { 4, {
BIP_RANGE(10), BIP_RANGE(10),
BIP_RANGE(5), BIP_RANGE(5),
BIP_RANGE(2), BIP_RANGE(2),
BIP_RANGE(1) BIP_RANGE(1)
} }
}; };
static const comedi_lrange range_apci1710_ssi = { 4, { static const comedi_lrange range_apci1710_ssi = { 4, {
BIP_RANGE(10), BIP_RANGE(10),
BIP_RANGE(5), BIP_RANGE(5),
BIP_RANGE(2), BIP_RANGE(2),
BIP_RANGE(1) BIP_RANGE(1)
} }
}; };
static const comedi_lrange range_apci1710_inccpt = { 4, { static const comedi_lrange range_apci1710_inccpt = { 4, {
BIP_RANGE(10), BIP_RANGE(10),
BIP_RANGE(5), BIP_RANGE(5),
BIP_RANGE(2), BIP_RANGE(2),
BIP_RANGE(1) BIP_RANGE(1)
} }
}; };
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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 /* Card Specific information */
#define APCI035_BOARD_VENDOR_ID 0x15B8
You shoud also find the complete GPL in the COPYING file accompanying this source code. #define APCI035_ADDRESS_RANGE 255
@endverbatim
*/
// Card Specific information
#define APCI035_BOARD_VENDOR_ID 0x15B8
#define APCI035_ADDRESS_RANGE 255
INT i_TW_Number; INT i_TW_Number;
struct { struct {
...@@ -39,32 +33,31 @@ struct { ...@@ -39,32 +33,31 @@ struct {
INT i_ModuleSelection; INT i_ModuleSelection;
} Config_Parameters_Main; } Config_Parameters_Main;
//ANALOG INPUT RANGE /* ANALOG INPUT RANGE */
comedi_lrange range_apci035_ai = { 8, { comedi_lrange range_apci035_ai = { 8, {
BIP_RANGE(10), BIP_RANGE(10),
BIP_RANGE(5), BIP_RANGE(5),
BIP_RANGE(2), BIP_RANGE(2),
BIP_RANGE(1), BIP_RANGE(1),
UNI_RANGE(10), UNI_RANGE(10),
UNI_RANGE(5), UNI_RANGE(5),
UNI_RANGE(2), UNI_RANGE(2),
UNI_RANGE(1) UNI_RANGE(1)
} }
}; };
// Timer / Watchdog Related Defines /* Timer / Watchdog Related Defines */
#define APCI035_TCW_SYNC_ENABLEDISABLE 0
#define APCI035_TCW_SYNC_ENABLEDISABLE 0 #define APCI035_TCW_RELOAD_VALUE 4
#define APCI035_TCW_RELOAD_VALUE 4 #define APCI035_TCW_TIMEBASE 8
#define APCI035_TCW_TIMEBASE 8 #define APCI035_TCW_PROG 12
#define APCI035_TCW_PROG 12 #define APCI035_TCW_TRIG_STATUS 16
#define APCI035_TCW_TRIG_STATUS 16 #define APCI035_TCW_IRQ 20
#define APCI035_TCW_IRQ 20 #define APCI035_TCW_WARN_TIMEVAL 24
#define APCI035_TCW_WARN_TIMEVAL 24 #define APCI035_TCW_WARN_TIMEBASE 28
#define APCI035_TCW_WARN_TIMEBASE 28
#define ADDIDATA_TIMER 0 #define ADDIDATA_TIMER 0
//#define ADDIDATA_WATCHDOG 1 /* #define ADDIDATA_WATCHDOG 1 */
#define APCI035_TW1 0 #define APCI035_TW1 0
#define APCI035_TW2 32 #define APCI035_TW2 32
...@@ -80,50 +73,51 @@ comedi_lrange range_apci035_ai = { 8, { ...@@ -80,50 +73,51 @@ comedi_lrange range_apci035_ai = { 8, {
#define APCI035_EOS 20 #define APCI035_EOS 20
#define APCI035_CHAN_NO 24 #define APCI035_CHAN_NO 24
#define APCI035_CHAN_VAL 28 #define APCI035_CHAN_VAL 28
#define APCI035_CONV_TIME_TIME_BASE 36 #define APCI035_CONV_TIME_TIME_BASE 36
#define APCI035_RELOAD_CONV_TIME_VAL 32 #define APCI035_RELOAD_CONV_TIME_VAL 32
#define APCI035_DELAY_TIME_TIME_BASE 44 #define APCI035_DELAY_TIME_TIME_BASE 44
#define APCI035_RELOAD_DELAY_TIME_VAL 40 #define APCI035_RELOAD_DELAY_TIME_VAL 40
#define ENABLE_EXT_TRIG 1 #define ENABLE_EXT_TRIG 1
#define ENABLE_EXT_GATE 2 #define ENABLE_EXT_GATE 2
#define ENABLE_EXT_TRIG_GATE 3 #define ENABLE_EXT_TRIG_GATE 3
#define ANALOG_INPUT 0 #define ANALOG_INPUT 0
#define TEMPERATURE 1 #define TEMPERATURE 1
#define RESISTANCE 2 #define RESISTANCE 2
#define ADDIDATA_GREATER_THAN_TEST 0 #define ADDIDATA_GREATER_THAN_TEST 0
#define ADDIDATA_LESS_THAN_TEST 1 #define ADDIDATA_LESS_THAN_TEST 1
#define APCI035_MAXVOLT 2.5 #define APCI035_MAXVOLT 2.5
#define ADDIDATA_UNIPOLAR 1 #define ADDIDATA_UNIPOLAR 1
#define ADDIDATA_BIPOLAR 2 #define ADDIDATA_BIPOLAR 2
//ADDIDATA Enable Disable /* ADDIDATA Enable Disable */
#define ADDIDATA_ENABLE 1 #define ADDIDATA_ENABLE 1
#define ADDIDATA_DISABLE 0 #define ADDIDATA_DISABLE 0
// Hardware Layer functions for Apci035 /* Hardware Layer functions for Apci035 */
// TIMER /* TIMER */
// timer value is passed as u seconds /* timer value is passed as u seconds */
INT i_APCI035_ConfigTimerWatchdog(comedi_device * dev, comedi_subdevice * s, INT i_APCI035_ConfigTimerWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI035_StartStopWriteTimerWatchdog(comedi_device * dev, INT i_APCI035_StartStopWriteTimerWatchdog(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
INT i_APCI035_ReadTimerWatchdog(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data);
comedi_insn * insn, lsampl_t * data); INT i_APCI035_ReadTimerWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
//Temperature Related Defines (Analog Input Subdevice) /* Temperature Related Defines (Analog Input Subdevice) */
INT i_APCI035_ConfigAnalogInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI035_ConfigAnalogInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI035_ReadAnalogInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI035_ReadAnalogInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//Interrupt /* Interrupt */
static void v_APCI035_Interrupt(int irq, void *d); static void v_APCI035_Interrupt(int irq, void *d);
//Reset functions /* Reset functions */
INT i_APCI035_Reset(comedi_device * dev); INT i_APCI035_Reset(comedi_device *dev);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
/********* Definitions for APCI-1032 card *****/ /********* Definitions for APCI-1032 card *****/
...@@ -54,17 +47,17 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -54,17 +47,17 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
//DI //DI
// for di read // for di read
INT i_APCI1032_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1032_ConfigDigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1032_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1032_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1032_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1032_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
// Interrupt functions..... // Interrupt functions.....
static VOID v_APCI1032_Interrupt(int irq, void *d); static VOID v_APCI1032_Interrupt(int irq, void *d);
//Reset //Reset
INT i_APCI1032_Reset(comedi_device * dev); INT i_APCI1032_Reset(comedi_device *dev);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
/********* Definitions for APCI-1500 card *****/ /********* Definitions for APCI-1500 card *****/
...@@ -53,9 +46,10 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -53,9 +46,10 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
#define START 0 #define START 0
#define STOP 1 #define STOP 1
#define TRIGGER 2 #define TRIGGER 2
/**************************/
/* Zillog I/O enumeration */ /*
/**************************/ * Zillog I/O enumeration
*/
enum { enum {
APCI1500_Z8536_PORT_C, APCI1500_Z8536_PORT_C,
APCI1500_Z8536_PORT_B, APCI1500_Z8536_PORT_B,
...@@ -63,10 +57,9 @@ enum { ...@@ -63,10 +57,9 @@ enum {
APCI1500_Z8536_CONTROL_REGISTER APCI1500_Z8536_CONTROL_REGISTER
}; };
/******************************/ /*
/* Z8536 CIO Internal Address */ * Z8536 CIO Internal Address
/******************************/ */
enum { enum {
APCI1500_RW_MASTER_INTERRUPT_CONTROL, APCI1500_RW_MASTER_INTERRUPT_CONTROL,
APCI1500_RW_MASTER_CONFIGURATION_CONTROL, APCI1500_RW_MASTER_CONFIGURATION_CONTROL,
...@@ -123,35 +116,50 @@ enum { ...@@ -123,35 +116,50 @@ enum {
}; };
/*----------DIGITAL INPUT----------------*/ /*----------DIGITAL INPUT----------------*/
static int i_APCI1500_Initialisation(comedi_device * dev, comedi_subdevice * s, static int i_APCI1500_Initialisation(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
static int i_APCI1500_ConfigDigitalInputEvent(comedi_device * dev, static int i_APCI1500_ConfigDigitalInputEvent(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
comedi_insn *insn,
static int i_APCI1500_StartStopInputEvent(comedi_device * dev, lsampl_t *data);
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
static int i_APCI1500_ReadMoreDigitalInput(comedi_device * dev, static int i_APCI1500_StartStopInputEvent(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
static int i_APCI1500_ReadMoreDigitalInput(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
/*---------- DIGITAL OUTPUT------------*/ /*---------- DIGITAL OUTPUT------------*/
static int i_APCI1500_ConfigDigitalOutputErrorInterrupt(comedi_device * dev, static int i_APCI1500_ConfigDigitalOutputErrorInterrupt(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
static int i_APCI1500_WriteDigitalOutput(comedi_device * dev, comedi_insn *insn,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); lsampl_t *data);
static int i_APCI1500_WriteDigitalOutput(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
/*----------TIMER----------------*/ /*----------TIMER----------------*/
static int i_APCI1500_ConfigCounterTimerWatchdog(comedi_device * dev, static int i_APCI1500_ConfigCounterTimerWatchdog(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
static int i_APCI1500_StartStopTriggerTimerCounterWatchdog(comedi_device * dev, comedi_insn *insn,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); lsampl_t *data);
static int i_APCI1500_ReadCounterTimerWatchdog(comedi_device * dev, static int i_APCI1500_StartStopTriggerTimerCounterWatchdog(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
static int i_APCI1500_ReadInterruptMask(comedi_device * dev, comedi_insn *insn,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); lsampl_t *data);
static int i_APCI1500_ReadCounterTimerWatchdog(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
lsampl_t *data);
static int i_APCI1500_ReadInterruptMask(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
/*----------INTERRUPT HANDLER------*/ /*----------INTERRUPT HANDLER------*/
static void v_APCI1500_Interrupt(int irq, void *d); static void v_APCI1500_Interrupt(int irq, void *d);
static int i_APCI1500_ConfigureInterrupt(comedi_device * dev, static int i_APCI1500_ConfigureInterrupt(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
/*----------RESET---------------*/ /*----------RESET---------------*/
static int i_APCI1500_Reset(comedi_device * dev); static int i_APCI1500_Reset(comedi_device *dev);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
/********* Definitions for APCI-1516 card *****/ /********* Definitions for APCI-1516 card *****/
...@@ -45,27 +38,27 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -45,27 +38,27 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
// Hardware Layer functions for Apci1516 // Hardware Layer functions for Apci1516
//Digital Input //Digital Input
INT i_APCI1516_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1516_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1516_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1516_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//Digital Output //Digital Output
int i_APCI1516_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, int i_APCI1516_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1516_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1516_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1516_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1516_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
// TIMER // TIMER
// timer value is passed as u seconds // timer value is passed as u seconds
int i_APCI1516_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI1516_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI1516_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI1516_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI1516_ReadWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI1516_ReadWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//reset //reset
INT i_APCI1516_Reset(comedi_device * dev); INT i_APCI1516_Reset(comedi_device *dev);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
/********* Definitions for APCI-1564 card *****/ /********* Definitions for APCI-1564 card *****/
...@@ -89,34 +82,38 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -89,34 +82,38 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
//DI //DI
// for di read // for di read
INT i_APCI1564_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1564_ConfigDigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1564_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1564_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1564_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1564_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//DO //DO
int i_APCI1564_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, int i_APCI1564_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1564_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1564_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI1564_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI1564_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI1564_ReadInterruptStatus(comedi_device * dev, comedi_subdevice * s, int i_APCI1564_ReadInterruptStatus(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
// TIMER // TIMER
// timer value is passed as u seconds // timer value is passed as u seconds
INT i_APCI1564_ConfigTimerCounterWatchdog(comedi_device * dev, INT i_APCI1564_ConfigTimerCounterWatchdog(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
int i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device * dev, comedi_insn *insn, lsampl_t *data);
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); int i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device *dev,
int i_APCI1564_ReadTimerCounterWatchdog(comedi_device * dev, comedi_subdevice *s,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_insn *insn,
lsampl_t *data);
int i_APCI1564_ReadTimerCounterWatchdog(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
// INTERRUPT // INTERRUPT
static VOID v_APCI1564_Interrupt(int irq, void *d); static VOID v_APCI1564_Interrupt(int irq, void *d);
// RESET // RESET
INT i_APCI1564_Reset(comedi_device * dev); INT i_APCI1564_Reset(comedi_device *dev);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
#ifndef COMEDI_SUBD_TTLIO #ifndef COMEDI_SUBD_TTLIO
#define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ #define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */
...@@ -50,17 +43,17 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -50,17 +43,17 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
static const comedi_lrange range_apci16xx_ttl = { 12, static const comedi_lrange range_apci16xx_ttl = { 12,
{BIP_RANGE(1), {BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1)} BIP_RANGE(1)}
}; };
/* /*
...@@ -69,8 +62,9 @@ static const comedi_lrange range_apci16xx_ttl = { 12, ...@@ -69,8 +62,9 @@ static const comedi_lrange range_apci16xx_ttl = { 12,
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
int i_APCI16XX_InsnConfigInitTTLIO(comedi_device * dev, int i_APCI16XX_InsnConfigInitTTLIO(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s, comedi_insn *insn,
lsampl_t *data);
/* /*
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
...@@ -78,11 +72,13 @@ int i_APCI16XX_InsnConfigInitTTLIO(comedi_device * dev, ...@@ -78,11 +72,13 @@ int i_APCI16XX_InsnConfigInitTTLIO(comedi_device * dev,
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
int i_APCI16XX_InsnBitsReadTTLIO(comedi_device * dev, int i_APCI16XX_InsnBitsReadTTLIO(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s, comedi_insn *insn,
lsampl_t *data);
int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device * dev, int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
/* /*
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
...@@ -90,8 +86,9 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device * dev, ...@@ -90,8 +86,9 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device * dev,
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
int i_APCI16XX_InsnBitsWriteTTLIO(comedi_device * dev, int i_APCI16XX_InsnBitsWriteTTLIO(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s, comedi_insn *insn,
lsampl_t *data);
int i_APCI16XX_Reset(comedi_device * dev); int i_APCI16XX_Reset(comedi_device *dev);
#endif #endif
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
/********* Definitions for APCI-2016 card *****/ /********* Definitions for APCI-2016 card *****/
#define APCI2016_BOARD_VENDOR_ID 0x15B8 #define APCI2016_BOARD_VENDOR_ID 0x15B8
...@@ -47,26 +40,26 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -47,26 +40,26 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
// Hardware Layer functions for Apci2016 // Hardware Layer functions for Apci2016
//DO //DO
int i_APCI2016_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, int i_APCI2016_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI2016_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, int i_APCI2016_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI2016_BitsDigitalOutput(comedi_device * dev, comedi_subdevice * s, int i_APCI2016_BitsDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
// TIMER // TIMER
// timer value is passed as u seconds // timer value is passed as u seconds
int i_APCI2016_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI2016_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI2016_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI2016_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI2016_ReadWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI2016_ReadWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
// Interrupt functions..... // Interrupt functions.....
...@@ -74,4 +67,4 @@ int i_APCI2016_ReadWatchdog(comedi_device * dev, comedi_subdevice * s, ...@@ -74,4 +67,4 @@ int i_APCI2016_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
//VOID v_APCI2016_Interrupt(int irq, void *d); //VOID v_APCI2016_Interrupt(int irq, void *d);
// RESET // RESET
INT i_APCI2016_Reset(comedi_device * dev); INT i_APCI2016_Reset(comedi_device *dev);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
* ADDI-DATA GmbH
* Dieselstrasse 3
* D-77833 Ottersweier
* Tel: +19(0)7223/9493-0
* Fax: +49(0)7223/9493-92
* http://www.addi-data-com
* info@addi-data.com
*
* This 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.
*/
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
ADDI-DATA GmbH
Dieselstrasse 3
D-77833 Ottersweier
Tel: +19(0)7223/9493-0
Fax: +49(0)7223/9493-92
http://www.addi-data-com
info@addi-data.com
This 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.
This 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.
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
/********* Definitions for APCI-2032 card *****/ /********* Definitions for APCI-2032 card *****/
// Card Specific information // Card Specific information
...@@ -61,27 +55,27 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -61,27 +55,27 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
// Hardware Layer functions for Apci2032 // Hardware Layer functions for Apci2032
//DO //DO
int i_APCI2032_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, int i_APCI2032_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI2032_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI2032_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI2032_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI2032_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI2032_ReadInterruptStatus(comedi_device * dev, comedi_subdevice * s, int i_APCI2032_ReadInterruptStatus(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
// TIMER // TIMER
// timer value is passed as u seconds // timer value is passed as u seconds
INT i_APCI2032_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s, INT i_APCI2032_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI2032_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI2032_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI2032_ReadWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI2032_ReadWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
// Interrupt functions..... // Interrupt functions.....
void v_APCI2032_Interrupt(int irq, void *d); void v_APCI2032_Interrupt(int irq, void *d);
//Reset functions //Reset functions
int i_APCI2032_Reset(comedi_device * dev); int i_APCI2032_Reset(comedi_device *dev);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
* ADDI-DATA GmbH
* Dieselstrasse 3
* D-77833 Ottersweier
* Tel: +19(0)7223/9493-0
* Fax: +49(0)7223/9493-92
* http://www.addi-data-com
* info@addi-data.com
*
* This 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.
*/
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
ADDI-DATA GmbH
Dieselstrasse 3
D-77833 Ottersweier
Tel: +19(0)7223/9493-0
Fax: +49(0)7223/9493-92
http://www.addi-data-com
info@addi-data.com
This 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.
This 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.
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
/********* Definitions for APCI-2200 card *****/ /********* Definitions for APCI-2200 card *****/
// Card Specific information // Card Specific information
...@@ -42,26 +36,26 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -42,26 +36,26 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
// Hardware Layer functions for Apci2200 // Hardware Layer functions for Apci2200
//Digital Input //Digital Input
INT i_APCI2200_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI2200_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI2200_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI2200_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//Digital Output //Digital Output
int i_APCI2200_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, int i_APCI2200_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI2200_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI2200_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI2200_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI2200_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
// TIMER // TIMER
int i_APCI2200_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI2200_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI2200_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI2200_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI2200_ReadWatchdog(comedi_device * dev, comedi_subdevice * s, int i_APCI2200_ReadWatchdog(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//reset //reset
INT i_APCI2200_Reset(comedi_device * dev); INT i_APCI2200_Reset(comedi_device *dev);
// hwdrv_apci3120.h // hwdrv_apci3120.h
/**
@verbatim
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
ADDI-DATA GmbH
Dieselstrasse 3
D-77833 Ottersweier
Tel: +19(0)7223/9493-0
Fax: +49(0)7223/9493-92
http://www.addi-data-com
info@addi-data.com
This 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.
This 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.
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
/* /*
* Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
+-----------------------------------------------------------------------+ *
| (C) ADDI-DATA GmbH Dieselstrasse 3 D-77833 Ottersweier | * ADDI-DATA GmbH
+-----------------------------------------------------------------------+ * Dieselstrasse 3
| Tel : +49 (0) 7223/9493-0 | email : info@addi-data.com | * D-77833 Ottersweier
| Fax : +49 (0) 7223/9493-92 | Internet : http://www.addi-data.com | * Tel: +19(0)7223/9493-0
+-----------------------------------------------------------------------+ * Fax: +49(0)7223/9493-92
| Project : ADDI DATA | Compiler : GCC | * http://www.addi-data-com
| Modulname : hwdrv_apci3120.h | Version : 2.96 Redhat Linux | * info@addi-data.com
| | kernel-2.4.2 | *
+-------------------------------+---------------------------------------+ * This program is free software; you can redistribute it and/or modify it
| Author : | Date : | * 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)
| Description :Header file for apci3120 hardware abstraction layer | * any later version.
+-----------------------------------------------------------------------+ */
| UPDATE'S |
+-----------------------------------------------------------------------+
| Date | Author | Description of updates |
+----------+-----------+------------------------------------------------+
| | | |
| | | |
| | | |
| | | |
| | | |
+----------+-----------+------------------------------------------------+
| | | |
| | | |
| | | |
+----------+-----------+------------------------------------------------+
*/
// comedi related defines // comedi related defines
//ANALOG INPUT RANGE //ANALOG INPUT RANGE
static const comedi_lrange range_apci3120_ai = { 8, { static const comedi_lrange range_apci3120_ai = { 8, {
BIP_RANGE(10), BIP_RANGE(10),
BIP_RANGE(5), BIP_RANGE(5),
BIP_RANGE(2), BIP_RANGE(2),
BIP_RANGE(1), BIP_RANGE(1),
UNI_RANGE(10), UNI_RANGE(10),
UNI_RANGE(5), UNI_RANGE(5),
UNI_RANGE(2), UNI_RANGE(2),
UNI_RANGE(1) UNI_RANGE(1)
} }
}; };
// ANALOG OUTPUT RANGE // ANALOG OUTPUT RANGE
static const comedi_lrange range_apci3120_ao = { 2, { static const comedi_lrange range_apci3120_ao = { 2, {
BIP_RANGE(10), BIP_RANGE(10),
UNI_RANGE(10) UNI_RANGE(10)
} }
}; };
#define APCI3120_BIPOLAR_RANGES 4 // used for test on mixture of BIP/UNI ranges #define APCI3120_BIPOLAR_RANGES 4 // used for test on mixture of BIP/UNI ranges
...@@ -216,61 +178,64 @@ typedef struct { ...@@ -216,61 +178,64 @@ typedef struct {
// Function Declaration For APCI-3120 // Function Declaration For APCI-3120
// Internal functions // Internal functions
int i_APCI3120_SetupChannelList(comedi_device * dev, comedi_subdevice * s, int i_APCI3120_SetupChannelList(comedi_device *dev, comedi_subdevice *s,
int n_chan, unsigned int *chanlist, char check); int n_chan, unsigned int *chanlist, char check);
int i_APCI3120_ExttrigEnable(comedi_device * dev); int i_APCI3120_ExttrigEnable(comedi_device *dev);
int i_APCI3120_ExttrigDisable(comedi_device * dev); int i_APCI3120_ExttrigDisable(comedi_device *dev);
int i_APCI3120_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s); int i_APCI3120_StopCyclicAcquisition(comedi_device *dev, comedi_subdevice *s);
int i_APCI3120_Reset(comedi_device * dev); int i_APCI3120_Reset(comedi_device *dev);
int i_APCI3120_CyclicAnalogInput(int mode, comedi_device * dev, int i_APCI3120_CyclicAnalogInput(int mode, comedi_device *dev,
comedi_subdevice * s); comedi_subdevice *s);
// Interrupt functions // Interrupt functions
void v_APCI3120_Interrupt(int irq, void *d); void v_APCI3120_Interrupt(int irq, void *d);
//UPDATE-0.7.57->0.7.68 void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,comedi_subdevice *s,sampl_t *dma,sampl_t *data,int n); //UPDATE-0.7.57->0.7.68 void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,comedi_subdevice *s,sampl_t *dma,sampl_t *data,int n);
void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device * dev, void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,
comedi_subdevice * s, sampl_t * dma_buffer, unsigned int num_samples); comedi_subdevice *s,
int i_APCI3120_InterruptHandleEos(comedi_device * dev); sampl_t *dma_buffer,
unsigned int num_samples);
int i_APCI3120_InterruptHandleEos(comedi_device *dev);
void v_APCI3120_InterruptDma(int irq, void *d); void v_APCI3120_InterruptDma(int irq, void *d);
// TIMER // TIMER
int i_APCI3120_InsnConfigTimer(comedi_device * dev, comedi_subdevice * s, int i_APCI3120_InsnConfigTimer(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI3120_InsnWriteTimer(comedi_device * dev, comedi_subdevice * s, int i_APCI3120_InsnWriteTimer(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI3120_InsnReadTimer(comedi_device * dev, comedi_subdevice * s, int i_APCI3120_InsnReadTimer(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//DI //DI
// for di read // for di read
int i_APCI3120_InsnBitsDigitalInput(comedi_device * dev, comedi_subdevice * s, int i_APCI3120_InsnBitsDigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI3120_InsnReadDigitalInput(comedi_device * dev, comedi_subdevice * s, int i_APCI3120_InsnReadDigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//DO //DO
//int i_APCI3120_WriteDigitalOutput(comedi_device *dev, BYTE data); //int i_APCI3120_WriteDigitalOutput(comedi_device *dev, BYTE data);
int i_APCI3120_InsnConfigDigitalOutput(comedi_device * dev, int i_APCI3120_InsnConfigDigitalOutput(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s, comedi_insn *insn,
int i_APCI3120_InsnBitsDigitalOutput(comedi_device * dev, comedi_subdevice * s, lsampl_t *data);
comedi_insn * insn, lsampl_t * data); int i_APCI3120_InsnBitsDigitalOutput(comedi_device *dev, comedi_subdevice *s,
int i_APCI3120_InsnWriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data);
comedi_insn * insn, lsampl_t * data); int i_APCI3120_InsnWriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
//AO //AO
//int i_APCI3120_Write1AnalogValue(comedi_device *dev,UINT ui_Range,UINT ui_Channel,UINT data ); //int i_APCI3120_Write1AnalogValue(comedi_device *dev,UINT ui_Range,UINT ui_Channel,UINT data );
int i_APCI3120_InsnWriteAnalogOutput(comedi_device * dev, comedi_subdevice * s, int i_APCI3120_InsnWriteAnalogOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//AI HArdware layer //AI HArdware layer
int i_APCI3120_InsnConfigAnalogInput(comedi_device * dev, comedi_subdevice * s, int i_APCI3120_InsnConfigAnalogInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI3120_InsnReadAnalogInput(comedi_device * dev, comedi_subdevice * s, int i_APCI3120_InsnReadAnalogInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
int i_APCI3120_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s, int i_APCI3120_CommandTestAnalogInput(comedi_device *dev, comedi_subdevice *s,
comedi_cmd * cmd); comedi_cmd *cmd);
int i_APCI3120_CommandAnalogInput(comedi_device * dev, comedi_subdevice * s); int i_APCI3120_CommandAnalogInput(comedi_device *dev, comedi_subdevice *s);
//int i_APCI3120_CancelAnalogInput(comedi_device * dev, comedi_subdevice * s); //int i_APCI3120_CancelAnalogInput(comedi_device *dev, comedi_subdevice *s);
int i_APCI3120_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s); int i_APCI3120_StopCyclicAcquisition(comedi_device *dev, comedi_subdevice *s);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
// Card Specific information // Card Specific information
#define APCI3200_BOARD_VENDOR_ID 0x15B8 #define APCI3200_BOARD_VENDOR_ID 0x15B8
...@@ -39,27 +32,27 @@ struct { ...@@ -39,27 +32,27 @@ struct {
INT i_Interrupt; INT i_Interrupt;
INT i_ModuleSelection; INT i_ModuleSelection;
} Config_Parameters_Module1, Config_Parameters_Module2, } Config_Parameters_Module1, Config_Parameters_Module2,
Config_Parameters_Module3, Config_Parameters_Module4; Config_Parameters_Module3, Config_Parameters_Module4;
//ANALOG INPUT RANGE //ANALOG INPUT RANGE
static const comedi_lrange range_apci3200_ai = { 8, { static const comedi_lrange range_apci3200_ai = { 8, {
BIP_RANGE(10), BIP_RANGE(10),
BIP_RANGE(5), BIP_RANGE(5),
BIP_RANGE(2), BIP_RANGE(2),
BIP_RANGE(1), BIP_RANGE(1),
UNI_RANGE(10), UNI_RANGE(10),
UNI_RANGE(5), UNI_RANGE(5),
UNI_RANGE(2), UNI_RANGE(2),
UNI_RANGE(1) UNI_RANGE(1)
} }
}; };
static const comedi_lrange range_apci3300_ai = { 4, { static const comedi_lrange range_apci3300_ai = { 4, {
UNI_RANGE(10), UNI_RANGE(10),
UNI_RANGE(5), UNI_RANGE(5),
UNI_RANGE(2), UNI_RANGE(2),
UNI_RANGE(1) UNI_RANGE(1)
} }
}; };
//Analog Input related Defines //Analog Input related Defines
...@@ -161,31 +154,34 @@ typedef struct { ...@@ -161,31 +154,34 @@ typedef struct {
//AI //AI
INT i_APCI3200_ConfigAnalogInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI3200_ConfigAnalogInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI3200_ReadAnalogInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI3200_ReadAnalogInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI3200_InsnWriteReleaseAnalogInput(comedi_device * dev, INT i_APCI3200_InsnWriteReleaseAnalogInput(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
INT i_APCI3200_InsnBits_AnalogInput_Test(comedi_device * dev, comedi_insn *insn, lsampl_t *data);
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); INT i_APCI3200_InsnBits_AnalogInput_Test(comedi_device *dev,
INT i_APCI3200_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s); comedi_subdevice *s,
INT i_APCI3200_InterruptHandleEos(comedi_device * dev); comedi_insn *insn, lsampl_t *data);
INT i_APCI3200_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI3200_StopCyclicAcquisition(comedi_device *dev, comedi_subdevice *s);
comedi_cmd * cmd); INT i_APCI3200_InterruptHandleEos(comedi_device *dev);
INT i_APCI3200_CommandAnalogInput(comedi_device * dev, comedi_subdevice * s); INT i_APCI3200_CommandTestAnalogInput(comedi_device *dev, comedi_subdevice *s,
INT i_APCI3200_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s, comedi_cmd *cmd);
comedi_insn * insn, lsampl_t * data); INT i_APCI3200_CommandAnalogInput(comedi_device *dev, comedi_subdevice *s);
INT i_APCI3200_ReadDigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
//Interrupt //Interrupt
void v_APCI3200_Interrupt(int irq, void *d); void v_APCI3200_Interrupt(int irq, void *d);
int i_APCI3200_InterruptHandleEos(comedi_device * dev); int i_APCI3200_InterruptHandleEos(comedi_device *dev);
//Reset functions //Reset functions
INT i_APCI3200_Reset(comedi_device * dev); INT i_APCI3200_Reset(comedi_device *dev);
int i_APCI3200_ReadCJCCalOffset(comedi_device * dev, lsampl_t * data); int i_APCI3200_ReadCJCCalOffset(comedi_device *dev, lsampl_t *data);
int i_APCI3200_ReadCJCValue(comedi_device * dev, lsampl_t * data); int i_APCI3200_ReadCJCValue(comedi_device *dev, lsampl_t *data);
int i_APCI3200_ReadCalibrationGainValue(comedi_device * dev, UINT * data); int i_APCI3200_ReadCalibrationGainValue(comedi_device *dev, UINT *data);
int i_APCI3200_ReadCalibrationOffsetValue(comedi_device * dev, UINT * data); int i_APCI3200_ReadCalibrationOffsetValue(comedi_device *dev, UINT *data);
int i_APCI3200_Read1AnalogInputChannel(comedi_device * dev, int i_APCI3200_Read1AnalogInputChannel(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s, comedi_insn *insn,
int i_APCI3200_ReadCJCCalGain(comedi_device * dev, lsampl_t * data); lsampl_t *data);
int i_APCI3200_ReadCJCCalGain(comedi_device *dev, lsampl_t *data);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
* ADDI-DATA GmbH
* Dieselstrasse 3
* D-77833 Ottersweier
* Tel: +19(0)7223/9493-0
* Fax: +49(0)7223/9493-92
* http://www.addi-data-com
* info@addi-data.com
*
* This 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.
*/
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
ADDI-DATA GmbH
Dieselstrasse 3
D-77833 Ottersweier
Tel: +19(0)7223/9493-0
Fax: +49(0)7223/9493-92
http://www.addi-data-com
info@addi-data.com
This 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.
This 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.
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
// Card Specific information // Card Specific information
#define APCI3501_BOARD_VENDOR_ID 0x15B8 #define APCI3501_BOARD_VENDOR_ID 0x15B8
#define APCI3501_ADDRESS_RANGE 255 #define APCI3501_ADDRESS_RANGE 255
...@@ -39,9 +33,9 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -39,9 +33,9 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
#define MODE1 1 #define MODE1 1
// ANALOG OUTPUT RANGE // ANALOG OUTPUT RANGE
comedi_lrange range_apci3501_ao = { 2, { comedi_lrange range_apci3501_ao = { 2, {
BIP_RANGE(10), BIP_RANGE(10),
UNI_RANGE(10) UNI_RANGE(10)
} }
}; };
//Watchdog Related Defines //Watchdog Related Defines
...@@ -61,36 +55,40 @@ comedi_lrange range_apci3501_ao = { 2, { ...@@ -61,36 +55,40 @@ comedi_lrange range_apci3501_ao = { 2, {
// Hardware Layer functions for Apci3501 // Hardware Layer functions for Apci3501
//AO //AO
INT i_APCI3501_ConfigAnalogOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI3501_ConfigAnalogOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI3501_WriteAnalogOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI3501_WriteAnalogOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//DI //DI
// for di read // for di read
//INT i_APCI3501_ReadDigitalInput(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); //INT i_APCI3501_ReadDigitalInput(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
INT i_APCI3501_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s, INT i_APCI3501_ReadDigitalInput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
//DO //DO
int i_APCI3501_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s, int i_APCI3501_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI3501_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI3501_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
INT i_APCI3501_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s, INT i_APCI3501_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
comedi_insn * insn, lsampl_t * data); comedi_insn *insn, lsampl_t *data);
// TIMER // TIMER
// timer value is passed as u seconds // timer value is passed as u seconds
INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device * dev, INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device *dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_subdevice *s,
int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device * dev, comedi_insn *insn, lsampl_t *data);
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device *dev,
int i_APCI3501_ReadTimerCounterWatchdog(comedi_device * dev, comedi_subdevice *s,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); comedi_insn *insn,
lsampl_t *data);
int i_APCI3501_ReadTimerCounterWatchdog(comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
//Interrupt //Interrupt
void v_APCI3501_Interrupt(int irq, void *d); void v_APCI3501_Interrupt(int irq, void *d);
//Reset functions //Reset functions
int i_APCI3501_Reset(comedi_device * dev); int i_APCI3501_Reset(comedi_device *dev);
/** /*
@verbatim * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module. * ADDI-DATA GmbH
* Dieselstrasse 3
ADDI-DATA GmbH * D-77833 Ottersweier
Dieselstrasse 3 * Tel: +19(0)7223/9493-0
D-77833 Ottersweier * Fax: +49(0)7223/9493-92
Tel: +19(0)7223/9493-0 * http://www.addi-data-com
Fax: +49(0)7223/9493-92 * info@addi-data.com
http://www.addi-data-com *
info@addi-data.com * This 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
This 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. * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
This 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. */
You 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
You shoud also find the complete GPL in the COPYING file accompanying this source code.
@endverbatim
*/
#ifndef COMEDI_SUBD_TTLIO #ifndef COMEDI_SUBD_TTLIO
#define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ #define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */
...@@ -40,30 +33,30 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -40,30 +33,30 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
#ifdef __KERNEL__ #ifdef __KERNEL__
static const comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10), static const comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10),
BIP_RANGE(5), BIP_RANGE(5),
BIP_RANGE(2), BIP_RANGE(2),
BIP_RANGE(1), BIP_RANGE(1),
UNI_RANGE(10), UNI_RANGE(10),
UNI_RANGE(5), UNI_RANGE(5),
UNI_RANGE(2), UNI_RANGE(2),
UNI_RANGE(1)} UNI_RANGE(1)}
}; };
static const comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1), static const comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1), BIP_RANGE(1),
BIP_RANGE(1)} BIP_RANGE(1)}
}; };
static const comedi_lrange range_apci3XXX_ao = { 2, {BIP_RANGE(10), static const comedi_lrange range_apci3XXX_ao = { 2, {BIP_RANGE(10),
UNI_RANGE(10)} UNI_RANGE(10)}
}; };
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment