|
@@ -78,8 +78,10 @@ struct comedi_insn *insn,unsigned int *data)
|
|
|
int i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev, struct comedi_subdevice *s,
|
|
|
struct comedi_insn *insn, unsigned int *data)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
unsigned int ui_ConfigType;
|
|
|
int i_ReturnValue = 0;
|
|
|
+
|
|
|
ui_ConfigType = CR_CHAN(insn->chanspec);
|
|
|
|
|
|
printk("\nINC_CPT");
|
|
@@ -306,6 +308,7 @@ int i_APCI1710_InitCounter(struct comedi_device *dev,
|
|
|
unsigned char b_FirstCounterOption,
|
|
|
unsigned char b_SecondCounterModus, unsigned char b_SecondCounterOption)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/*******************************/
|
|
@@ -547,6 +550,7 @@ int i_APCI1710_InitCounter(struct comedi_device *dev,
|
|
|
|
|
|
int i_APCI1710_CounterAutoTest(struct comedi_device *dev, unsigned char *pb_TestStatus)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
unsigned char b_ModulCpt = 0;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_LathchValue;
|
|
@@ -713,6 +717,7 @@ int i_APCI1710_InitIndex(struct comedi_device *dev,
|
|
|
unsigned char b_ReferenceAction,
|
|
|
unsigned char b_IndexOperation, unsigned char b_AutoMode, unsigned char b_InterruptEnable)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -1155,6 +1160,7 @@ int i_APCI1710_InitIndex(struct comedi_device *dev,
|
|
|
int i_APCI1710_InitReference(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char b_ReferenceLevel)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -1280,6 +1286,7 @@ int i_APCI1710_InitReference(struct comedi_device *dev,
|
|
|
int i_APCI1710_InitExternalStrobe(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char b_ExternalStrobe, unsigned char b_ExternalStrobeLevel)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -1394,6 +1401,7 @@ int i_APCI1710_InitExternalStrobe(struct comedi_device *dev,
|
|
|
int i_APCI1710_InitCompareLogic(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned int ui_CompareValue)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -1493,6 +1501,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device *dev,
|
|
|
unsigned char b_TimingUnity,
|
|
|
unsigned int ul_TimingInterval, unsigned int *pul_RealTimingInterval)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int ul_TimerValue = 0;
|
|
|
double d_RealTimingInterval;
|
|
@@ -2018,8 +2027,10 @@ struct comedi_insn *insn,unsigned int *data) |
|
|
|
int i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev, struct comedi_subdevice *s,
|
|
|
struct comedi_insn *insn, unsigned int *data)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
unsigned int ui_BitsType;
|
|
|
int i_ReturnValue = 0;
|
|
|
+
|
|
|
ui_BitsType = CR_CHAN(insn->chanspec);
|
|
|
devpriv->tsk_Current = current; /* Save the current process task structure */
|
|
|
|
|
@@ -2093,6 +2104,7 @@ int i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev, struct comedi_subdevice
|
|
|
|
|
|
int i_APCI1710_ClearCounterValue(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -2153,6 +2165,7 @@ int i_APCI1710_ClearCounterValue(struct comedi_device *dev, unsigned char b_Modu
|
|
|
|
|
|
int i_APCI1710_ClearAllCounterValue(struct comedi_device *dev)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
unsigned char b_ModulCpt = 0;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
@@ -2300,6 +2313,7 @@ int i_APCI1710_ClearAllCounterValue(struct comedi_device *dev)
|
|
|
int i_APCI1710_SetInputFilter(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char b_PCIInputClock, unsigned char b_Filter)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_Status = 0;
|
|
|
|
|
@@ -2564,6 +2578,7 @@ int i_APCI1710_SetInputFilter(struct comedi_device *dev,
|
|
|
int i_APCI1710_LatchCounter(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char b_LatchReg)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -2661,6 +2676,7 @@ int i_APCI1710_LatchCounter(struct comedi_device *dev,
|
|
|
int i_APCI1710_SetIndexAndReferenceSource(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char b_SourceSelection)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -2797,6 +2813,7 @@ int i_APCI1710_SetIndexAndReferenceSource(struct comedi_device *dev,
|
|
|
|
|
|
int i_APCI1710_SetDigitalChlOn(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -2877,6 +2894,7 @@ int i_APCI1710_SetDigitalChlOn(struct comedi_device *dev, unsigned char b_ModulN
|
|
|
|
|
|
int i_APCI1710_SetDigitalChlOff(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -2954,6 +2972,7 @@ struct comedi_insn *insn,unsigned int *data) |
|
|
|
int i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev, struct comedi_subdevice *s,
|
|
|
struct comedi_insn *insn, unsigned int *data)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
unsigned int ui_WriteType;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
@@ -3049,6 +3068,7 @@ int i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev, struct comedi_subdevic
|
|
|
|
|
|
int i_APCI1710_EnableLatchInterrupt(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -3135,6 +3155,7 @@ int i_APCI1710_EnableLatchInterrupt(struct comedi_device *dev, unsigned char b_M
|
|
|
|
|
|
int i_APCI1710_DisableLatchInterrupt(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -3234,6 +3255,7 @@ int i_APCI1710_DisableLatchInterrupt(struct comedi_device *dev, unsigned char b_
|
|
|
int i_APCI1710_Write16BitCounterValue(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char b_SelectedCounter, unsigned int ui_WriteValue)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -3319,6 +3341,7 @@ int i_APCI1710_Write16BitCounterValue(struct comedi_device *dev,
|
|
|
int i_APCI1710_Write32BitCounterValue(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned int ul_WriteValue)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -3385,6 +3408,7 @@ int i_APCI1710_Write32BitCounterValue(struct comedi_device *dev,
|
|
|
|
|
|
int i_APCI1710_EnableIndex(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int ul_InterruptLatchReg;
|
|
|
|
|
@@ -3483,6 +3507,7 @@ int i_APCI1710_EnableIndex(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
|
|
|
int i_APCI1710_DisableIndex(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -3582,6 +3607,7 @@ int i_APCI1710_DisableIndex(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
|
|
|
int i_APCI1710_EnableCompareLogic(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -3682,6 +3708,7 @@ int i_APCI1710_EnableCompareLogic(struct comedi_device *dev, unsigned char b_Mod
|
|
|
|
|
|
int i_APCI1710_DisableCompareLogic(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -3792,6 +3819,7 @@ int i_APCI1710_DisableCompareLogic(struct comedi_device *dev, unsigned char b_Mo
|
|
|
int i_APCI1710_EnableFrequencyMeasurement(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char b_InterruptEnable)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -3938,6 +3966,7 @@ int i_APCI1710_EnableFrequencyMeasurement(struct comedi_device *dev,
|
|
|
|
|
|
int i_APCI1710_DisableFrequencyMeasurement(struct comedi_device *dev, unsigned char b_ModulNbr)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -4052,6 +4081,7 @@ struct comedi_insn *insn,unsigned int *data) |
|
|
|
int i_APCI1710_InsnReadINCCPT(struct comedi_device *dev, struct comedi_subdevice *s,
|
|
|
struct comedi_insn *insn, unsigned int *data)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
unsigned int ui_ReadType;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
@@ -4196,6 +4226,7 @@ int i_APCI1710_InsnReadINCCPT(struct comedi_device *dev, struct comedi_subdevice
|
|
|
int i_APCI1710_ReadLatchRegisterStatus(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char b_LatchReg, unsigned char *pb_LatchStatus)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_LatchReg;
|
|
|
|
|
@@ -4283,6 +4314,7 @@ int i_APCI1710_ReadLatchRegisterStatus(struct comedi_device *dev,
|
|
|
int i_APCI1710_ReadLatchRegisterValue(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char b_LatchReg, unsigned int *pul_LatchValue)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -4367,6 +4399,7 @@ int i_APCI1710_ReadLatchRegisterValue(struct comedi_device *dev,
|
|
|
int i_APCI1710_Read16BitCounterValue(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char b_SelectedCounter, unsigned int *pui_CounterValue)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_LathchValue = 0;
|
|
|
|
|
@@ -4462,6 +4495,7 @@ int i_APCI1710_Read16BitCounterValue(struct comedi_device *dev,
|
|
|
int i_APCI1710_Read32BitCounterValue(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned int *pul_CounterValue)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
|
|
|
/**************************/
|
|
@@ -4538,6 +4572,7 @@ int i_APCI1710_Read32BitCounterValue(struct comedi_device *dev,
|
|
|
int i_APCI1710_GetIndexStatus(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char *pb_IndexStatus)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_StatusReg = 0;
|
|
|
|
|
@@ -4622,6 +4657,7 @@ int i_APCI1710_GetIndexStatus(struct comedi_device *dev,
|
|
|
int i_APCI1710_GetReferenceStatus(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char *pb_ReferenceStatus)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_StatusReg = 0;
|
|
|
|
|
@@ -4706,6 +4742,7 @@ int i_APCI1710_GetReferenceStatus(struct comedi_device *dev,
|
|
|
int i_APCI1710_GetUASStatus(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char *pb_UASStatus)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_StatusReg = 0;
|
|
|
|
|
@@ -4774,6 +4811,7 @@ int i_APCI1710_GetUASStatus(struct comedi_device *dev,
|
|
|
int i_APCI1710_GetCBStatus(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char *pb_CBStatus)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_StatusReg = 0;
|
|
|
|
|
@@ -4856,6 +4894,7 @@ int i_APCI1710_GetCBStatus(struct comedi_device *dev,
|
|
|
int i_APCI1710_Get16BitCBStatus(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char *pb_CBStatusCounter0, unsigned char *pb_CBStatusCounter1)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_StatusReg = 0;
|
|
|
|
|
@@ -4969,6 +5008,7 @@ int i_APCI1710_Get16BitCBStatus(struct comedi_device *dev,
|
|
|
int i_APCI1710_GetUDStatus(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char *pb_UDStatus)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_StatusReg = 0;
|
|
|
|
|
@@ -5043,6 +5083,7 @@ int i_APCI1710_GetUDStatus(struct comedi_device *dev,
|
|
|
int i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr, unsigned char *pb_UDStatus)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int dw_StatusReg = 0;
|
|
|
|
|
@@ -5149,6 +5190,7 @@ int i_APCI1710_ReadFrequencyMeasurement(struct comedi_device *dev,
|
|
|
unsigned char b_ModulNbr,
|
|
|
unsigned char *pb_Status, unsigned char *pb_UDStatus, unsigned int *pul_ReadValue)
|
|
|
{
|
|
|
+ struct addi_private *devpriv = dev->private;
|
|
|
int i_ReturnValue = 0;
|
|
|
unsigned int ui_16BitValue;
|
|
|
unsigned int dw_StatusReg;
|