Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
hwdrv_apci3200.c File Reference
#include "hwdrv_apci3200.h"

Go to the source code of this file.

Macros

#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 */
 

Functions

int i_AddiHeaderRW_ReadEeprom (int i_NbOfWordsToRead, unsigned int dw_PCIBoardEepromAddress, unsigned short w_EepromStartAddress, unsigned short *pw_DataRead)
 
void v_GetAPCI3200EepromCalibrationValue (unsigned int dw_PCIBoardEepromAddress, struct str_BoardInfos *BoardInformations)
 
int i_APCI3200_GetChannelCalibrationValue (struct comedi_device *dev, unsigned int ui_Channel_num, unsigned int *CJCCurrentSource, unsigned int *ChannelCurrentSource, unsigned int *ChannelGainFactor)
 
int i_APCI3200_ReadDigitalInput (struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
 
int i_APCI3200_ConfigDigitalOutput (struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
 
int i_APCI3200_WriteDigitalOutput (struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
 
int i_APCI3200_ReadDigitalOutput (struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
 
int i_APCI3200_ConfigAnalogInput (struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
 
int i_APCI3200_ReadAnalogInput (struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
 
int i_APCI3200_Read1AnalogInputChannel (struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
 
int i_APCI3200_ReadCalibrationOffsetValue (struct comedi_device *dev, unsigned int *data)
 
int i_APCI3200_ReadCalibrationGainValue (struct comedi_device *dev, unsigned int *data)
 
int i_APCI3200_ReadCJCValue (struct comedi_device *dev, unsigned int *data)
 
int i_APCI3200_ReadCJCCalOffset (struct comedi_device *dev, unsigned int *data)
 
int i_APCI3200_ReadCJCCalGain (struct comedi_device *dev, unsigned int *data)
 
int i_APCI3200_InsnBits_AnalogInput_Test (struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
 
int i_APCI3200_InsnWriteReleaseAnalogInput (struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
 
int i_APCI3200_CommandTestAnalogInput (struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_cmd *cmd)
 
int i_APCI3200_StopCyclicAcquisition (struct comedi_device *dev, struct comedi_subdevice *s)
 
int i_APCI3200_CommandAnalogInput (struct comedi_device *dev, struct comedi_subdevice *s)
 
int i_APCI3200_Reset (struct comedi_device *dev)
 
void v_APCI3200_Interrupt (int irq, void *d)
 
int i_APCI3200_InterruptHandleEos (struct comedi_device *dev)
 

Variables

int i_InterruptFlag =0
 
int i_ADDIDATAPolarity
 
int i_ADDIDATAGain
 
int i_AutoCalibration =0
 
int i_ADDIDATAConversionTime
 
int i_ADDIDATAConversionTimeUnit
 
int i_ADDIDATAType
 
int i_ChannelNo
 
int i_ChannelCount =0
 
int i_ScanType
 
int i_FirstChannel
 
int i_LastChannel
 
int i_Sum =0
 
int i_Offset
 
unsigned int ui_Channel_num =0
 
int i_Initialised =0
 
unsigned int ui_InterruptChannelValue [96]
 
*struct str_BoardInfos s_BoardInfos [100]
 

Macro Definition Documentation

#define AMCC_OP_REG_MCSR   0x3c

Definition at line 90 of file hwdrv_apci3200.c.

#define EEPROM_BUSY   0x80000000

Definition at line 91 of file hwdrv_apci3200.c.

#define NVCMD_BEGIN_READ   (0x7 << 5) /* nvRam begin read command */

Definition at line 94 of file hwdrv_apci3200.c.

#define NVCMD_BEGIN_WRITE   (0x6 << 5) /* EEPROM begin write command */

Definition at line 95 of file hwdrv_apci3200.c.

#define NVCMD_LOAD_HIGH   (0x5 << 5) /* nvRam load high command */

Definition at line 93 of file hwdrv_apci3200.c.

#define NVCMD_LOAD_LOW   (0x4 << 5) /* nvRam load low command */

Definition at line 92 of file hwdrv_apci3200.c.

Function Documentation

int i_AddiHeaderRW_ReadEeprom ( int  i_NbOfWordsToRead,
unsigned int  dw_PCIBoardEepromAddress,
unsigned short  w_EepromStartAddress,
unsigned short pw_DataRead 
)

Definition at line 115 of file hwdrv_apci3200.c.

int i_APCI3200_CommandAnalogInput ( struct comedi_device dev,
struct comedi_subdevice s 
)

Definition at line 2787 of file hwdrv_apci3200.c.

int i_APCI3200_CommandTestAnalogInput ( struct comedi_device dev,
struct comedi_subdevice s,
struct comedi_cmd cmd 
)

Definition at line 2558 of file hwdrv_apci3200.c.

int i_APCI3200_ConfigAnalogInput ( struct comedi_device dev,
struct comedi_subdevice s,
struct comedi_insn insn,
unsigned int data 
)

Definition at line 872 of file hwdrv_apci3200.c.

int i_APCI3200_ConfigDigitalOutput ( struct comedi_device dev,
struct comedi_subdevice s,
struct comedi_insn insn,
unsigned int data 
)

Definition at line 606 of file hwdrv_apci3200.c.

int i_APCI3200_GetChannelCalibrationValue ( struct comedi_device dev,
unsigned int  ui_Channel_num,
unsigned int CJCCurrentSource,
unsigned int ChannelCurrentSource,
unsigned int ChannelGainFactor 
)

Definition at line 451 of file hwdrv_apci3200.c.

int i_APCI3200_InsnBits_AnalogInput_Test ( struct comedi_device dev,
struct comedi_subdevice s,
struct comedi_insn insn,
unsigned int data 
)

Definition at line 2402 of file hwdrv_apci3200.c.

int i_APCI3200_InsnWriteReleaseAnalogInput ( struct comedi_device dev,
struct comedi_subdevice s,
struct comedi_insn insn,
unsigned int data 
)

Definition at line 2527 of file hwdrv_apci3200.c.

int i_APCI3200_InterruptHandleEos ( struct comedi_device dev)

Definition at line 3472 of file hwdrv_apci3200.c.

int i_APCI3200_Read1AnalogInputChannel ( struct comedi_device dev,
struct comedi_subdevice s,
struct comedi_insn insn,
unsigned int data 
)

Definition at line 1649 of file hwdrv_apci3200.c.

int i_APCI3200_ReadAnalogInput ( struct comedi_device dev,
struct comedi_subdevice s,
struct comedi_insn insn,
unsigned int data 
)

Definition at line 1359 of file hwdrv_apci3200.c.

int i_APCI3200_ReadCalibrationGainValue ( struct comedi_device dev,
unsigned int data 
)

Definition at line 1910 of file hwdrv_apci3200.c.

int i_APCI3200_ReadCalibrationOffsetValue ( struct comedi_device dev,
unsigned int data 
)

Definition at line 1774 of file hwdrv_apci3200.c.

int i_APCI3200_ReadCJCCalGain ( struct comedi_device dev,
unsigned int data 
)

Definition at line 2281 of file hwdrv_apci3200.c.

int i_APCI3200_ReadCJCCalOffset ( struct comedi_device dev,
unsigned int data 
)

Definition at line 2165 of file hwdrv_apci3200.c.

int i_APCI3200_ReadCJCValue ( struct comedi_device dev,
unsigned int data 
)

Definition at line 2046 of file hwdrv_apci3200.c.

int i_APCI3200_ReadDigitalInput ( struct comedi_device dev,
struct comedi_subdevice s,
struct comedi_insn insn,
unsigned int data 
)

Definition at line 548 of file hwdrv_apci3200.c.

int i_APCI3200_ReadDigitalOutput ( struct comedi_device dev,
struct comedi_subdevice s,
struct comedi_insn insn,
unsigned int data 
)

Definition at line 764 of file hwdrv_apci3200.c.

int i_APCI3200_Reset ( struct comedi_device dev)

Definition at line 2974 of file hwdrv_apci3200.c.

int i_APCI3200_StopCyclicAcquisition ( struct comedi_device dev,
struct comedi_subdevice s 
)

Definition at line 2737 of file hwdrv_apci3200.c.

int i_APCI3200_WriteDigitalOutput ( struct comedi_device dev,
struct comedi_subdevice s,
struct comedi_insn insn,
unsigned int data 
)

Definition at line 651 of file hwdrv_apci3200.c.

void v_APCI3200_Interrupt ( int  irq,
void d 
)

Definition at line 3030 of file hwdrv_apci3200.c.

void v_GetAPCI3200EepromCalibrationValue ( unsigned int  dw_PCIBoardEepromAddress,
struct str_BoardInfos BoardInformations 
)

Get the Analog input header address

Compute the real analog input address

Get the number of moduls

Compute the component address

Read first header size

Read number of inputs

Read the CJC flag

Read number of gain value

Compute single header address

Read current sources value for input 1

Read gain factor for the module

Read gain value for the module

Read gain factor for the module

Read current source value for each channels of the module

Read current sources value for input 1

Save the current sources value

Read the CJC current source value

Save the current sources value

Definition at line 256 of file hwdrv_apci3200.c.

Variable Documentation

int i_ADDIDATAConversionTime

Definition at line 72 of file hwdrv_apci3200.c.

int i_ADDIDATAConversionTimeUnit

Definition at line 73 of file hwdrv_apci3200.c.

int i_ADDIDATAGain

Definition at line 70 of file hwdrv_apci3200.c.

int i_ADDIDATAPolarity

Definition at line 69 of file hwdrv_apci3200.c.

int i_ADDIDATAType

Definition at line 74 of file hwdrv_apci3200.c.

int i_AutoCalibration =0

Definition at line 71 of file hwdrv_apci3200.c.

int i_ChannelCount =0

Definition at line 76 of file hwdrv_apci3200.c.

int i_ChannelNo

Definition at line 75 of file hwdrv_apci3200.c.

int i_FirstChannel

Definition at line 78 of file hwdrv_apci3200.c.

int i_Initialised =0

Definition at line 84 of file hwdrv_apci3200.c.

int i_InterruptFlag =0
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
    [email protected]

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 should also find the complete GPL in the COPYING file accompanying this source code.

Definition at line 68 of file hwdrv_apci3200.c.

int i_LastChannel

Definition at line 79 of file hwdrv_apci3200.c.

int i_Offset

Definition at line 81 of file hwdrv_apci3200.c.

int i_ScanType

Definition at line 77 of file hwdrv_apci3200.c.

int i_Sum =0

Definition at line 80 of file hwdrv_apci3200.c.

* struct str_BoardInfos s_BoardInfos[100]

Definition at line 87 of file hwdrv_apci3200.c.

unsigned int ui_Channel_num =0

Definition at line 82 of file hwdrv_apci3200.c.

unsigned int ui_InterruptChannelValue[96]

Definition at line 85 of file hwdrv_apci3200.c.