|b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_TimerNbr = (unsigned char) CR_CHAN(insn->chanspec);
b_TimerMode = (unsigned char) data[0];
- ul_ReloadValue = (ULONG) data[1];
+ ul_ReloadValue = (unsigned int) data[1];
b_InputClockSelection =(unsigned char) data[2];
b_InputClockLevel =(unsigned char) data[3];
b_OutputLevel =(unsigned char) data[4];
unsigned char b_ModulNbr;
unsigned char b_TimerNbr;
unsigned char b_TimerMode;
- ULONG ul_ReloadValue;
+ unsigned int ul_ReloadValue;
unsigned char b_InputClockSelection;
unsigned char b_InputClockLevel;
unsigned char b_OutputLevel;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_TimerNbr = (unsigned char) CR_CHAN(insn->chanspec);
b_TimerMode = (unsigned char) data[0];
- ul_ReloadValue = (ULONG) data[1];
+ ul_ReloadValue = (unsigned int) data[1];
b_InputClockSelection = (unsigned char) data[2];
b_InputClockLevel = (unsigned char) data[3];
b_OutputLevel = (unsigned char) data[4];
{
int i_ReturnValue = 0;
unsigned char b_ModulNbr, b_ReadType;
- PULONG pul_TimerValueArray;
+ unsigned int * pul_TimerValueArray;
b_ModulNbr = CR_AREF(insn->chanspec);
b_ReadType = CR_CHAN(insn->chanspec);
- pul_TimerValueArray = (PULONG) data;
+ pul_TimerValueArray = (unsigned int *) data;
i_ReturnValue = insn->n;
switch (b_ReadType) {
i_ReturnValue = i_APCI1710_ReadTimerValue(dev,
(unsigned char)CR_AREF(insn->chanspec),
(unsigned char)CR_CHAN(insn->chanspec),
- (PULONG) & data[0]);
+ (unsigned int *) & data[0]);
break;
case APCI1710_TIMER_GETOUTPUTLEVEL:
i_ReturnValue = i_APCI1710_WriteTimerValue(dev,
(unsigned char)CR_AREF(insn->chanspec),
(unsigned char)CR_CHAN(insn->chanspec),
- (ULONG)data[1]);
+ (unsigned int)data[1]);
break;
int i_APCI1710_ReadTimerValue(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- PULONG pul_TimerValue)
+ unsigned int * pul_TimerValue)
{
int i_ReturnValue = 0;
int i_APCI1710_WriteTimerValue(struct comedi_device * dev,
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- ULONG ul_WriteValue)
+ unsigned int ul_WriteValue)
{
int i_ReturnValue = 0;
*/
int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- PULONG pul_TimerValue);
+ unsigned int * pul_TimerValue);
int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
*/
int i_APCI1710_WriteTimerValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
- ULONG ul_WriteValue);
+ unsigned int ul_WriteValue);
struct comedi_insn * insn, unsigned int * data)
{
int i_ReturnValue = 0;
- ULONG ul_TimerValue = 0;
- ULONG ul_TimingInterval = 0;
- ULONG ul_RealTimingInterval = 0;
+ unsigned int ul_TimerValue = 0;
+ unsigned int ul_TimingInterval = 0;
+ unsigned int ul_RealTimingInterval = 0;
double d_RealTimingInterval = 0;
DWORD dw_ModeArray[8] =
{ 0x01, 0x05, 0x00, 0x04, 0x02, 0x0E, 0x0A, 0x06 };
b_ChronoMode = (unsigned char) data[0];
b_PCIInputClock = (unsigned char) data[1];
b_TimingUnit = (unsigned char) data[2];
- ul_TimingInterval = (ULONG) data[3];
+ ul_TimingInterval = (unsigned int) data[3];
i_ReturnValue = insn->n;
/**************************/
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(ul_TimingInterval
*
(0.001 * b_PCIInputClock));
ul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(0.001 * (double)b_PCIInputClock));
if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_TimerValue)
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(ul_TimingInterval
*
(1.0 * b_PCIInputClock));
ul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(1.0 * (double)b_PCIInputClock));
if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_TimerValue)
ul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(1000.0 * (double)b_PCIInputClock));
if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_TimerValue)
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(ul_TimingInterval
*
(1000000.0
ul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(1000000.0
if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_TimerValue)
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(ul_TimingInterval
*
ul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(1000000.0
if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_TimerValue)
i_ReturnValue = i_APCI1710_ReadChronoValue(dev,
(unsigned char) CR_AREF(insn->chanspec),
(unsigned int) insn->unused[0],
- (unsigned char *) & data[0], (PULONG) & data[1]);
+ (unsigned char *) & data[0], (unsigned int *) & data[1]);
break;
case APCI1710_CHRONO_CONVERTVALUE:
i_ReturnValue = i_APCI1710_ConvertChronoValue(dev,
(unsigned char) CR_AREF(insn->chanspec),
- (ULONG) insn->unused[0],
- (PULONG) & data[0],
+ (unsigned int) insn->unused[0],
+ (unsigned int *) & data[0],
(unsigned char *) & data[1],
(unsigned char *) & data[2],
(unsigned int *) & data[3],
| timing witch the |
| function |
| "i_APCI1710_InitChrono" |
-| PULONG pul_ChronoValue : Chronometer timing value. |
+| unsigned int * pul_ChronoValue : Chronometer timing value. |
+----------------------------------------------------------------------------+
| Return Value : 0: No error |
| -1: The handle parameter of the board is wrong |
int i_APCI1710_ReadChronoValue(struct comedi_device * dev,
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;
DWORD dw_Status;
int i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
unsigned char b_ModulNbr,
- ULONG ul_ChronoValue,
- PULONG pul_Hour,
+ unsigned int ul_ChronoValue,
+ unsigned int * pul_Hour,
unsigned char * pb_Minute,
unsigned char * pb_Second,
unsigned int * pui_MilliSecond, unsigned int * pui_MicroSecond, unsigned int * pui_NanoSecond)
/**********************/
d_Hour = d_Hour / (double)60.0;
- *pul_Hour = (ULONG) d_Hour;
+ *pul_Hour = (unsigned int) d_Hour;
/************************/
/* Calculate the minute */
int i_APCI1710_ReadChronoValue(struct comedi_device *dev,
unsigned char b_ModulNbr,
unsigned int ui_TimeOut, unsigned char * pb_ChronoStatus,
- PULONG pul_ChronoValue);
+ unsigned int * pul_ChronoValue);
int i_APCI1710_ConvertChronoValue(struct comedi_device *dev,
unsigned char b_ModulNbr,
- ULONG ul_ChronoValue,
- PULONG pul_Hour,
+ unsigned int ul_ChronoValue,
+ unsigned int * pul_Hour,
unsigned char * pb_Minute,
unsigned char * pb_Second,
unsigned int * pui_MilliSecond, unsigned int * pui_MicroSecond,
i_ReturnValue = i_APCI1710_InitFrequencyMeasurement(dev,
CR_AREF(insn->chanspec),
(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;
default:
unsigned char b_ModulNbr,
unsigned char b_PCIInputClock,
unsigned char b_TimingUnity,
- ULONG ul_TimingInterval, PULONG pul_RealTimingInterval)
+ unsigned int ul_TimingInterval, unsigned int * pul_RealTimingInterval)
{
int i_ReturnValue = 0;
- ULONG ul_TimerValue = 0;
+ unsigned int ul_TimerValue = 0;
double d_RealTimingInterval;
DWORD dw_Status = 0;
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(ul_TimingInterval
*
(0.00025 * b_PCIInputClock));
*pul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(0.00025 * (double)b_PCIInputClock));
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(ul_TimingInterval
*
(0.25 * b_PCIInputClock));
*pul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(0.25 * (double)b_PCIInputClock));
*pul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(250.0 * (double)b_PCIInputClock));
case APCI1710_INCCPT_WRITE32BITCOUNTERVALUE:
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;
/* Write the value */
/*******************/
- outl((ULONG) ((ULONG) (ui_WriteValue) << (16 *
+ outl((unsigned int) ((unsigned int) (ui_WriteValue) << (16 *
b_SelectedCounter)),
devpriv->s_BoardInfos.ui_Address + 8 +
(b_SelectedCounter * 4) +
*/
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_APCI1710_EnableIndex(struct comedi_device * dev, unsigned char b_ModulNbr)
{
int i_ReturnValue = 0;
- ULONG ul_InterruptLatchReg;
+ unsigned int ul_InterruptLatchReg;
/**************************/
/* Test the module number */
case APCI1710_INCCPT_READLATCHREGISTERVALUE:
i_ReturnValue = i_APCI1710_ReadLatchRegisterValue(dev,
(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]);
break;
case APCI1710_INCCPT_READ32BITCOUNTERVALUE:
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;
case APCI1710_INCCPT_GETINDEXSTATUS:
i_ReturnValue = i_APCI1710_ReadFrequencyMeasurement(dev,
(unsigned char) CR_AREF(insn->chanspec),
(unsigned char *) & data[0],
- (unsigned char *) & data[1], (PULONG) & data[2]);
+ (unsigned char *) & data[1], (unsigned int *) & data[2]);
break;
case APCI1710_INCCPT_READINTERRUPT:
*/
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_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_APCI1710_ReadFrequencyMeasurement(struct comedi_device * dev,
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;
unsigned int ui_16BitValue;
unsigned char b_ModulNbr,
unsigned char b_PCIInputClock,
unsigned char b_TimingUnity,
- ULONG ul_TimingInterval,
- PULONG pul_RealTimingInterval);
+ unsigned int ul_TimingInterval,
+ unsigned int * pul_RealTimingInterval);
/* INSN BITS */
int i_APCI1710_ClearCounterValue(struct comedi_device *dev, unsigned char b_ModulNbr);
unsigned int ui_WriteValue);
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_ReadLatchRegisterValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_LatchReg,
- PULONG pul_LatchValue);
+ unsigned int * pul_LatchValue);
int i_APCI1710_Read16BitCounterValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_SelectedCounter,
unsigned int * pui_CounterValue);
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,
unsigned char b_ModulNbr, unsigned char * pb_IndexStatus);
int i_APCI1710_ReadFrequencyMeasurement(struct comedi_device *dev,
unsigned char b_ModulNbr,
unsigned char * pb_Status, unsigned char * pb_UDStatus,
- PULONG pul_ReadValue);
+ unsigned int * pul_ReadValue);
b_PulseEncoderNbr =(unsigned char) data[0];
b_InputLevelSelection =(unsigned char) data[1];
b_TriggerOutputAction =(unsigned char) data[2];
- ul_StartValue =(ULONG) data[3];
+ ul_StartValue =(unsigned int) data[3];
|
+----------------------------------------------------------------------------+
| Output Parameters : - |
unsigned char b_PulseEncoderNbr;
unsigned char b_InputLevelSelection;
unsigned char b_TriggerOutputAction;
- ULONG ul_StartValue;
+ unsigned int ul_StartValue;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_PulseEncoderNbr = (unsigned char) data[0];
b_InputLevelSelection = (unsigned char) data[1];
b_TriggerOutputAction = (unsigned char) data[2];
- ul_StartValue = (ULONG) data[3];
+ ul_StartValue = (unsigned int) data[3];
i_ReturnValue = insn->n;
unsigned char b_PulseEncoderNbr;
unsigned char * pb_Status;
unsigned char b_Type;
- PULONG pul_ReadValue;
- ULONG ul_WriteValue;
+ unsigned int * pul_ReadValue;
+ unsigned int ul_WriteValue;
i_ReturnValue = insn->n;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_Type = (unsigned char) data[0];
b_PulseEncoderNbr = (unsigned char) data[1];
pb_Status = (unsigned char *) & data[0];
- pul_ReadValue = (PULONG) & data[1];
+ pul_ReadValue = (unsigned int *) & data[1];
/***********************************/
/* Test the selected module number */
break;
case APCI1710_PULSEENCODER_WRITE:
- ul_WriteValue = (ULONG) data[2];
+ ul_WriteValue = (unsigned int) data[2];
/*******************/
/* Write the value */
/*******************/
(unsigned char) data[0], //b_PWM
(unsigned char) data[1], // b_ClockSelection
(unsigned char) data[2], // b_TimingUnit
- (ULONG) data[3], //ul_LowTiming
- (ULONG) data[4], //ul_HighTiming
- (PULONG) & data[0], //pul_RealLowTiming
- (PULONG) & data[1] //pul_RealHighTiming
+ (unsigned int) data[3], //ul_LowTiming
+ (unsigned int) data[4], //ul_HighTiming
+ (unsigned int *) & data[0], //pul_RealLowTiming
+ (unsigned int *) & data[1] //pul_RealHighTiming
);
break;
i_ReturnValue = i_APCI1710_GetPWMInitialisation(dev, (unsigned char) CR_AREF(insn->chanspec), // b_ModulNbr
(unsigned char) data[0], //b_PWM
(unsigned char *) & data[0], //pb_TimingUnit
- (PULONG) & data[1], //pul_LowTiming
- (PULONG) & data[2], //pul_HighTiming
+ (unsigned int *) & data[1], //pul_LowTiming
+ (unsigned int *) & data[2], //pul_HighTiming
(unsigned char *) & data[3], // pb_StartLevel
(unsigned char *) & data[4], // pb_StopMode
(unsigned char *) & data[5], // pb_StopLevel
unsigned char b_PWM,
unsigned char b_ClockSelection,
unsigned char b_TimingUnit,
- ULONG ul_LowTiming,
- ULONG ul_HighTiming,
- PULONG pul_RealLowTiming, PULONG pul_RealHighTiming)
+ unsigned int ul_LowTiming,
+ unsigned int ul_HighTiming,
+ unsigned int * pul_RealLowTiming, unsigned int * pul_RealHighTiming)
{
int i_ReturnValue = 0;
- ULONG ul_LowTimerValue = 0;
- ULONG ul_HighTimerValue = 0;
+ unsigned int ul_LowTimerValue = 0;
+ unsigned int ul_HighTimerValue = 0;
DWORD dw_Command;
double d_RealLowTiming = 0;
double d_RealHighTiming = 0;
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_LowTiming
*
(0.00025 * b_ClockSelection));
*pul_RealLowTiming
=
- (ULONG)
+ (unsigned int)
(ul_LowTimerValue
/
(0.00025 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_LowTimerValue)
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_LowTiming
*
(0.25 * b_ClockSelection));
*pul_RealLowTiming
=
- (ULONG)
+ (unsigned int)
(ul_LowTimerValue
/
(0.25 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_LowTimerValue)
*pul_RealLowTiming
=
- (ULONG)
+ (unsigned int)
(ul_LowTimerValue
/
(250.0 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_LowTimerValue)
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_LowTiming
*
(250000.0
*pul_RealLowTiming
=
- (ULONG)
+ (unsigned int)
(ul_LowTimerValue
/
(250000.0
if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_LowTimerValue)
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(ul_LowTiming
*
*pul_RealLowTiming
=
- (ULONG)
+ (unsigned int)
(ul_LowTimerValue
/
(250000.0
if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_LowTimerValue)
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_HighTiming
*
(0.00025 * b_ClockSelection));
*pul_RealHighTiming
=
- (ULONG)
+ (unsigned int)
(ul_HighTimerValue
/
(0.00025 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_HighTimerValue)
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_HighTiming
*
(0.25 * b_ClockSelection));
*pul_RealHighTiming
=
- (ULONG)
+ (unsigned int)
(ul_HighTimerValue
/
(0.25 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_HighTimerValue)
*pul_RealHighTiming
=
- (ULONG)
+ (unsigned int)
(ul_HighTimerValue
/
(250.0 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_HighTimerValue)
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_HighTiming
*
(250000.0
*pul_RealHighTiming
=
- (ULONG)
+ (unsigned int)
(ul_HighTimerValue
/
(250000.0
if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_HighTimerValue)
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(ul_HighTiming
*
*pul_RealHighTiming
=
- (ULONG)
+ (unsigned int)
(ul_HighTimerValue
/
(250000.0
if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_HighTimerValue)
unsigned char b_ModulNbr,
unsigned char b_PWM,
unsigned char * pb_TimingUnit,
- PULONG pul_LowTiming,
- PULONG pul_HighTiming,
+ unsigned int * pul_LowTiming,
+ unsigned int * pul_HighTiming,
unsigned char * pb_StartLevel,
unsigned char * pb_StopMode,
unsigned char * pb_StopLevel,
i_ReturnValue = i_APCI1710_SetNewPWMTiming(dev,
(unsigned char) CR_AREF(insn->chanspec),
(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;
default:
int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
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;
int i_ReturnValue = 0;
- ULONG ul_LowTimerValue = 0;
- ULONG ul_HighTimerValue = 0;
- ULONG ul_RealLowTiming = 0;
- ULONG ul_RealHighTiming = 0;
+ unsigned int ul_LowTimerValue = 0;
+ unsigned int ul_HighTimerValue = 0;
+ unsigned int ul_RealLowTiming = 0;
+ unsigned int ul_RealHighTiming = 0;
DWORD dw_Status;
DWORD dw_Command;
double d_RealLowTiming = 0;
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_LowTiming
*
(0.00025 * b_ClockSelection));
ul_RealLowTiming
=
- (ULONG)
+ (unsigned int)
(ul_LowTimerValue
/
(0.00025 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_LowTimerValue)
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_LowTiming
*
(0.25 * b_ClockSelection));
ul_RealLowTiming
=
- (ULONG)
+ (unsigned int)
(ul_LowTimerValue
/
(0.25 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_LowTimerValue)
ul_RealLowTiming
=
- (ULONG)
+ (unsigned int)
(ul_LowTimerValue
/
(250.0 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_LowTimerValue)
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_LowTiming
*
(250000.0
ul_RealLowTiming
=
- (ULONG)
+ (unsigned int)
(ul_LowTimerValue
/
(250000.0
if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_LowTimerValue)
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(ul_LowTiming
*
ul_RealLowTiming
=
- (ULONG)
+ (unsigned int)
(ul_LowTimerValue
/
(250000.0
if (b_ClockSelection != APCI1710_40MHZ) {
ul_LowTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_LowTimerValue)
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_HighTiming
*
(0.00025 * b_ClockSelection));
ul_RealHighTiming
=
- (ULONG)
+ (unsigned int)
(ul_HighTimerValue
/
(0.00025 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_HighTimerValue)
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_HighTiming
*
(0.25 * b_ClockSelection));
ul_RealHighTiming
=
- (ULONG)
+ (unsigned int)
(ul_HighTimerValue
/
(0.25 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_HighTimerValue)
ul_RealHighTiming
=
- (ULONG)
+ (unsigned int)
(ul_HighTimerValue
/
(250.0 * (double)b_ClockSelection));
if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_HighTimerValue)
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(ul_HighTiming
*
(250000.0
ul_RealHighTiming
=
- (ULONG)
+ (unsigned int)
(ul_HighTimerValue
/
(250000.0
if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_HighTimerValue)
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(ul_HighTiming
*
ul_RealHighTiming
=
- (ULONG)
+ (unsigned int)
(ul_HighTimerValue
/
(250000.0
if (b_ClockSelection != APCI1710_40MHZ) {
ul_HighTimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_HighTimerValue)
unsigned char b_PWM,
unsigned char b_ClockSelection,
unsigned char b_TimingUnit,
- ULONG ul_LowTiming,
- ULONG ul_HighTiming,
- PULONG pul_RealLowTiming, PULONG pul_RealHighTiming);
+ unsigned int ul_LowTiming,
+ unsigned int ul_HighTiming,
+ unsigned int * pul_RealLowTiming, unsigned int * pul_RealHighTiming);
int i_APCI1710_GetPWMInitialisation(struct comedi_device *dev,
unsigned char b_ModulNbr,
unsigned char b_PWM,
unsigned char * pb_TimingUnit,
- PULONG pul_LowTiming,
- PULONG pul_HighTiming,
+ unsigned int * pul_LowTiming,
+ unsigned int * pul_HighTiming,
unsigned char * pb_StartLevel,
unsigned char * pb_StopMode,
unsigned char * pb_StopLevel,
int i_APCI1710_SetNewPWMTiming(struct comedi_device *dev,
unsigned char b_ModulNbr,
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);
b_PositionTurnLength= (unsigned char) data[1];
b_TurnCptLength = (unsigned char) data[2];
b_PCIInputClock = (unsigned char) data[3];
- ul_SSIOutputClock = (ULONG) data[4];
+ ul_SSIOutputClock = (unsigned int) data[4];
b_SSICountingMode = (unsigned char) data[5]; |
+----------------------------------------------------------------------------+
| Output Parameters : - |
unsigned int ui_TimerValue;
unsigned char b_ModulNbr, b_SSIProfile, b_PositionTurnLength, b_TurnCptLength,
b_PCIInputClock, b_SSICountingMode;
- ULONG ul_SSIOutputClock;
+ unsigned int ul_SSIOutputClock;
b_ModulNbr = CR_AREF(insn->chanspec);
b_SSIProfile = (unsigned char) data[0];
b_PositionTurnLength = (unsigned char) data[1];
b_TurnCptLength = (unsigned char) data[2];
b_PCIInputClock = (unsigned char) data[3];
- ul_SSIOutputClock = (ULONG) data[4];
+ ul_SSIOutputClock = (unsigned int) data[4];
b_SSICountingMode = (unsigned char) data[5];
i_ReturnValue = insn->n;
=
(unsigned int)
(
- ((ULONG) (b_PCIInputClock) * 500000UL) / ul_SSIOutputClock);
+ ((unsigned int) (b_PCIInputClock) * 500000UL) / ul_SSIOutputClock);
/************************/
/* Initialise the timer */
| Output Parameters : PULONG_ pul_Position : SSI position in the turn |
| PULONG_ pul_TurnCpt : Number of turns
-pul_Position = (PULONG) &data[0];
- pul_TurnCpt = (PULONG) &data[1]; |
+pul_Position = (unsigned int *) &data[0];
+ pul_TurnCpt = (unsigned int *) &data[1]; |
+----------------------------------------------------------------------------+
| Return Value : 0: No error |
| -1: The handle parameter of the board is wrong |
unsigned char b_ModulNbr;
unsigned char b_SelectedSSI;
unsigned char b_ReadType;
- PULONG pul_Position;
- PULONG pul_TurnCpt;
- PULONG pul_Position1;
- PULONG pul_TurnCpt1;
+ unsigned int * pul_Position;
+ unsigned int * pul_TurnCpt;
+ unsigned int * pul_Position1;
+ unsigned int * pul_TurnCpt1;
i_ReturnValue = insn->n;
- pul_Position1 = (PULONG) & data[0];
+ pul_Position1 = (unsigned int *) & data[0];
// For Read1
- pul_TurnCpt1 = (PULONG) & data[1];
+ pul_TurnCpt1 = (unsigned int *) & data[1];
// For Read all
- pul_Position = (PULONG) & data[0]; //0-2
- pul_TurnCpt = (PULONG) & data[3]; //3-5
+ pul_Position = (unsigned int *) & data[0]; //0-2
+ pul_TurnCpt = (unsigned int *) & data[3]; //3-5
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_SelectedSSI = (unsigned char) CR_CHAN(insn->chanspec);
b_ReadType = (unsigned char) CR_RANGE(insn->chanspec);
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
int i_ReturnValue = 0;
- ULONG ul_TimerValue = 0;
+ unsigned int ul_TimerValue = 0;
DWORD dw_Command;
double d_RealTimingInterval = 0;
unsigned char b_ModulNbr;
unsigned char b_TorCounter;
unsigned char b_PCIInputClock;
unsigned char b_TimingUnit;
- ULONG ul_TimingInterval;
- ULONG ul_RealTimingInterval = 0;
+ unsigned int ul_TimingInterval;
+ unsigned int ul_RealTimingInterval = 0;
i_ReturnValue = insn->n;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_TorCounter = (unsigned char) data[0];
b_PCIInputClock = (unsigned char) data[1];
b_TimingUnit = (unsigned char) data[2];
- ul_TimingInterval = (ULONG) data[3];
+ ul_TimingInterval = (unsigned int) data[3];
printk("INPUT clock %d\n", b_PCIInputClock);
/**************************/
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(ul_TimingInterval
*
(0.00025 * b_PCIInputClock));
ul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(0.00025 * (double)b_PCIInputClock));
if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_TimerValue)
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(ul_TimingInterval
*
(0.25 * b_PCIInputClock));
ul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(0.25 * (double)b_PCIInputClock));
if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_TimerValue)
ul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(250.0 * (double)b_PCIInputClock));
if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_TimerValue)
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(ul_TimingInterval
*
(250000.0
ul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(250000.0
if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_TimerValue)
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(ul_TimingInterval
*
ul_RealTimingInterval
=
- (ULONG)
+ (unsigned int)
(ul_TimerValue
/
(250000.0
if (b_PCIInputClock != APCI1710_40MHZ) {
ul_TimerValue
=
- (ULONG)
+ (unsigned int)
(
(double)
(ul_TimerValue)
| Disable the tor counter |
| interrupt
pb_TimingUnit = (unsigned char *) &data[0];
- pul_TimingInterval = (PULONG) &data[1];
+ pul_TimingInterval = (unsigned int *) &data[1];
pb_InputMode = (unsigned char *) &data[2];
pb_ExternGate = (unsigned char *) &data[3];
pb_CycleMode = (unsigned char *) &data[4];
unsigned char b_ModulNbr;
unsigned char b_TorCounter;
unsigned char * pb_TimingUnit;
- PULONG pul_TimingInterval;
+ unsigned int * pul_TimingInterval;
unsigned char * pb_InputMode;
unsigned char * pb_ExternGate;
unsigned char * pb_CycleMode;
b_TorCounter = CR_CHAN(insn->chanspec);
pb_TimingUnit = (unsigned char *) & data[0];
- pul_TimingInterval = (PULONG) & data[1];
+ pul_TimingInterval = (unsigned int *) & data[1];
pb_InputMode = (unsigned char *) & data[2];
pb_ExternGate = (unsigned char *) & data[3];
pb_CycleMode = (unsigned char *) & data[4];
| function |
| "i_APCI1710_InitTorCounter"|
| 4 : Timeeout occur |
-| PULONG pul_TorCounterValue : Tor counter value.
+| unsigned int * pul_TorCounterValue : Tor counter value.
pb_TorCounterStatus=(unsigned char *) &data[0];
- pul_TorCounterValue=(PULONG) &data[1]; |
+ pul_TorCounterValue=(unsigned int *) &data[1]; |
+----------------------------------------------------------------------------+
| Return Value : 0: No error |
| -1: The handle parameter of the board is wrong |
unsigned char b_ReadType;
unsigned int ui_TimeOut;
unsigned char * pb_TorCounterStatus;
- PULONG pul_TorCounterValue;
+ unsigned int * pul_TorCounterValue;
i_ReturnValue = insn->n;
b_ModulNbr = CR_AREF(insn->chanspec);
b_TorCounter = (unsigned char) data[1];
ui_TimeOut = (unsigned int) data[2];
pb_TorCounterStatus = (unsigned char *) & data[0];
- pul_TorCounterValue = (PULONG) & data[1];
+ pul_TorCounterValue = (unsigned int *) & data[1];
/**************************/
/* Test the module number */
int i_ReturnValue = 0;
DWORD dw_StatusReg;
unsigned char b_ModulNbr;
- PULONG pul_PortValue;
+ unsigned int * pul_PortValue;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
i_ReturnValue = insn->n;
- pul_PortValue = (PULONG) & data[0];
+ pul_PortValue = (unsigned int *) & data[0];
/**************************/
/* Test the module number */
#define SUCCESS 1
/* variable type definition */
-typedef unsigned int ULONG, *PULONG; /* 32-bit */
typedef unsigned int DWORD, *PDWORD; /* 32-bit */
typedef unsigned long ULONG_PTR;
unsigned char b_TimingUnit;
unsigned char b_InterruptEnable;
double d_TimingInterval;
- ULONG ul_RealTimingInterval;
+ unsigned int ul_RealTimingInterval;
} s_TorCounterInfo[2];
unsigned char b_PCIInputClock;
} s_TorCounterModuleInfo;
unsigned char b_InterruptEnable;
double d_LowTiming;
double d_HighTiming;
- ULONG ul_RealLowTiming;
- ULONG ul_RealHighTiming;
+ unsigned int ul_RealLowTiming;
+ unsigned int ul_RealHighTiming;
} s_PWMInfo[2];
unsigned char b_ClockSelection;
} s_PWMModuleInfo;
unsigned char b_TimingUnit;
unsigned char b_ClockSelection;
double d_TimingInterval;
- ULONG ul_Timing;
+ unsigned int ul_Timing;
} s_ETMModuleInfo;
/* CDA infos */
unsigned short us_UseDma; // To use Dma or not
unsigned char b_DmaDoubleBuffer; // we can use double buffering
unsigned int ui_DmaActualBuffer; // which buffer is used now
- //*UPDATE-0.7.57->0.7.68
- //ULONG ul_DmaBufferVirtual[2];// pointers to begin of DMA buffer
+ /* UPDATE-0.7.57->0.7.68 */
+ /* unsigned int 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_DmaBufferUsesize[2]; // which size we may now used for transfer
unsigned int ui_DmaBufferSamples[2]; // size in samples
/* Interrupt infos */
struct {
- ULONG ul_InterruptOccur; /* 0 : No interrupt occur */
+ unsigned int ul_InterruptOccur; /* 0 : No interrupt occur */
/* > 0 : Interrupt occur */
unsigned int ui_Read; /* Read FIFO */
unsigned int ui_Write; /* Write FIFO */
struct {
unsigned char b_OldModuleMask;
- ULONG ul_OldInterruptMask; /* Interrupt mask */
- ULONG ul_OldCounterLatchValue; /* Interrupt counter value */
+ unsigned int ul_OldInterruptMask; /* Interrupt mask */
+ unsigned int ul_OldCounterLatchValue; /* Interrupt counter value */
} s_FIFOInterruptParameters[APCI1710_SAVE_INTERRUPT];
} s_InterruptParameters;
str_ModuleInfo s_ModuleInfo[4];
- ULONG ul_TTLPortConfiguration[10];
+ unsigned int ul_TTLPortConfiguration[10];
} addi_private;
unsigned char b_TorCounterCpt = 0;
unsigned char b_PulseIncoderCpt = 0;
unsigned int ui_16BitValue;
- ULONG ul_InterruptLatchReg = 0;
- ULONG ul_LatchRegisterValue = 0;
- ULONG ul_82X54InterruptStatus;
- ULONG ul_StatusRegister;
+ unsigned int ul_InterruptLatchReg = 0;
+ unsigned int ul_LatchRegisterValue = 0;
+ unsigned int ul_82X54InterruptStatus;
+ unsigned int ul_StatusRegister;
str_ModuleInfo *ps_ModuleInfo;
{
unsigned int ui_TmpValue;
- ULONG ul_Command1 = 0;
- ULONG ul_Command2 = 0;
+ unsigned int ul_Command1 = 0;
+ unsigned int ul_Command2 = 0;
devpriv->tsk_Current = current;
/*******************************/
int i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- ULONG ul_Command = 0;
+ unsigned int ul_Command = 0;
if ((data[0] != 0) && (data[0] != 1)) {
comedi_error(dev,
int i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
- ULONG ul_Command1 = 0;
+ unsigned int ul_Command1 = 0;
devpriv->tsk_Current = current;
if (data[0] == ADDIDATA_WATCHDOG) {
devpriv->b_TimerSelectMode = ADDIDATA_WATCHDOG;
/******************************/
ul_Command1 =
(ul_Command1 & 0xFFFC19E2UL) | 0x80000UL |
- (ULONG) ((ULONG) data[4] << 16UL);
+ (unsigned int) ((unsigned int) data[4] << 16UL);
outl(ul_Command1,
devpriv->iobase + ((data[5] - 1) * 0x20) +
APCI1564_TCW_PROG);
int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
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) {
switch (data[1]) {
case 0: //stop the watchdog
int i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
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) {
// Stores the status of the Watchdog
unsigned int ui_DO, ui_DI;
unsigned int ui_Timer;
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 +
APCI1564_DIGITAL_IP_IRQ) & 0x01;
ui_DO = inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_OP +
int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- ULONG ul_Command = 0;
+ unsigned int ul_Command = 0;
devpriv->tsk_Current = current;
if ((data[0] != 0) && (data[0] != 1)) {
//END JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values
typedef struct {
- ULONG ul_NumberOfValue;
- ULONG *pul_ResistanceValue;
- ULONG *pul_TemperatureValue;
+ unsigned int ul_NumberOfValue;
+ unsigned int *pul_ResistanceValue;
+ unsigned int *pul_TemperatureValue;
} str_ADDIDATA_RTDStruct, *pstr_ADDIDATA_RTDStruct;
//BEGIN JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values
int i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subdevice * s,
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);
if (ul_DAC_Ready) {
// Output the Value on the output channels.
ul_Command1 =
- (ULONG) ((ULONG) (ul_Channel_no & 0xFF) |
- (ULONG) ((*data << 0x8) & 0x7FFFFF00L) |
- (ULONG) (ul_Polarity));
+ (unsigned int) ((unsigned int) (ul_Channel_no & 0xFF) |
+ (unsigned int) ((*data << 0x8) & 0x7FFFFF00L) |
+ (unsigned int) (ul_Polarity));
outl(ul_Command1,
devpriv->iobase + APCI3501_ANALOG_OUTPUT +
APCI3501_AO_PROG);
int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
- ULONG ul_Command1 = 0;
+ unsigned int ul_Command1 = 0;
devpriv->tsk_Current = current;
if (data[0] == ADDIDATA_WATCHDOG) {
int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
- ULONG ul_Command1 = 0;
+ unsigned int ul_Command1 = 0;
int i_Temp;
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
int i_APCI3501_Reset(struct comedi_device * dev)
{
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(1, devpriv->iobase + APCI3501_ANALOG_OUTPUT +
APCI3501_AO_VOLT_MODE);
if (ul_DAC_Ready) {
// Output the Value on the output channels.
ul_Command1 =
- (ULONG) ((ULONG) (i_Count & 0xFF) |
- (ULONG) ((i_temp << 0x8) & 0x7FFFFF00L) |
- (ULONG) (ul_Polarity));
+ (unsigned int) ((unsigned int) (i_Count & 0xFF) |
+ (unsigned int) ((i_temp << 0x8) & 0x7FFFFF00L) |
+ (unsigned int) (ul_Polarity));
outl(ul_Command1,
devpriv->iobase + APCI3501_ANALOG_OUTPUT +
APCI3501_AO_PROG);