Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337516
b: refs/heads/master
c: c0567ad
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 31, 2012
1 parent 4f20b99 commit 46f92ce
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 162 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fddc1ced98d12cf282280abec5dc698501214640
refs/heads/master: c0567adc9d2635c798b0bd474614e30a81a60cdd
130 changes: 123 additions & 7 deletions trunk/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,131 @@ You should also find the complete GPL in the COPYING file accompanying this sour
+----------+-----------+------------------------------------------------+
*/

/*
+----------------------------------------------------------------------------+
| Included files |
+----------------------------------------------------------------------------+
*/
#include "hwdrv_apci3200.h"

/* #define PRINT_INFO */

/* Card Specific information */
/* #define APCI3200_ADDRESS_RANGE 264 */

/* Analog Input related Defines */
#define APCI3200_AI_OFFSET_GAIN 0
#define APCI3200_AI_SC_TEST 4
#define APCI3200_AI_IRQ 8
#define APCI3200_AI_AUTOCAL 12
#define APCI3200_RELOAD_CONV_TIME_VAL 32
#define APCI3200_CONV_TIME_TIME_BASE 36
#define APCI3200_RELOAD_DELAY_TIME_VAL 40
#define APCI3200_DELAY_TIME_TIME_BASE 44
#define APCI3200_AI_MODULE1 0
#define APCI3200_AI_MODULE2 64
#define APCI3200_AI_MODULE3 128
#define APCI3200_AI_MODULE4 192
#define TRUE 1
#define FALSE 0
#define APCI3200_AI_EOSIRQ 16
#define APCI3200_AI_EOS 20
#define APCI3200_AI_CHAN_ID 24
#define APCI3200_AI_CHAN_VAL 28
#define ANALOG_INPUT 0
#define TEMPERATURE 1
#define RESISTANCE 2

#define ENABLE_EXT_TRIG 1
#define ENABLE_EXT_GATE 2
#define ENABLE_EXT_TRIG_GATE 3

#define APCI3200_MAXVOLT 2.5
#define ADDIDATA_GREATER_THAN_TEST 0
#define ADDIDATA_LESS_THAN_TEST 1

#define ADDIDATA_UNIPOLAR 1
#define ADDIDATA_BIPOLAR 2

#define MAX_MODULE 4

/* ANALOG INPUT RANGE */
static const struct comedi_lrange range_apci3200_ai = {
8, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
BIP_RANGE(1),
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2),
UNI_RANGE(1)
}
};

static const struct comedi_lrange range_apci3300_ai = {
4, {
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2),
UNI_RANGE(1)
}
};

int MODULE_NO;
struct {
int i_Gain;
int i_Polarity;
int i_OffsetRange;
int i_Coupling;
int i_SingleDiff;
int i_AutoCalibration;
unsigned int ui_ReloadValue;
unsigned int ui_TimeUnitReloadVal;
int i_Interrupt;
int i_ModuleSelection;
} Config_Parameters_Module1, Config_Parameters_Module2,
Config_Parameters_Module3, Config_Parameters_Module4;


struct str_ADDIDATA_RTDStruct {
unsigned int ul_NumberOfValue;
unsigned int *pul_ResistanceValue;
unsigned int *pul_TemperatureValue;
};

struct str_Module {
unsigned long ul_CurrentSourceCJC;
unsigned long ul_CurrentSource[5];
unsigned long ul_GainFactor[8]; /* Gain Factor */
unsigned int w_GainValue[10];
};

struct str_BoardInfos {

int i_CJCAvailable;
int i_CJCPolarity;
int i_CJCGain;
int i_InterruptFlag;
int i_ADDIDATAPolarity;
int i_ADDIDATAGain;
int i_AutoCalibration;
int i_ADDIDATAConversionTime;
int i_ADDIDATAConversionTimeUnit;
int i_ADDIDATAType;
int i_ChannelNo;
int i_ChannelCount;
int i_ScanType;
int i_FirstChannel;
int i_LastChannel;
int i_Sum;
int i_Offset;
unsigned int ui_Channel_num;
int i_Count;
int i_Initialised;
unsigned int ui_InterruptChannelValue[144]; /* Buffer */
unsigned char b_StructInitialized;
/* 7 is the maximal number of channels */
unsigned int ui_ScanValueArray[7 + 12];

int i_ConnectionType;
int i_NbrOfModule;
struct str_Module s_Module[MAX_MODULE];
};

/* BEGIN JK 06.07.04: Management of sevrals boards */
/*
int i_CJCAvailable=1;
Expand Down
154 changes: 0 additions & 154 deletions trunk/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h

This file was deleted.

0 comments on commit 46f92ce

Please sign in to comment.