Commit 82a6e2e7 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: comedi: Remove ULONG and *PULONG typedefs in addi-data

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2b6257c5
...@@ -198,7 +198,7 @@ int i_InsnConfig_InitTimer(struct comedi_device *dev,struct comedi_subdevice *s, ...@@ -198,7 +198,7 @@ int i_InsnConfig_InitTimer(struct comedi_device *dev,struct comedi_subdevice *s,
|b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec); |b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_TimerNbr = (unsigned char) CR_CHAN(insn->chanspec); b_TimerNbr = (unsigned char) CR_CHAN(insn->chanspec);
b_TimerMode = (unsigned char) data[0]; b_TimerMode = (unsigned char) data[0];
ul_ReloadValue = (ULONG) data[1]; ul_ReloadValue = (unsigned int) data[1];
b_InputClockSelection =(unsigned char) data[2]; b_InputClockSelection =(unsigned char) data[2];
b_InputClockLevel =(unsigned char) data[3]; b_InputClockLevel =(unsigned char) data[3];
b_OutputLevel =(unsigned char) data[4]; b_OutputLevel =(unsigned char) data[4];
...@@ -227,7 +227,7 @@ int i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, struct comedi_sub ...@@ -227,7 +227,7 @@ int i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, struct comedi_sub
unsigned char b_ModulNbr; unsigned char b_ModulNbr;
unsigned char b_TimerNbr; unsigned char b_TimerNbr;
unsigned char b_TimerMode; unsigned char b_TimerMode;
ULONG ul_ReloadValue; unsigned int ul_ReloadValue;
unsigned char b_InputClockSelection; unsigned char b_InputClockSelection;
unsigned char b_InputClockLevel; unsigned char b_InputClockLevel;
unsigned char b_OutputLevel; unsigned char b_OutputLevel;
...@@ -241,7 +241,7 @@ int i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, struct comedi_sub ...@@ -241,7 +241,7 @@ int i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, struct comedi_sub
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec); b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_TimerNbr = (unsigned char) CR_CHAN(insn->chanspec); b_TimerNbr = (unsigned char) CR_CHAN(insn->chanspec);
b_TimerMode = (unsigned char) data[0]; b_TimerMode = (unsigned char) data[0];
ul_ReloadValue = (ULONG) data[1]; ul_ReloadValue = (unsigned int) data[1];
b_InputClockSelection = (unsigned char) data[2]; b_InputClockSelection = (unsigned char) data[2];
b_InputClockLevel = (unsigned char) data[3]; b_InputClockLevel = (unsigned char) data[3];
b_OutputLevel = (unsigned char) data[4]; b_OutputLevel = (unsigned char) data[4];
...@@ -595,11 +595,11 @@ int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_su ...@@ -595,11 +595,11 @@ int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_su
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
unsigned char b_ModulNbr, b_ReadType; unsigned char b_ModulNbr, b_ReadType;
PULONG pul_TimerValueArray; unsigned int * pul_TimerValueArray;
b_ModulNbr = CR_AREF(insn->chanspec); b_ModulNbr = CR_AREF(insn->chanspec);
b_ReadType = CR_CHAN(insn->chanspec); b_ReadType = CR_CHAN(insn->chanspec);
pul_TimerValueArray = (PULONG) data; pul_TimerValueArray = (unsigned int *) data;
i_ReturnValue = insn->n; i_ReturnValue = insn->n;
switch (b_ReadType) { switch (b_ReadType) {
...@@ -695,7 +695,7 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice ...@@ -695,7 +695,7 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice
i_ReturnValue = i_APCI1710_ReadTimerValue(dev, i_ReturnValue = i_APCI1710_ReadTimerValue(dev,
(unsigned char)CR_AREF(insn->chanspec), (unsigned char)CR_AREF(insn->chanspec),
(unsigned char)CR_CHAN(insn->chanspec), (unsigned char)CR_CHAN(insn->chanspec),
(PULONG) & data[0]); (unsigned int *) & data[0]);
break; break;
case APCI1710_TIMER_GETOUTPUTLEVEL: case APCI1710_TIMER_GETOUTPUTLEVEL:
...@@ -716,7 +716,7 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice ...@@ -716,7 +716,7 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice
i_ReturnValue = i_APCI1710_WriteTimerValue(dev, i_ReturnValue = i_APCI1710_WriteTimerValue(dev,
(unsigned char)CR_AREF(insn->chanspec), (unsigned char)CR_AREF(insn->chanspec),
(unsigned char)CR_CHAN(insn->chanspec), (unsigned char)CR_CHAN(insn->chanspec),
(ULONG)data[1]); (unsigned int)data[1]);
break; break;
...@@ -762,7 +762,7 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice ...@@ -762,7 +762,7 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice
int i_APCI1710_ReadTimerValue(struct comedi_device * dev, int i_APCI1710_ReadTimerValue(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_TimerNbr, unsigned char b_ModulNbr, unsigned char b_TimerNbr,
PULONG pul_TimerValue) unsigned int * pul_TimerValue)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
...@@ -1008,7 +1008,7 @@ int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev, ...@@ -1008,7 +1008,7 @@ int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
int i_APCI1710_WriteTimerValue(struct comedi_device * dev, int i_APCI1710_WriteTimerValue(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_TimerNbr, unsigned char b_ModulNbr, unsigned char b_TimerNbr,
ULONG ul_WriteValue) unsigned int ul_WriteValue)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
......
...@@ -55,7 +55,7 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice ...@@ -55,7 +55,7 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice
*/ */
int i_APCI1710_ReadTimerValue(struct comedi_device *dev, int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_TimerNbr, unsigned char b_ModulNbr, unsigned char b_TimerNbr,
PULONG pul_TimerValue); unsigned int * pul_TimerValue);
int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev, int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_TimerNbr, unsigned char b_ModulNbr, unsigned char b_TimerNbr,
...@@ -70,4 +70,4 @@ int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev, ...@@ -70,4 +70,4 @@ int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
*/ */
int i_APCI1710_WriteTimerValue(struct comedi_device *dev, int i_APCI1710_WriteTimerValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_TimerNbr, unsigned char b_ModulNbr, unsigned char b_TimerNbr,
ULONG ul_WriteValue); unsigned int ul_WriteValue);
...@@ -135,9 +135,9 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -135,9 +135,9 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
struct comedi_insn * insn, unsigned int * data) struct comedi_insn * insn, unsigned int * data)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
ULONG ul_TimerValue = 0; unsigned int ul_TimerValue = 0;
ULONG ul_TimingInterval = 0; unsigned int ul_TimingInterval = 0;
ULONG ul_RealTimingInterval = 0; unsigned int ul_RealTimingInterval = 0;
double d_RealTimingInterval = 0; double d_RealTimingInterval = 0;
DWORD dw_ModeArray[8] = DWORD dw_ModeArray[8] =
{ 0x01, 0x05, 0x00, 0x04, 0x02, 0x0E, 0x0A, 0x06 }; { 0x01, 0x05, 0x00, 0x04, 0x02, 0x0E, 0x0A, 0x06 };
...@@ -147,7 +147,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -147,7 +147,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
b_ChronoMode = (unsigned char) data[0]; b_ChronoMode = (unsigned char) data[0];
b_PCIInputClock = (unsigned char) data[1]; b_PCIInputClock = (unsigned char) data[1];
b_TimingUnit = (unsigned char) data[2]; b_TimingUnit = (unsigned char) data[2];
ul_TimingInterval = (ULONG) data[3]; ul_TimingInterval = (unsigned int) data[3];
i_ReturnValue = insn->n; i_ReturnValue = insn->n;
/**************************/ /**************************/
...@@ -214,7 +214,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -214,7 +214,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
(ul_TimingInterval (ul_TimingInterval
* *
(0.001 * b_PCIInputClock)); (0.001 * b_PCIInputClock));
...@@ -237,7 +237,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -237,7 +237,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
ul_RealTimingInterval ul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(0.001 * (double)b_PCIInputClock)); (0.001 * (double)b_PCIInputClock));
...@@ -272,7 +272,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -272,7 +272,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
if (b_PCIInputClock != APCI1710_40MHZ) { if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_TimerValue) (ul_TimerValue)
...@@ -294,7 +294,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -294,7 +294,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
(ul_TimingInterval (ul_TimingInterval
* *
(1.0 * b_PCIInputClock)); (1.0 * b_PCIInputClock));
...@@ -317,7 +317,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -317,7 +317,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
ul_RealTimingInterval ul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(1.0 * (double)b_PCIInputClock)); (1.0 * (double)b_PCIInputClock));
...@@ -354,7 +354,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -354,7 +354,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
if (b_PCIInputClock != APCI1710_40MHZ) { if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_TimerValue) (ul_TimerValue)
...@@ -400,7 +400,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -400,7 +400,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
ul_RealTimingInterval ul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(1000.0 * (double)b_PCIInputClock)); (1000.0 * (double)b_PCIInputClock));
...@@ -435,7 +435,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -435,7 +435,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
if (b_PCIInputClock != APCI1710_40MHZ) { if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_TimerValue) (ul_TimerValue)
...@@ -457,7 +457,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -457,7 +457,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
(ul_TimingInterval (ul_TimingInterval
* *
(1000000.0 (1000000.0
...@@ -482,7 +482,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -482,7 +482,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
ul_RealTimingInterval ul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(1000000.0 (1000000.0
...@@ -520,7 +520,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -520,7 +520,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
if (b_PCIInputClock != APCI1710_40MHZ) { if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_TimerValue) (ul_TimerValue)
...@@ -542,7 +542,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -542,7 +542,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(ul_TimingInterval (ul_TimingInterval
* *
...@@ -570,7 +570,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -570,7 +570,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
ul_RealTimingInterval ul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(1000000.0 (1000000.0
...@@ -608,7 +608,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su ...@@ -608,7 +608,7 @@ int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
if (b_PCIInputClock != APCI1710_40MHZ) { if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_TimerValue) (ul_TimerValue)
...@@ -1108,14 +1108,14 @@ int i_APCI1710_InsnReadChrono(struct comedi_device * dev, struct comedi_subdevic ...@@ -1108,14 +1108,14 @@ int i_APCI1710_InsnReadChrono(struct comedi_device * dev, struct comedi_subdevic
i_ReturnValue = i_APCI1710_ReadChronoValue(dev, i_ReturnValue = i_APCI1710_ReadChronoValue(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char) CR_AREF(insn->chanspec),
(unsigned int) insn->unused[0], (unsigned int) insn->unused[0],
(unsigned char *) & data[0], (PULONG) & data[1]); (unsigned char *) & data[0], (unsigned int *) & data[1]);
break; break;
case APCI1710_CHRONO_CONVERTVALUE: case APCI1710_CHRONO_CONVERTVALUE:
i_ReturnValue = i_APCI1710_ConvertChronoValue(dev, i_ReturnValue = i_APCI1710_ConvertChronoValue(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char) CR_AREF(insn->chanspec),
(ULONG) insn->unused[0], (unsigned int) insn->unused[0],
(PULONG) & data[0], (unsigned int *) & data[0],
(unsigned char *) & data[1], (unsigned char *) & data[1],
(unsigned char *) & data[2], (unsigned char *) & data[2],
(unsigned int *) & data[3], (unsigned int *) & data[3],
...@@ -1341,7 +1341,7 @@ int i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev, ...@@ -1341,7 +1341,7 @@ int i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev,
| timing witch the | | timing witch the |
| function | | function |
| "i_APCI1710_InitChrono" | | "i_APCI1710_InitChrono" |
| PULONG pul_ChronoValue : Chronometer timing value. | | unsigned int * pul_ChronoValue : Chronometer timing value. |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| Return Value : 0: No error | | Return Value : 0: No error |
| -1: The handle parameter of the board is wrong | | -1: The handle parameter of the board is wrong |
...@@ -1357,7 +1357,7 @@ int i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev, ...@@ -1357,7 +1357,7 @@ int i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev,
int i_APCI1710_ReadChronoValue(struct comedi_device * dev, int i_APCI1710_ReadChronoValue(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
unsigned int ui_TimeOut, unsigned char * pb_ChronoStatus, PULONG pul_ChronoValue) unsigned int ui_TimeOut, unsigned char * pb_ChronoStatus, unsigned int * pul_ChronoValue)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
DWORD dw_Status; DWORD dw_Status;
...@@ -1621,8 +1621,8 @@ int i_APCI1710_ReadChronoValue(struct comedi_device * dev, ...@@ -1621,8 +1621,8 @@ int i_APCI1710_ReadChronoValue(struct comedi_device * dev,
int i_APCI1710_ConvertChronoValue(struct comedi_device * dev, int i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
ULONG ul_ChronoValue, unsigned int ul_ChronoValue,
PULONG pul_Hour, unsigned int * pul_Hour,
unsigned char * pb_Minute, unsigned char * pb_Minute,
unsigned char * pb_Second, unsigned char * pb_Second,
unsigned int * pui_MilliSecond, unsigned int * pui_MicroSecond, unsigned int * pui_NanoSecond) unsigned int * pui_MilliSecond, unsigned int * pui_MicroSecond, unsigned int * pui_NanoSecond)
...@@ -1681,7 +1681,7 @@ int i_APCI1710_ConvertChronoValue(struct comedi_device * dev, ...@@ -1681,7 +1681,7 @@ int i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
/**********************/ /**********************/
d_Hour = d_Hour / (double)60.0; d_Hour = d_Hour / (double)60.0;
*pul_Hour = (ULONG) d_Hour; *pul_Hour = (unsigned int) d_Hour;
/************************/ /************************/
/* Calculate the minute */ /* Calculate the minute */
......
...@@ -55,12 +55,12 @@ int i_APCI1710_GetChronoProgressStatus(struct comedi_device *dev, ...@@ -55,12 +55,12 @@ int i_APCI1710_GetChronoProgressStatus(struct comedi_device *dev,
int i_APCI1710_ReadChronoValue(struct comedi_device *dev, int i_APCI1710_ReadChronoValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
unsigned int ui_TimeOut, unsigned char * pb_ChronoStatus, unsigned int ui_TimeOut, unsigned char * pb_ChronoStatus,
PULONG pul_ChronoValue); unsigned int * pul_ChronoValue);
int i_APCI1710_ConvertChronoValue(struct comedi_device *dev, int i_APCI1710_ConvertChronoValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
ULONG ul_ChronoValue, unsigned int ul_ChronoValue,
PULONG pul_Hour, unsigned int * pul_Hour,
unsigned char * pb_Minute, unsigned char * pb_Minute,
unsigned char * pb_Second, unsigned char * pb_Second,
unsigned int * pui_MilliSecond, unsigned int * pui_MicroSecond, unsigned int * pui_MilliSecond, unsigned int * pui_MicroSecond,
......
...@@ -126,7 +126,7 @@ int i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdev ...@@ -126,7 +126,7 @@ int i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdev
i_ReturnValue = i_APCI1710_InitFrequencyMeasurement(dev, i_ReturnValue = i_APCI1710_InitFrequencyMeasurement(dev,
CR_AREF(insn->chanspec), CR_AREF(insn->chanspec),
(unsigned char) data[0], (unsigned char) data[0],
(unsigned char) data[1], (ULONG) data[2], (PULONG) & data[0]); (unsigned char) data[1], (unsigned int) data[2], (unsigned int *) & data[0]);
break; break;
default: default:
...@@ -1491,10 +1491,10 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev, ...@@ -1491,10 +1491,10 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
unsigned char b_PCIInputClock, unsigned char b_PCIInputClock,
unsigned char b_TimingUnity, unsigned char b_TimingUnity,
ULONG ul_TimingInterval, PULONG pul_RealTimingInterval) unsigned int ul_TimingInterval, unsigned int * pul_RealTimingInterval)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
ULONG ul_TimerValue = 0; unsigned int ul_TimerValue = 0;
double d_RealTimingInterval; double d_RealTimingInterval;
DWORD dw_Status = 0; DWORD dw_Status = 0;
...@@ -1720,7 +1720,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev, ...@@ -1720,7 +1720,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev,
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
(ul_TimingInterval (ul_TimingInterval
* *
(0.00025 * b_PCIInputClock)); (0.00025 * b_PCIInputClock));
...@@ -1743,7 +1743,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev, ...@@ -1743,7 +1743,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev,
*pul_RealTimingInterval *pul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(0.00025 * (double)b_PCIInputClock)); (0.00025 * (double)b_PCIInputClock));
...@@ -1790,7 +1790,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev, ...@@ -1790,7 +1790,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev,
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
(ul_TimingInterval (ul_TimingInterval
* *
(0.25 * b_PCIInputClock)); (0.25 * b_PCIInputClock));
...@@ -1813,7 +1813,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev, ...@@ -1813,7 +1813,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev,
*pul_RealTimingInterval *pul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(0.25 * (double)b_PCIInputClock)); (0.25 * (double)b_PCIInputClock));
...@@ -1886,7 +1886,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev, ...@@ -1886,7 +1886,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev,
*pul_RealTimingInterval *pul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(250.0 * (double)b_PCIInputClock)); (250.0 * (double)b_PCIInputClock));
...@@ -2979,7 +2979,7 @@ int i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, struct comedi_subdevi ...@@ -2979,7 +2979,7 @@ int i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, struct comedi_subdevi
case APCI1710_INCCPT_WRITE32BITCOUNTERVALUE: case APCI1710_INCCPT_WRITE32BITCOUNTERVALUE:
i_ReturnValue = i_APCI1710_Write32BitCounterValue(dev, i_ReturnValue = i_APCI1710_Write32BitCounterValue(dev,
(unsigned char) CR_AREF(insn->chanspec), (ULONG) data[0]); (unsigned char) CR_AREF(insn->chanspec), (unsigned int) data[0]);
break; break;
...@@ -3257,7 +3257,7 @@ int i_APCI1710_Write16BitCounterValue(struct comedi_device * dev, ...@@ -3257,7 +3257,7 @@ int i_APCI1710_Write16BitCounterValue(struct comedi_device * dev,
/* Write the value */ /* Write the value */
/*******************/ /*******************/
outl((ULONG) ((ULONG) (ui_WriteValue) << (16 * outl((unsigned int) ((unsigned int) (ui_WriteValue) << (16 *
b_SelectedCounter)), b_SelectedCounter)),
devpriv->s_BoardInfos.ui_Address + 8 + devpriv->s_BoardInfos.ui_Address + 8 +
(b_SelectedCounter * 4) + (b_SelectedCounter * 4) +
...@@ -3317,7 +3317,7 @@ int i_APCI1710_Write16BitCounterValue(struct comedi_device * dev, ...@@ -3317,7 +3317,7 @@ int i_APCI1710_Write16BitCounterValue(struct comedi_device * dev,
*/ */
int i_APCI1710_Write32BitCounterValue(struct comedi_device * dev, int i_APCI1710_Write32BitCounterValue(struct comedi_device * dev,
unsigned char b_ModulNbr, ULONG ul_WriteValue) unsigned char b_ModulNbr, unsigned int ul_WriteValue)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
...@@ -3386,7 +3386,7 @@ int i_APCI1710_Write32BitCounterValue(struct comedi_device * dev, ...@@ -3386,7 +3386,7 @@ int i_APCI1710_Write32BitCounterValue(struct comedi_device * dev,
int i_APCI1710_EnableIndex(struct comedi_device * dev, unsigned char b_ModulNbr) int i_APCI1710_EnableIndex(struct comedi_device * dev, unsigned char b_ModulNbr)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
ULONG ul_InterruptLatchReg; unsigned int ul_InterruptLatchReg;
/**************************/ /**************************/
/* Test the module number */ /* Test the module number */
...@@ -4068,7 +4068,7 @@ int i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevic ...@@ -4068,7 +4068,7 @@ int i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevic
case APCI1710_INCCPT_READLATCHREGISTERVALUE: case APCI1710_INCCPT_READLATCHREGISTERVALUE:
i_ReturnValue = i_APCI1710_ReadLatchRegisterValue(dev, i_ReturnValue = i_APCI1710_ReadLatchRegisterValue(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char) CR_AREF(insn->chanspec),
(unsigned char) CR_RANGE(insn->chanspec), (PULONG) & data[0]); (unsigned char) CR_RANGE(insn->chanspec), (unsigned int *) & data[0]);
printk("Latch Register Value %d\n", data[0]); printk("Latch Register Value %d\n", data[0]);
break; break;
...@@ -4080,7 +4080,7 @@ int i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevic ...@@ -4080,7 +4080,7 @@ int i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevic
case APCI1710_INCCPT_READ32BITCOUNTERVALUE: case APCI1710_INCCPT_READ32BITCOUNTERVALUE:
i_ReturnValue = i_APCI1710_Read32BitCounterValue(dev, i_ReturnValue = i_APCI1710_Read32BitCounterValue(dev,
(unsigned char) CR_AREF(insn->chanspec), (PULONG) & data[0]); (unsigned char) CR_AREF(insn->chanspec), (unsigned int *) & data[0]);
break; break;
case APCI1710_INCCPT_GETINDEXSTATUS: case APCI1710_INCCPT_GETINDEXSTATUS:
...@@ -4124,7 +4124,7 @@ int i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevic ...@@ -4124,7 +4124,7 @@ int i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevic
i_ReturnValue = i_APCI1710_ReadFrequencyMeasurement(dev, i_ReturnValue = i_APCI1710_ReadFrequencyMeasurement(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char) CR_AREF(insn->chanspec),
(unsigned char *) & data[0], (unsigned char *) & data[0],
(unsigned char *) & data[1], (PULONG) & data[2]); (unsigned char *) & data[1], (unsigned int *) & data[2]);
break; break;
case APCI1710_INCCPT_READINTERRUPT: case APCI1710_INCCPT_READINTERRUPT:
...@@ -4281,7 +4281,7 @@ int i_APCI1710_ReadLatchRegisterStatus(struct comedi_device * dev, ...@@ -4281,7 +4281,7 @@ int i_APCI1710_ReadLatchRegisterStatus(struct comedi_device * dev,
*/ */
int i_APCI1710_ReadLatchRegisterValue(struct comedi_device * dev, int i_APCI1710_ReadLatchRegisterValue(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_LatchReg, PULONG pul_LatchValue) unsigned char b_ModulNbr, unsigned char b_LatchReg, unsigned int * pul_LatchValue)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
...@@ -4460,7 +4460,7 @@ int i_APCI1710_Read16BitCounterValue(struct comedi_device * dev, ...@@ -4460,7 +4460,7 @@ int i_APCI1710_Read16BitCounterValue(struct comedi_device * dev,
*/ */
int i_APCI1710_Read32BitCounterValue(struct comedi_device * dev, int i_APCI1710_Read32BitCounterValue(struct comedi_device * dev,
unsigned char b_ModulNbr, PULONG pul_CounterValue) unsigned char b_ModulNbr, unsigned int * pul_CounterValue)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
...@@ -5147,7 +5147,7 @@ int i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device * dev, ...@@ -5147,7 +5147,7 @@ int i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device * dev,
int i_APCI1710_ReadFrequencyMeasurement(struct comedi_device * dev, int i_APCI1710_ReadFrequencyMeasurement(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
unsigned char * pb_Status, unsigned char * pb_UDStatus, PULONG pul_ReadValue) unsigned char * pb_Status, unsigned char * pb_UDStatus, unsigned int * pul_ReadValue)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
unsigned int ui_16BitValue; unsigned int ui_16BitValue;
......
...@@ -177,8 +177,8 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device *dev, ...@@ -177,8 +177,8 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
unsigned char b_PCIInputClock, unsigned char b_PCIInputClock,
unsigned char b_TimingUnity, unsigned char b_TimingUnity,
ULONG ul_TimingInterval, unsigned int ul_TimingInterval,
PULONG pul_RealTimingInterval); unsigned int * pul_RealTimingInterval);
/* INSN BITS */ /* INSN BITS */
int i_APCI1710_ClearCounterValue(struct comedi_device *dev, unsigned char b_ModulNbr); int i_APCI1710_ClearCounterValue(struct comedi_device *dev, unsigned char b_ModulNbr);
...@@ -210,7 +210,7 @@ int i_APCI1710_Write16BitCounterValue(struct comedi_device *dev, ...@@ -210,7 +210,7 @@ int i_APCI1710_Write16BitCounterValue(struct comedi_device *dev,
unsigned int ui_WriteValue); unsigned int ui_WriteValue);
int i_APCI1710_Write32BitCounterValue(struct comedi_device *dev, int i_APCI1710_Write32BitCounterValue(struct comedi_device *dev,
unsigned char b_ModulNbr, ULONG ul_WriteValue); unsigned char b_ModulNbr, unsigned int ul_WriteValue);
int i_APCI1710_EnableIndex(struct comedi_device *dev, unsigned char b_ModulNbr); int i_APCI1710_EnableIndex(struct comedi_device *dev, unsigned char b_ModulNbr);
...@@ -234,14 +234,14 @@ int i_APCI1710_ReadLatchRegisterStatus(struct comedi_device *dev, ...@@ -234,14 +234,14 @@ int i_APCI1710_ReadLatchRegisterStatus(struct comedi_device *dev,
int i_APCI1710_ReadLatchRegisterValue(struct comedi_device *dev, int i_APCI1710_ReadLatchRegisterValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_LatchReg, unsigned char b_ModulNbr, unsigned char b_LatchReg,
PULONG pul_LatchValue); unsigned int * pul_LatchValue);
int i_APCI1710_Read16BitCounterValue(struct comedi_device *dev, int i_APCI1710_Read16BitCounterValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_SelectedCounter, unsigned char b_ModulNbr, unsigned char b_SelectedCounter,
unsigned int * pui_CounterValue); unsigned int * pui_CounterValue);
int i_APCI1710_Read32BitCounterValue(struct comedi_device *dev, int i_APCI1710_Read32BitCounterValue(struct comedi_device *dev,
unsigned char b_ModulNbr, PULONG pul_CounterValue); unsigned char b_ModulNbr, unsigned int * pul_CounterValue);
int i_APCI1710_GetIndexStatus(struct comedi_device *dev, int i_APCI1710_GetIndexStatus(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char * pb_IndexStatus); unsigned char b_ModulNbr, unsigned char * pb_IndexStatus);
...@@ -268,4 +268,4 @@ int i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device *dev, ...@@ -268,4 +268,4 @@ int i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device *dev,
int i_APCI1710_ReadFrequencyMeasurement(struct comedi_device *dev, int i_APCI1710_ReadFrequencyMeasurement(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
unsigned char * pb_Status, unsigned char * pb_UDStatus, unsigned char * pb_Status, unsigned char * pb_UDStatus,
PULONG pul_ReadValue); unsigned int * pul_ReadValue);
...@@ -108,7 +108,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -108,7 +108,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
b_PulseEncoderNbr =(unsigned char) data[0]; b_PulseEncoderNbr =(unsigned char) data[0];
b_InputLevelSelection =(unsigned char) data[1]; b_InputLevelSelection =(unsigned char) data[1];
b_TriggerOutputAction =(unsigned char) data[2]; b_TriggerOutputAction =(unsigned char) data[2];
ul_StartValue =(ULONG) data[3]; ul_StartValue =(unsigned int) data[3];
| |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| Output Parameters : - | | Output Parameters : - |
...@@ -133,13 +133,13 @@ int i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev, ...@@ -133,13 +133,13 @@ int i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
unsigned char b_PulseEncoderNbr; unsigned char b_PulseEncoderNbr;
unsigned char b_InputLevelSelection; unsigned char b_InputLevelSelection;
unsigned char b_TriggerOutputAction; unsigned char b_TriggerOutputAction;
ULONG ul_StartValue; unsigned int ul_StartValue;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec); b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_PulseEncoderNbr = (unsigned char) data[0]; b_PulseEncoderNbr = (unsigned char) data[0];
b_InputLevelSelection = (unsigned char) data[1]; b_InputLevelSelection = (unsigned char) data[1];
b_TriggerOutputAction = (unsigned char) data[2]; b_TriggerOutputAction = (unsigned char) data[2];
ul_StartValue = (ULONG) data[3]; ul_StartValue = (unsigned int) data[3];
i_ReturnValue = insn->n; i_ReturnValue = insn->n;
...@@ -717,15 +717,15 @@ int i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev, ...@@ -717,15 +717,15 @@ int i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev,
unsigned char b_PulseEncoderNbr; unsigned char b_PulseEncoderNbr;
unsigned char * pb_Status; unsigned char * pb_Status;
unsigned char b_Type; unsigned char b_Type;
PULONG pul_ReadValue; unsigned int * pul_ReadValue;
ULONG ul_WriteValue; unsigned int ul_WriteValue;
i_ReturnValue = insn->n; i_ReturnValue = insn->n;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec); b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_Type = (unsigned char) data[0]; b_Type = (unsigned char) data[0];
b_PulseEncoderNbr = (unsigned char) data[1]; b_PulseEncoderNbr = (unsigned char) data[1];
pb_Status = (unsigned char *) & data[0]; pb_Status = (unsigned char *) & data[0];
pul_ReadValue = (PULONG) & data[1]; pul_ReadValue = (unsigned int *) & data[1];
/***********************************/ /***********************************/
/* Test the selected module number */ /* Test the selected module number */
...@@ -794,7 +794,7 @@ int i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev, ...@@ -794,7 +794,7 @@ int i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev,
break; break;
case APCI1710_PULSEENCODER_WRITE: case APCI1710_PULSEENCODER_WRITE:
ul_WriteValue = (ULONG) data[2]; ul_WriteValue = (unsigned int) data[2];
/*******************/ /*******************/
/* Write the value */ /* Write the value */
/*******************/ /*******************/
......
...@@ -83,10 +83,10 @@ int i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice ...@@ -83,10 +83,10 @@ int i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice
(unsigned char) data[0], //b_PWM (unsigned char) data[0], //b_PWM
(unsigned char) data[1], // b_ClockSelection (unsigned char) data[1], // b_ClockSelection
(unsigned char) data[2], // b_TimingUnit (unsigned char) data[2], // b_TimingUnit
(ULONG) data[3], //ul_LowTiming (unsigned int) data[3], //ul_LowTiming
(ULONG) data[4], //ul_HighTiming (unsigned int) data[4], //ul_HighTiming
(PULONG) & data[0], //pul_RealLowTiming (unsigned int *) & data[0], //pul_RealLowTiming
(PULONG) & data[1] //pul_RealHighTiming (unsigned int *) & data[1] //pul_RealHighTiming
); );
break; break;
...@@ -94,8 +94,8 @@ int i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice ...@@ -94,8 +94,8 @@ int i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice
i_ReturnValue = i_APCI1710_GetPWMInitialisation(dev, (unsigned char) CR_AREF(insn->chanspec), // b_ModulNbr i_ReturnValue = i_APCI1710_GetPWMInitialisation(dev, (unsigned char) CR_AREF(insn->chanspec), // b_ModulNbr
(unsigned char) data[0], //b_PWM (unsigned char) data[0], //b_PWM
(unsigned char *) & data[0], //pb_TimingUnit (unsigned char *) & data[0], //pb_TimingUnit
(PULONG) & data[1], //pul_LowTiming (unsigned int *) & data[1], //pul_LowTiming
(PULONG) & data[2], //pul_HighTiming (unsigned int *) & data[2], //pul_HighTiming
(unsigned char *) & data[3], // pb_StartLevel (unsigned char *) & data[3], // pb_StartLevel
(unsigned char *) & data[4], // pb_StopMode (unsigned char *) & data[4], // pb_StopMode
(unsigned char *) & data[5], // pb_StopLevel (unsigned char *) & data[5], // pb_StopLevel
...@@ -184,13 +184,13 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -184,13 +184,13 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
unsigned char b_PWM, unsigned char b_PWM,
unsigned char b_ClockSelection, unsigned char b_ClockSelection,
unsigned char b_TimingUnit, unsigned char b_TimingUnit,
ULONG ul_LowTiming, unsigned int ul_LowTiming,
ULONG ul_HighTiming, unsigned int ul_HighTiming,
PULONG pul_RealLowTiming, PULONG pul_RealHighTiming) unsigned int * pul_RealLowTiming, unsigned int * pul_RealHighTiming)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
ULONG ul_LowTimerValue = 0; unsigned int ul_LowTimerValue = 0;
ULONG ul_HighTimerValue = 0; unsigned int ul_HighTimerValue = 0;
DWORD dw_Command; DWORD dw_Command;
double d_RealLowTiming = 0; double d_RealLowTiming = 0;
double d_RealHighTiming = 0; double d_RealHighTiming = 0;
...@@ -392,7 +392,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -392,7 +392,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
(ul_LowTiming (ul_LowTiming
* *
(0.00025 * b_ClockSelection)); (0.00025 * b_ClockSelection));
...@@ -415,7 +415,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -415,7 +415,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
*pul_RealLowTiming *pul_RealLowTiming
= =
(ULONG) (unsigned int)
(ul_LowTimerValue (ul_LowTimerValue
/ /
(0.00025 * (double)b_ClockSelection)); (0.00025 * (double)b_ClockSelection));
...@@ -451,7 +451,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -451,7 +451,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_LowTimerValue) (ul_LowTimerValue)
...@@ -473,7 +473,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -473,7 +473,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
(ul_LowTiming (ul_LowTiming
* *
(0.25 * b_ClockSelection)); (0.25 * b_ClockSelection));
...@@ -496,7 +496,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -496,7 +496,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
*pul_RealLowTiming *pul_RealLowTiming
= =
(ULONG) (unsigned int)
(ul_LowTimerValue (ul_LowTimerValue
/ /
(0.25 * (double)b_ClockSelection)); (0.25 * (double)b_ClockSelection));
...@@ -534,7 +534,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -534,7 +534,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_LowTimerValue) (ul_LowTimerValue)
...@@ -580,7 +580,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -580,7 +580,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
*pul_RealLowTiming *pul_RealLowTiming
= =
(ULONG) (unsigned int)
(ul_LowTimerValue (ul_LowTimerValue
/ /
(250.0 * (double)b_ClockSelection)); (250.0 * (double)b_ClockSelection));
...@@ -616,7 +616,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -616,7 +616,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_LowTimerValue) (ul_LowTimerValue)
...@@ -637,7 +637,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -637,7 +637,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
(ul_LowTiming (ul_LowTiming
* *
(250000.0 (250000.0
...@@ -662,7 +662,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -662,7 +662,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
*pul_RealLowTiming *pul_RealLowTiming
= =
(ULONG) (unsigned int)
(ul_LowTimerValue (ul_LowTimerValue
/ /
(250000.0 (250000.0
...@@ -701,7 +701,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -701,7 +701,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_LowTimerValue) (ul_LowTimerValue)
...@@ -723,7 +723,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -723,7 +723,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(ul_LowTiming (ul_LowTiming
* *
...@@ -751,7 +751,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -751,7 +751,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
*pul_RealLowTiming *pul_RealLowTiming
= =
(ULONG) (unsigned int)
(ul_LowTimerValue (ul_LowTimerValue
/ /
(250000.0 (250000.0
...@@ -795,7 +795,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -795,7 +795,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_LowTimerValue) (ul_LowTimerValue)
...@@ -823,7 +823,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -823,7 +823,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
(ul_HighTiming (ul_HighTiming
* *
(0.00025 * b_ClockSelection)); (0.00025 * b_ClockSelection));
...@@ -846,7 +846,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -846,7 +846,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
*pul_RealHighTiming *pul_RealHighTiming
= =
(ULONG) (unsigned int)
(ul_HighTimerValue (ul_HighTimerValue
/ /
(0.00025 * (double)b_ClockSelection)); (0.00025 * (double)b_ClockSelection));
...@@ -882,7 +882,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -882,7 +882,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_HighTimerValue) (ul_HighTimerValue)
...@@ -904,7 +904,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -904,7 +904,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
(ul_HighTiming (ul_HighTiming
* *
(0.25 * b_ClockSelection)); (0.25 * b_ClockSelection));
...@@ -927,7 +927,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -927,7 +927,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
*pul_RealHighTiming *pul_RealHighTiming
= =
(ULONG) (unsigned int)
(ul_HighTimerValue (ul_HighTimerValue
/ /
(0.25 * (double)b_ClockSelection)); (0.25 * (double)b_ClockSelection));
...@@ -965,7 +965,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -965,7 +965,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_HighTimerValue) (ul_HighTimerValue)
...@@ -1011,7 +1011,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -1011,7 +1011,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
*pul_RealHighTiming *pul_RealHighTiming
= =
(ULONG) (unsigned int)
(ul_HighTimerValue (ul_HighTimerValue
/ /
(250.0 * (double)b_ClockSelection)); (250.0 * (double)b_ClockSelection));
...@@ -1047,7 +1047,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -1047,7 +1047,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_HighTimerValue) (ul_HighTimerValue)
...@@ -1069,7 +1069,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -1069,7 +1069,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
(ul_HighTiming (ul_HighTiming
* *
(250000.0 (250000.0
...@@ -1094,7 +1094,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -1094,7 +1094,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
*pul_RealHighTiming *pul_RealHighTiming
= =
(ULONG) (unsigned int)
(ul_HighTimerValue (ul_HighTimerValue
/ /
(250000.0 (250000.0
...@@ -1133,7 +1133,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -1133,7 +1133,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_HighTimerValue) (ul_HighTimerValue)
...@@ -1155,7 +1155,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -1155,7 +1155,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(ul_HighTiming (ul_HighTiming
* *
...@@ -1183,7 +1183,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -1183,7 +1183,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
*pul_RealHighTiming *pul_RealHighTiming
= =
(ULONG) (unsigned int)
(ul_HighTimerValue (ul_HighTimerValue
/ /
(250000.0 (250000.0
...@@ -1227,7 +1227,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -1227,7 +1227,7 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_HighTimerValue) (ul_HighTimerValue)
...@@ -1538,8 +1538,8 @@ int i_APCI1710_GetPWMInitialisation(struct comedi_device * dev, ...@@ -1538,8 +1538,8 @@ int i_APCI1710_GetPWMInitialisation(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
unsigned char b_PWM, unsigned char b_PWM,
unsigned char * pb_TimingUnit, unsigned char * pb_TimingUnit,
PULONG pul_LowTiming, unsigned int * pul_LowTiming,
PULONG pul_HighTiming, unsigned int * pul_HighTiming,
unsigned char * pb_StartLevel, unsigned char * pb_StartLevel,
unsigned char * pb_StopMode, unsigned char * pb_StopMode,
unsigned char * pb_StopLevel, unsigned char * pb_StopLevel,
...@@ -1709,7 +1709,7 @@ int i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice ...@@ -1709,7 +1709,7 @@ int i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice
i_ReturnValue = i_APCI1710_SetNewPWMTiming(dev, i_ReturnValue = i_APCI1710_SetNewPWMTiming(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char) CR_AREF(insn->chanspec),
(unsigned char) data[0], (unsigned char) data[0],
(unsigned char) data[1], (ULONG) data[2], (ULONG) data[3]); (unsigned char) data[1], (unsigned int) data[2], (unsigned int) data[3]);
break; break;
default: default:
...@@ -2191,14 +2191,14 @@ int i_APCI1710_DisablePWM(struct comedi_device * dev, unsigned char b_ModulNbr, ...@@ -2191,14 +2191,14 @@ int i_APCI1710_DisablePWM(struct comedi_device * dev, unsigned char b_ModulNbr,
int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
unsigned char b_PWM, unsigned char b_TimingUnit, ULONG ul_LowTiming, ULONG ul_HighTiming) unsigned char b_PWM, unsigned char b_TimingUnit, unsigned int ul_LowTiming, unsigned int ul_HighTiming)
{ {
unsigned char b_ClockSelection; unsigned char b_ClockSelection;
int i_ReturnValue = 0; int i_ReturnValue = 0;
ULONG ul_LowTimerValue = 0; unsigned int ul_LowTimerValue = 0;
ULONG ul_HighTimerValue = 0; unsigned int ul_HighTimerValue = 0;
ULONG ul_RealLowTiming = 0; unsigned int ul_RealLowTiming = 0;
ULONG ul_RealHighTiming = 0; unsigned int ul_RealHighTiming = 0;
DWORD dw_Status; DWORD dw_Status;
DWORD dw_Command; DWORD dw_Command;
double d_RealLowTiming = 0; double d_RealLowTiming = 0;
...@@ -2400,7 +2400,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2400,7 +2400,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
(ul_LowTiming (ul_LowTiming
* *
(0.00025 * b_ClockSelection)); (0.00025 * b_ClockSelection));
...@@ -2423,7 +2423,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2423,7 +2423,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_RealLowTiming ul_RealLowTiming
= =
(ULONG) (unsigned int)
(ul_LowTimerValue (ul_LowTimerValue
/ /
(0.00025 * (double)b_ClockSelection)); (0.00025 * (double)b_ClockSelection));
...@@ -2459,7 +2459,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2459,7 +2459,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_LowTimerValue) (ul_LowTimerValue)
...@@ -2481,7 +2481,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2481,7 +2481,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
(ul_LowTiming (ul_LowTiming
* *
(0.25 * b_ClockSelection)); (0.25 * b_ClockSelection));
...@@ -2504,7 +2504,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2504,7 +2504,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_RealLowTiming ul_RealLowTiming
= =
(ULONG) (unsigned int)
(ul_LowTimerValue (ul_LowTimerValue
/ /
(0.25 * (double)b_ClockSelection)); (0.25 * (double)b_ClockSelection));
...@@ -2542,7 +2542,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2542,7 +2542,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_LowTimerValue) (ul_LowTimerValue)
...@@ -2588,7 +2588,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2588,7 +2588,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_RealLowTiming ul_RealLowTiming
= =
(ULONG) (unsigned int)
(ul_LowTimerValue (ul_LowTimerValue
/ /
(250.0 * (double)b_ClockSelection)); (250.0 * (double)b_ClockSelection));
...@@ -2624,7 +2624,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2624,7 +2624,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_LowTimerValue) (ul_LowTimerValue)
...@@ -2646,7 +2646,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2646,7 +2646,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
(ul_LowTiming (ul_LowTiming
* *
(250000.0 (250000.0
...@@ -2671,7 +2671,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2671,7 +2671,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_RealLowTiming ul_RealLowTiming
= =
(ULONG) (unsigned int)
(ul_LowTimerValue (ul_LowTimerValue
/ /
(250000.0 (250000.0
...@@ -2710,7 +2710,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2710,7 +2710,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_LowTimerValue) (ul_LowTimerValue)
...@@ -2732,7 +2732,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2732,7 +2732,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(ul_LowTiming (ul_LowTiming
* *
...@@ -2760,7 +2760,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2760,7 +2760,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_RealLowTiming ul_RealLowTiming
= =
(ULONG) (unsigned int)
(ul_LowTimerValue (ul_LowTimerValue
/ /
(250000.0 (250000.0
...@@ -2804,7 +2804,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2804,7 +2804,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue ul_LowTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_LowTimerValue) (ul_LowTimerValue)
...@@ -2832,7 +2832,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2832,7 +2832,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
(ul_HighTiming (ul_HighTiming
* *
(0.00025 * b_ClockSelection)); (0.00025 * b_ClockSelection));
...@@ -2855,7 +2855,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2855,7 +2855,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_RealHighTiming ul_RealHighTiming
= =
(ULONG) (unsigned int)
(ul_HighTimerValue (ul_HighTimerValue
/ /
(0.00025 * (double)b_ClockSelection)); (0.00025 * (double)b_ClockSelection));
...@@ -2891,7 +2891,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2891,7 +2891,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_HighTimerValue) (ul_HighTimerValue)
...@@ -2913,7 +2913,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2913,7 +2913,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
(ul_HighTiming (ul_HighTiming
* *
(0.25 * b_ClockSelection)); (0.25 * b_ClockSelection));
...@@ -2936,7 +2936,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2936,7 +2936,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_RealHighTiming ul_RealHighTiming
= =
(ULONG) (unsigned int)
(ul_HighTimerValue (ul_HighTimerValue
/ /
(0.25 * (double)b_ClockSelection)); (0.25 * (double)b_ClockSelection));
...@@ -2974,7 +2974,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -2974,7 +2974,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_HighTimerValue) (ul_HighTimerValue)
...@@ -3020,7 +3020,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -3020,7 +3020,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_RealHighTiming ul_RealHighTiming
= =
(ULONG) (unsigned int)
(ul_HighTimerValue (ul_HighTimerValue
/ /
(250.0 * (double)b_ClockSelection)); (250.0 * (double)b_ClockSelection));
...@@ -3056,7 +3056,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -3056,7 +3056,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_HighTimerValue) (ul_HighTimerValue)
...@@ -3078,7 +3078,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -3078,7 +3078,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
(ul_HighTiming (ul_HighTiming
* *
(250000.0 (250000.0
...@@ -3103,7 +3103,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -3103,7 +3103,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_RealHighTiming ul_RealHighTiming
= =
(ULONG) (unsigned int)
(ul_HighTimerValue (ul_HighTimerValue
/ /
(250000.0 (250000.0
...@@ -3142,7 +3142,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -3142,7 +3142,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_HighTimerValue) (ul_HighTimerValue)
...@@ -3164,7 +3164,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -3164,7 +3164,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(ul_HighTiming (ul_HighTiming
* *
...@@ -3192,7 +3192,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -3192,7 +3192,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
ul_RealHighTiming ul_RealHighTiming
= =
(ULONG) (unsigned int)
(ul_HighTimerValue (ul_HighTimerValue
/ /
(250000.0 (250000.0
...@@ -3236,7 +3236,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -3236,7 +3236,7 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
if (b_ClockSelection != APCI1710_40MHZ) { if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue ul_HighTimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_HighTimerValue) (ul_HighTimerValue)
......
...@@ -34,16 +34,16 @@ int i_APCI1710_InitPWM(struct comedi_device *dev, ...@@ -34,16 +34,16 @@ int i_APCI1710_InitPWM(struct comedi_device *dev,
unsigned char b_PWM, unsigned char b_PWM,
unsigned char b_ClockSelection, unsigned char b_ClockSelection,
unsigned char b_TimingUnit, unsigned char b_TimingUnit,
ULONG ul_LowTiming, unsigned int ul_LowTiming,
ULONG ul_HighTiming, unsigned int ul_HighTiming,
PULONG pul_RealLowTiming, PULONG pul_RealHighTiming); unsigned int * pul_RealLowTiming, unsigned int * pul_RealHighTiming);
int i_APCI1710_GetPWMInitialisation(struct comedi_device *dev, int i_APCI1710_GetPWMInitialisation(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
unsigned char b_PWM, unsigned char b_PWM,
unsigned char * pb_TimingUnit, unsigned char * pb_TimingUnit,
PULONG pul_LowTiming, unsigned int * pul_LowTiming,
PULONG pul_HighTiming, unsigned int * pul_HighTiming,
unsigned char * pb_StartLevel, unsigned char * pb_StartLevel,
unsigned char * pb_StopMode, unsigned char * pb_StopMode,
unsigned char * pb_StopLevel, unsigned char * pb_StopLevel,
...@@ -64,7 +64,7 @@ int i_APCI1710_EnablePWM(struct comedi_device *dev, ...@@ -64,7 +64,7 @@ int i_APCI1710_EnablePWM(struct comedi_device *dev,
int i_APCI1710_SetNewPWMTiming(struct comedi_device *dev, int i_APCI1710_SetNewPWMTiming(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_ModulNbr,
unsigned char b_PWM, unsigned char b_TimingUnit, unsigned char b_PWM, unsigned char b_TimingUnit,
ULONG ul_LowTiming, ULONG ul_HighTiming); unsigned int ul_LowTiming, unsigned int ul_HighTiming);
int i_APCI1710_DisablePWM(struct comedi_device *dev, unsigned char b_ModulNbr, unsigned char b_PWM); int i_APCI1710_DisablePWM(struct comedi_device *dev, unsigned char b_ModulNbr, unsigned char b_PWM);
......
...@@ -115,7 +115,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc ...@@ -115,7 +115,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
b_PositionTurnLength= (unsigned char) data[1]; b_PositionTurnLength= (unsigned char) data[1];
b_TurnCptLength = (unsigned char) data[2]; b_TurnCptLength = (unsigned char) data[2];
b_PCIInputClock = (unsigned char) data[3]; b_PCIInputClock = (unsigned char) data[3];
ul_SSIOutputClock = (ULONG) data[4]; ul_SSIOutputClock = (unsigned int) data[4];
b_SSICountingMode = (unsigned char) data[5]; | b_SSICountingMode = (unsigned char) data[5]; |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| Output Parameters : - | | Output Parameters : - |
...@@ -140,14 +140,14 @@ int i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subde ...@@ -140,14 +140,14 @@ int i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subde
unsigned int ui_TimerValue; unsigned int ui_TimerValue;
unsigned char b_ModulNbr, b_SSIProfile, b_PositionTurnLength, b_TurnCptLength, unsigned char b_ModulNbr, b_SSIProfile, b_PositionTurnLength, b_TurnCptLength,
b_PCIInputClock, b_SSICountingMode; b_PCIInputClock, b_SSICountingMode;
ULONG ul_SSIOutputClock; unsigned int ul_SSIOutputClock;
b_ModulNbr = CR_AREF(insn->chanspec); b_ModulNbr = CR_AREF(insn->chanspec);
b_SSIProfile = (unsigned char) data[0]; b_SSIProfile = (unsigned char) data[0];
b_PositionTurnLength = (unsigned char) data[1]; b_PositionTurnLength = (unsigned char) data[1];
b_TurnCptLength = (unsigned char) data[2]; b_TurnCptLength = (unsigned char) data[2];
b_PCIInputClock = (unsigned char) data[3]; b_PCIInputClock = (unsigned char) data[3];
ul_SSIOutputClock = (ULONG) data[4]; ul_SSIOutputClock = (unsigned int) data[4];
b_SSICountingMode = (unsigned char) data[5]; b_SSICountingMode = (unsigned char) data[5];
i_ReturnValue = insn->n; i_ReturnValue = insn->n;
...@@ -252,7 +252,7 @@ int i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subde ...@@ -252,7 +252,7 @@ int i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subde
= =
(unsigned int) (unsigned int)
( (
((ULONG) (b_PCIInputClock) * 500000UL) / ul_SSIOutputClock); ((unsigned int) (b_PCIInputClock) * 500000UL) / ul_SSIOutputClock);
/************************/ /************************/
/* Initialise the timer */ /* Initialise the timer */
...@@ -387,8 +387,8 @@ int i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subde ...@@ -387,8 +387,8 @@ int i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subde
| Output Parameters : PULONG_ pul_Position : SSI position in the turn | | Output Parameters : PULONG_ pul_Position : SSI position in the turn |
| PULONG_ pul_TurnCpt : Number of turns | PULONG_ pul_TurnCpt : Number of turns
pul_Position = (PULONG) &data[0]; pul_Position = (unsigned int *) &data[0];
pul_TurnCpt = (PULONG) &data[1]; | pul_TurnCpt = (unsigned int *) &data[1]; |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| Return Value : 0: No error | | Return Value : 0: No error |
| -1: The handle parameter of the board is wrong | | -1: The handle parameter of the board is wrong |
...@@ -416,18 +416,18 @@ int i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdev ...@@ -416,18 +416,18 @@ int i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdev
unsigned char b_ModulNbr; unsigned char b_ModulNbr;
unsigned char b_SelectedSSI; unsigned char b_SelectedSSI;
unsigned char b_ReadType; unsigned char b_ReadType;
PULONG pul_Position; unsigned int * pul_Position;
PULONG pul_TurnCpt; unsigned int * pul_TurnCpt;
PULONG pul_Position1; unsigned int * pul_Position1;
PULONG pul_TurnCpt1; unsigned int * pul_TurnCpt1;
i_ReturnValue = insn->n; i_ReturnValue = insn->n;
pul_Position1 = (PULONG) & data[0]; pul_Position1 = (unsigned int *) & data[0];
// For Read1 // For Read1
pul_TurnCpt1 = (PULONG) & data[1]; pul_TurnCpt1 = (unsigned int *) & data[1];
// For Read all // For Read all
pul_Position = (PULONG) & data[0]; //0-2 pul_Position = (unsigned int *) & data[0]; //0-2
pul_TurnCpt = (PULONG) & data[3]; //3-5 pul_TurnCpt = (unsigned int *) & data[3]; //3-5
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec); b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_SelectedSSI = (unsigned char) CR_CHAN(insn->chanspec); b_SelectedSSI = (unsigned char) CR_CHAN(insn->chanspec);
b_ReadType = (unsigned char) CR_RANGE(insn->chanspec); b_ReadType = (unsigned char) CR_RANGE(insn->chanspec);
......
...@@ -134,15 +134,15 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -134,15 +134,15 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data) struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{ {
int i_ReturnValue = 0; int i_ReturnValue = 0;
ULONG ul_TimerValue = 0; unsigned int ul_TimerValue = 0;
DWORD dw_Command; DWORD dw_Command;
double d_RealTimingInterval = 0; double d_RealTimingInterval = 0;
unsigned char b_ModulNbr; unsigned char b_ModulNbr;
unsigned char b_TorCounter; unsigned char b_TorCounter;
unsigned char b_PCIInputClock; unsigned char b_PCIInputClock;
unsigned char b_TimingUnit; unsigned char b_TimingUnit;
ULONG ul_TimingInterval; unsigned int ul_TimingInterval;
ULONG ul_RealTimingInterval = 0; unsigned int ul_RealTimingInterval = 0;
i_ReturnValue = insn->n; i_ReturnValue = insn->n;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec); b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
...@@ -150,7 +150,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -150,7 +150,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
b_TorCounter = (unsigned char) data[0]; b_TorCounter = (unsigned char) data[0];
b_PCIInputClock = (unsigned char) data[1]; b_PCIInputClock = (unsigned char) data[1];
b_TimingUnit = (unsigned char) data[2]; b_TimingUnit = (unsigned char) data[2];
ul_TimingInterval = (ULONG) data[3]; ul_TimingInterval = (unsigned int) data[3];
printk("INPUT clock %d\n", b_PCIInputClock); printk("INPUT clock %d\n", b_PCIInputClock);
/**************************/ /**************************/
...@@ -225,7 +225,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -225,7 +225,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
(ul_TimingInterval (ul_TimingInterval
* *
(0.00025 * b_PCIInputClock)); (0.00025 * b_PCIInputClock));
...@@ -248,7 +248,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -248,7 +248,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
ul_RealTimingInterval ul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(0.00025 * (double)b_PCIInputClock)); (0.00025 * (double)b_PCIInputClock));
...@@ -284,7 +284,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -284,7 +284,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
if (b_PCIInputClock != APCI1710_40MHZ) { if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_TimerValue) (ul_TimerValue)
...@@ -306,7 +306,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -306,7 +306,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
(ul_TimingInterval (ul_TimingInterval
* *
(0.25 * b_PCIInputClock)); (0.25 * b_PCIInputClock));
...@@ -329,7 +329,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -329,7 +329,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
ul_RealTimingInterval ul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(0.25 * (double)b_PCIInputClock)); (0.25 * (double)b_PCIInputClock));
...@@ -367,7 +367,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -367,7 +367,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
if (b_PCIInputClock != APCI1710_40MHZ) { if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_TimerValue) (ul_TimerValue)
...@@ -413,7 +413,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -413,7 +413,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
ul_RealTimingInterval ul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(250.0 * (double)b_PCIInputClock)); (250.0 * (double)b_PCIInputClock));
...@@ -449,7 +449,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -449,7 +449,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
if (b_PCIInputClock != APCI1710_40MHZ) { if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_TimerValue) (ul_TimerValue)
...@@ -471,7 +471,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -471,7 +471,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
(ul_TimingInterval (ul_TimingInterval
* *
(250000.0 (250000.0
...@@ -496,7 +496,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -496,7 +496,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
ul_RealTimingInterval ul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(250000.0 (250000.0
...@@ -535,7 +535,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -535,7 +535,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
if (b_PCIInputClock != APCI1710_40MHZ) { if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_TimerValue) (ul_TimerValue)
...@@ -557,7 +557,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -557,7 +557,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(ul_TimingInterval (ul_TimingInterval
* *
...@@ -585,7 +585,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -585,7 +585,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
ul_RealTimingInterval ul_RealTimingInterval
= =
(ULONG) (unsigned int)
(ul_TimerValue (ul_TimerValue
/ /
(250000.0 (250000.0
...@@ -629,7 +629,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev, ...@@ -629,7 +629,7 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
if (b_PCIInputClock != APCI1710_40MHZ) { if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue ul_TimerValue
= =
(ULONG) (unsigned int)
( (
(double) (double)
(ul_TimerValue) (ul_TimerValue)
...@@ -1442,7 +1442,7 @@ int i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev, ...@@ -1442,7 +1442,7 @@ int i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
| Disable the tor counter | | Disable the tor counter |
| interrupt | interrupt
pb_TimingUnit = (unsigned char *) &data[0]; pb_TimingUnit = (unsigned char *) &data[0];
pul_TimingInterval = (PULONG) &data[1]; pul_TimingInterval = (unsigned int *) &data[1];
pb_InputMode = (unsigned char *) &data[2]; pb_InputMode = (unsigned char *) &data[2];
pb_ExternGate = (unsigned char *) &data[3]; pb_ExternGate = (unsigned char *) &data[3];
pb_CycleMode = (unsigned char *) &data[4]; pb_CycleMode = (unsigned char *) &data[4];
...@@ -1468,7 +1468,7 @@ int i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev, ...@@ -1468,7 +1468,7 @@ int i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
unsigned char b_ModulNbr; unsigned char b_ModulNbr;
unsigned char b_TorCounter; unsigned char b_TorCounter;
unsigned char * pb_TimingUnit; unsigned char * pb_TimingUnit;
PULONG pul_TimingInterval; unsigned int * pul_TimingInterval;
unsigned char * pb_InputMode; unsigned char * pb_InputMode;
unsigned char * pb_ExternGate; unsigned char * pb_ExternGate;
unsigned char * pb_CycleMode; unsigned char * pb_CycleMode;
...@@ -1480,7 +1480,7 @@ int i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev, ...@@ -1480,7 +1480,7 @@ int i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
b_TorCounter = CR_CHAN(insn->chanspec); b_TorCounter = CR_CHAN(insn->chanspec);
pb_TimingUnit = (unsigned char *) & data[0]; pb_TimingUnit = (unsigned char *) & data[0];
pul_TimingInterval = (PULONG) & data[1]; pul_TimingInterval = (unsigned int *) & data[1];
pb_InputMode = (unsigned char *) & data[2]; pb_InputMode = (unsigned char *) & data[2];
pb_ExternGate = (unsigned char *) & data[3]; pb_ExternGate = (unsigned char *) & data[3];
pb_CycleMode = (unsigned char *) & data[4]; pb_CycleMode = (unsigned char *) & data[4];
...@@ -1683,9 +1683,9 @@ int i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev, ...@@ -1683,9 +1683,9 @@ int i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
| function | | function |
| "i_APCI1710_InitTorCounter"| | "i_APCI1710_InitTorCounter"|
| 4 : Timeeout occur | | 4 : Timeeout occur |
| PULONG pul_TorCounterValue : Tor counter value. | unsigned int * pul_TorCounterValue : Tor counter value.
pb_TorCounterStatus=(unsigned char *) &data[0]; pb_TorCounterStatus=(unsigned char *) &data[0];
pul_TorCounterValue=(PULONG) &data[1]; | pul_TorCounterValue=(unsigned int *) &data[1]; |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| Return Value : 0: No error | | Return Value : 0: No error |
| -1: The handle parameter of the board is wrong | | -1: The handle parameter of the board is wrong |
...@@ -1712,7 +1712,7 @@ int i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device ...@@ -1712,7 +1712,7 @@ int i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device
unsigned char b_ReadType; unsigned char b_ReadType;
unsigned int ui_TimeOut; unsigned int ui_TimeOut;
unsigned char * pb_TorCounterStatus; unsigned char * pb_TorCounterStatus;
PULONG pul_TorCounterValue; unsigned int * pul_TorCounterValue;
i_ReturnValue = insn->n; i_ReturnValue = insn->n;
b_ModulNbr = CR_AREF(insn->chanspec); b_ModulNbr = CR_AREF(insn->chanspec);
...@@ -1720,7 +1720,7 @@ int i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device ...@@ -1720,7 +1720,7 @@ int i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device
b_TorCounter = (unsigned char) data[1]; b_TorCounter = (unsigned char) data[1];
ui_TimeOut = (unsigned int) data[2]; ui_TimeOut = (unsigned int) data[2];
pb_TorCounterStatus = (unsigned char *) & data[0]; pb_TorCounterStatus = (unsigned char *) & data[0];
pul_TorCounterValue = (PULONG) & data[1]; pul_TorCounterValue = (unsigned int *) & data[1];
/**************************/ /**************************/
/* Test the module number */ /* Test the module number */
......
...@@ -661,11 +661,11 @@ int i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device * dev, ...@@ -661,11 +661,11 @@ int i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
int i_ReturnValue = 0; int i_ReturnValue = 0;
DWORD dw_StatusReg; DWORD dw_StatusReg;
unsigned char b_ModulNbr; unsigned char b_ModulNbr;
PULONG pul_PortValue; unsigned int * pul_PortValue;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec); b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
i_ReturnValue = insn->n; i_ReturnValue = insn->n;
pul_PortValue = (PULONG) & data[0]; pul_PortValue = (unsigned int *) & data[0];
/**************************/ /**************************/
/* Test the module number */ /* Test the module number */
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#define SUCCESS 1 #define SUCCESS 1
/* variable type definition */ /* variable type definition */
typedef unsigned int ULONG, *PULONG; /* 32-bit */
typedef unsigned int DWORD, *PDWORD; /* 32-bit */ typedef unsigned int DWORD, *PDWORD; /* 32-bit */
typedef unsigned long ULONG_PTR; typedef unsigned long ULONG_PTR;
...@@ -308,7 +307,7 @@ typedef union { ...@@ -308,7 +307,7 @@ typedef union {
unsigned char b_TimingUnit; unsigned char b_TimingUnit;
unsigned char b_InterruptEnable; unsigned char b_InterruptEnable;
double d_TimingInterval; double d_TimingInterval;
ULONG ul_RealTimingInterval; unsigned int ul_RealTimingInterval;
} s_TorCounterInfo[2]; } s_TorCounterInfo[2];
unsigned char b_PCIInputClock; unsigned char b_PCIInputClock;
} s_TorCounterModuleInfo; } s_TorCounterModuleInfo;
...@@ -321,8 +320,8 @@ typedef union { ...@@ -321,8 +320,8 @@ typedef union {
unsigned char b_InterruptEnable; unsigned char b_InterruptEnable;
double d_LowTiming; double d_LowTiming;
double d_HighTiming; double d_HighTiming;
ULONG ul_RealLowTiming; unsigned int ul_RealLowTiming;
ULONG ul_RealHighTiming; unsigned int ul_RealHighTiming;
} s_PWMInfo[2]; } s_PWMInfo[2];
unsigned char b_ClockSelection; unsigned char b_ClockSelection;
} s_PWMModuleInfo; } s_PWMModuleInfo;
...@@ -337,7 +336,7 @@ typedef union { ...@@ -337,7 +336,7 @@ typedef union {
unsigned char b_TimingUnit; unsigned char b_TimingUnit;
unsigned char b_ClockSelection; unsigned char b_ClockSelection;
double d_TimingInterval; double d_TimingInterval;
ULONG ul_Timing; unsigned int ul_Timing;
} s_ETMModuleInfo; } s_ETMModuleInfo;
/* CDA infos */ /* CDA infos */
...@@ -383,10 +382,10 @@ typedef struct { ...@@ -383,10 +382,10 @@ typedef struct {
unsigned short us_UseDma; // To use Dma or not unsigned short us_UseDma; // To use Dma or not
unsigned char b_DmaDoubleBuffer; // we can use double buffering unsigned char b_DmaDoubleBuffer; // we can use double buffering
unsigned int ui_DmaActualBuffer; // which buffer is used now unsigned int ui_DmaActualBuffer; // which buffer is used now
//*UPDATE-0.7.57->0.7.68 /* UPDATE-0.7.57->0.7.68 */
//ULONG ul_DmaBufferVirtual[2];// pointers to begin of DMA buffer /* unsigned int ul_DmaBufferVirtual[2]; pointers to begin of DMA buffer */
short *ul_DmaBufferVirtual[2]; // pointers to begin of DMA buffer short *ul_DmaBufferVirtual[2]; // pointers to begin of DMA buffer
ULONG ul_DmaBufferHw[2]; // hw address of DMA buff unsigned int ul_DmaBufferHw[2]; // hw address of DMA buff
unsigned int ui_DmaBufferSize[2]; // size of dma buffer in bytes unsigned int ui_DmaBufferSize[2]; // size of dma buffer in bytes
unsigned int ui_DmaBufferUsesize[2]; // which size we may now used for transfer unsigned int ui_DmaBufferUsesize[2]; // which size we may now used for transfer
unsigned int ui_DmaBufferSamples[2]; // size in samples unsigned int ui_DmaBufferSamples[2]; // size in samples
...@@ -427,19 +426,19 @@ typedef struct { ...@@ -427,19 +426,19 @@ typedef struct {
/* Interrupt infos */ /* Interrupt infos */
struct { struct {
ULONG ul_InterruptOccur; /* 0 : No interrupt occur */ unsigned int ul_InterruptOccur; /* 0 : No interrupt occur */
/* > 0 : Interrupt occur */ /* > 0 : Interrupt occur */
unsigned int ui_Read; /* Read FIFO */ unsigned int ui_Read; /* Read FIFO */
unsigned int ui_Write; /* Write FIFO */ unsigned int ui_Write; /* Write FIFO */
struct { struct {
unsigned char b_OldModuleMask; unsigned char b_OldModuleMask;
ULONG ul_OldInterruptMask; /* Interrupt mask */ unsigned int ul_OldInterruptMask; /* Interrupt mask */
ULONG ul_OldCounterLatchValue; /* Interrupt counter value */ unsigned int ul_OldCounterLatchValue; /* Interrupt counter value */
} s_FIFOInterruptParameters[APCI1710_SAVE_INTERRUPT]; } s_FIFOInterruptParameters[APCI1710_SAVE_INTERRUPT];
} s_InterruptParameters; } s_InterruptParameters;
str_ModuleInfo s_ModuleInfo[4]; str_ModuleInfo s_ModuleInfo[4];
ULONG ul_TTLPortConfiguration[10]; unsigned int ul_TTLPortConfiguration[10];
} addi_private; } addi_private;
......
...@@ -256,10 +256,10 @@ void v_APCI1710_Interrupt(int irq, void *d) ...@@ -256,10 +256,10 @@ void v_APCI1710_Interrupt(int irq, void *d)
unsigned char b_TorCounterCpt = 0; unsigned char b_TorCounterCpt = 0;
unsigned char b_PulseIncoderCpt = 0; unsigned char b_PulseIncoderCpt = 0;
unsigned int ui_16BitValue; unsigned int ui_16BitValue;
ULONG ul_InterruptLatchReg = 0; unsigned int ul_InterruptLatchReg = 0;
ULONG ul_LatchRegisterValue = 0; unsigned int ul_LatchRegisterValue = 0;
ULONG ul_82X54InterruptStatus; unsigned int ul_82X54InterruptStatus;
ULONG ul_StatusRegister; unsigned int ul_StatusRegister;
str_ModuleInfo *ps_ModuleInfo; str_ModuleInfo *ps_ModuleInfo;
......
...@@ -89,8 +89,8 @@ int i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subd ...@@ -89,8 +89,8 @@ int i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subd
{ {
unsigned int ui_TmpValue; unsigned int ui_TmpValue;
ULONG ul_Command1 = 0; unsigned int ul_Command1 = 0;
ULONG ul_Command2 = 0; unsigned int ul_Command2 = 0;
devpriv->tsk_Current = current; devpriv->tsk_Current = current;
/*******************************/ /*******************************/
......
...@@ -258,7 +258,7 @@ int i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_su ...@@ -258,7 +258,7 @@ int i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_su
int i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s, int i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data) struct comedi_insn * insn, unsigned int * data)
{ {
ULONG ul_Command = 0; unsigned int ul_Command = 0;
if ((data[0] != 0) && (data[0] != 1)) { if ((data[0] != 0) && (data[0] != 1)) {
comedi_error(dev, comedi_error(dev,
...@@ -567,7 +567,7 @@ int i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subde ...@@ -567,7 +567,7 @@ int i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subde
int i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev, int i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data) struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{ {
ULONG ul_Command1 = 0; unsigned int ul_Command1 = 0;
devpriv->tsk_Current = current; devpriv->tsk_Current = current;
if (data[0] == ADDIDATA_WATCHDOG) { if (data[0] == ADDIDATA_WATCHDOG) {
devpriv->b_TimerSelectMode = ADDIDATA_WATCHDOG; devpriv->b_TimerSelectMode = ADDIDATA_WATCHDOG;
...@@ -666,7 +666,7 @@ int i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev, ...@@ -666,7 +666,7 @@ int i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
/******************************/ /******************************/
ul_Command1 = ul_Command1 =
(ul_Command1 & 0xFFFC19E2UL) | 0x80000UL | (ul_Command1 & 0xFFFC19E2UL) | 0x80000UL |
(ULONG) ((ULONG) data[4] << 16UL); (unsigned int) ((unsigned int) data[4] << 16UL);
outl(ul_Command1, outl(ul_Command1,
devpriv->iobase + ((data[5] - 1) * 0x20) + devpriv->iobase + ((data[5] - 1) * 0x20) +
APCI1564_TCW_PROG); APCI1564_TCW_PROG);
...@@ -721,7 +721,7 @@ int i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev, ...@@ -721,7 +721,7 @@ int i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev, int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data) struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{ {
ULONG ul_Command1 = 0; unsigned int ul_Command1 = 0;
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) { if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
switch (data[1]) { switch (data[1]) {
case 0: //stop the watchdog case 0: //stop the watchdog
...@@ -816,7 +816,7 @@ int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev, ...@@ -816,7 +816,7 @@ int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
int i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev, int i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data) struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{ {
ULONG ul_Command1 = 0; unsigned int ul_Command1 = 0;
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) { if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
// Stores the status of the Watchdog // Stores the status of the Watchdog
...@@ -922,7 +922,7 @@ static void v_APCI1564_Interrupt(int irq, void *d) ...@@ -922,7 +922,7 @@ static void v_APCI1564_Interrupt(int irq, void *d)
unsigned int ui_DO, ui_DI; unsigned int ui_DO, ui_DI;
unsigned int ui_Timer; unsigned int ui_Timer;
unsigned int ui_C1, ui_C2, ui_C3, ui_C4; unsigned int ui_C1, ui_C2, ui_C3, ui_C4;
ULONG ul_Command2 = 0; unsigned int ul_Command2 = 0;
ui_DI = inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP + ui_DI = inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP +
APCI1564_DIGITAL_IP_IRQ) & 0x01; APCI1564_DIGITAL_IP_IRQ) & 0x01;
ui_DO = inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_OP + ui_DO = inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_OP +
......
...@@ -82,7 +82,7 @@ unsigned int ui_InterruptData, ui_Type; ...@@ -82,7 +82,7 @@ unsigned int ui_InterruptData, ui_Type;
int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s, int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data) struct comedi_insn * insn, unsigned int * data)
{ {
ULONG ul_Command = 0; unsigned int ul_Command = 0;
devpriv->tsk_Current = current; devpriv->tsk_Current = current;
if ((data[0] != 0) && (data[0] != 1)) { if ((data[0] != 0) && (data[0] != 1)) {
......
...@@ -94,9 +94,9 @@ static const struct comedi_lrange range_apci3300_ai = { 4, { ...@@ -94,9 +94,9 @@ static const struct comedi_lrange range_apci3300_ai = { 4, {
//END JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values //END JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values
typedef struct { typedef struct {
ULONG ul_NumberOfValue; unsigned int ul_NumberOfValue;
ULONG *pul_ResistanceValue; unsigned int *pul_ResistanceValue;
ULONG *pul_TemperatureValue; unsigned int *pul_TemperatureValue;
} str_ADDIDATA_RTDStruct, *pstr_ADDIDATA_RTDStruct; } str_ADDIDATA_RTDStruct, *pstr_ADDIDATA_RTDStruct;
//BEGIN JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values //BEGIN JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values
......
...@@ -339,7 +339,7 @@ int i_APCI3501_ConfigAnalogOutput(struct comedi_device * dev, struct comedi_subd ...@@ -339,7 +339,7 @@ int i_APCI3501_ConfigAnalogOutput(struct comedi_device * dev, struct comedi_subd
int i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subdevice * s, int i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data) struct comedi_insn * insn, unsigned int * data)
{ {
ULONG ul_Command1 = 0, ul_Channel_no, ul_Polarity, ul_DAC_Ready = 0;; unsigned int ul_Command1 = 0, ul_Channel_no, ul_Polarity, ul_DAC_Ready = 0;;
ul_Channel_no = CR_CHAN(insn->chanspec); ul_Channel_no = CR_CHAN(insn->chanspec);
...@@ -372,9 +372,9 @@ int i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subde ...@@ -372,9 +372,9 @@ int i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subde
if (ul_DAC_Ready) { if (ul_DAC_Ready) {
// Output the Value on the output channels. // Output the Value on the output channels.
ul_Command1 = ul_Command1 =
(ULONG) ((ULONG) (ul_Channel_no & 0xFF) | (unsigned int) ((unsigned int) (ul_Channel_no & 0xFF) |
(ULONG) ((*data << 0x8) & 0x7FFFFF00L) | (unsigned int) ((*data << 0x8) & 0x7FFFFF00L) |
(ULONG) (ul_Polarity)); (unsigned int) (ul_Polarity));
outl(ul_Command1, outl(ul_Command1,
devpriv->iobase + APCI3501_ANALOG_OUTPUT + devpriv->iobase + APCI3501_ANALOG_OUTPUT +
APCI3501_AO_PROG); APCI3501_AO_PROG);
...@@ -413,7 +413,7 @@ int i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subde ...@@ -413,7 +413,7 @@ int i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subde
int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev, int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data) struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{ {
ULONG ul_Command1 = 0; unsigned int ul_Command1 = 0;
devpriv->tsk_Current = current; devpriv->tsk_Current = current;
if (data[0] == ADDIDATA_WATCHDOG) { if (data[0] == ADDIDATA_WATCHDOG) {
...@@ -514,7 +514,7 @@ int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev, ...@@ -514,7 +514,7 @@ int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev,
int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev, int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data) struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{ {
ULONG ul_Command1 = 0; unsigned int ul_Command1 = 0;
int i_Temp; int i_Temp;
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) { if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
...@@ -657,7 +657,7 @@ int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device * dev, ...@@ -657,7 +657,7 @@ int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device * dev,
int i_APCI3501_Reset(struct comedi_device * dev) int i_APCI3501_Reset(struct comedi_device * dev)
{ {
int i_Count = 0, i_temp = 0; int i_Count = 0, i_temp = 0;
ULONG ul_Command1 = 0, ul_Polarity, ul_DAC_Ready = 0; unsigned int ul_Command1 = 0, ul_Polarity, ul_DAC_Ready = 0;
outl(0x0, devpriv->iobase + APCI3501_DIGITAL_OP); outl(0x0, devpriv->iobase + APCI3501_DIGITAL_OP);
outl(1, devpriv->iobase + APCI3501_ANALOG_OUTPUT + outl(1, devpriv->iobase + APCI3501_ANALOG_OUTPUT +
APCI3501_AO_VOLT_MODE); APCI3501_AO_VOLT_MODE);
...@@ -676,9 +676,9 @@ int i_APCI3501_Reset(struct comedi_device * dev) ...@@ -676,9 +676,9 @@ int i_APCI3501_Reset(struct comedi_device * dev)
if (ul_DAC_Ready) { if (ul_DAC_Ready) {
// Output the Value on the output channels. // Output the Value on the output channels.
ul_Command1 = ul_Command1 =
(ULONG) ((ULONG) (i_Count & 0xFF) | (unsigned int) ((unsigned int) (i_Count & 0xFF) |
(ULONG) ((i_temp << 0x8) & 0x7FFFFF00L) | (unsigned int) ((i_temp << 0x8) & 0x7FFFFF00L) |
(ULONG) (ul_Polarity)); (unsigned int) (ul_Polarity));
outl(ul_Command1, outl(ul_Command1,
devpriv->iobase + APCI3501_ANALOG_OUTPUT + devpriv->iobase + APCI3501_ANALOG_OUTPUT +
APCI3501_AO_PROG); APCI3501_AO_PROG);
......
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