case APCI1710_CHRONO_READVALUE:
i_ReturnValue = i_APCI1710_ReadChronoValue(dev,
(unsigned char) CR_AREF(insn->chanspec),
- (UINT) insn->unused[0],
+ (unsigned int) insn->unused[0],
(unsigned char *) & data[0], (PULONG) & data[1]);
break;
(PULONG) & data[0],
(unsigned char *) & data[1],
(unsigned char *) & data[2],
- (PUINT) & data[3],
- (PUINT) & data[4], (PUINT) & data[5]);
+ (unsigned int *) & data[3],
+ (unsigned int *) & data[4], (unsigned int *) & data[5]);
break;
case APCI1710_CHRONO_READINTERRUPT:
| Function Name : _INT_ i_APCI1710_ReadChronoValue |
| (unsigned char_ b_BoardHandle, |
| unsigned char_ b_ModulNbr, |
-| UINT_ ui_TimeOut, |
+| unsigned int_ ui_TimeOut, |
| unsigned char *_ pb_ChronoStatus, |
| PULONG_ pul_ChronoValue) |
+----------------------------------------------------------------------------+
int i_APCI1710_ReadChronoValue(struct comedi_device * dev,
unsigned char b_ModulNbr,
- UINT ui_TimeOut, unsigned char * pb_ChronoStatus, PULONG pul_ChronoValue)
+ unsigned int ui_TimeOut, unsigned char * pb_ChronoStatus, PULONG pul_ChronoValue)
{
int i_ReturnValue = 0;
DWORD dw_Status;
| PULONG_ pul_Hour, |
| unsigned char *_ pb_Minute, |
| unsigned char *_ pb_Second, |
-| PUINT_ pui_MilliSecond, |
-| PUINT_ pui_MicroSecond, |
-| PUINT_ pui_NanoSecond) |
+| unsigned int *_ pui_MilliSecond, |
+| unsigned int *_ pui_MicroSecond, |
+| unsigned int *_ pui_NanoSecond) |
+----------------------------------------------------------------------------+
| Task : Convert the chronometer measured timing |
| (ul_ChronoValue) in to h, mn, s, ms, µs, ns. |
| Output Parameters : PULONG_ pul_Hour : Chronometer timing hour |
| unsigned char *_ pb_Minute : Chronometer timing minute |
| unsigned char *_ pb_Second : Chronometer timing second |
-| PUINT_ pui_MilliSecond : Chronometer timing mini |
+| unsigned int *_ pui_MilliSecond : Chronometer timing mini |
| second |
-| PUINT_ pui_MicroSecond : Chronometer timing micro |
+| unsigned int *_ pui_MicroSecond : Chronometer timing micro |
| second |
-| PUINT_ pui_NanoSecond : Chronometer timing nano |
+| unsigned int *_ pui_NanoSecond : Chronometer timing nano |
| second |
+----------------------------------------------------------------------------+
| Return Value : 0: No error |
PULONG pul_Hour,
unsigned char * pb_Minute,
unsigned char * pb_Second,
- PUINT pui_MilliSecond, PUINT pui_MicroSecond, PUINT pui_NanoSecond)
+ unsigned int * pui_MilliSecond, unsigned int * pui_MicroSecond, unsigned int * pui_NanoSecond)
{
int i_ReturnValue = 0;
double d_Hour;
d_MilliSecond = d_Second - *pb_Second;
d_MilliSecond = d_MilliSecond * 1000;
- *pui_MilliSecond = (UINT) d_MilliSecond;
+ *pui_MilliSecond = (unsigned int) d_MilliSecond;
/******************************/
/* Calculate the micro second */
d_MilliSecond -
*pui_MilliSecond;
d_MicroSecond = d_MicroSecond * 1000;
- *pui_MicroSecond = (UINT) d_MicroSecond;
+ *pui_MicroSecond = (unsigned int) d_MicroSecond;
/******************************/
/* Calculate the micro second */
d_MicroSecond -
*pui_MicroSecond;
d_NanoSecond = d_NanoSecond * 1000;
- *pui_NanoSecond = (UINT) d_NanoSecond;
+ *pui_NanoSecond = (unsigned int) d_NanoSecond;
break;
}
int i_APCI1710_ReadChronoValue(struct comedi_device *dev,
unsigned char b_ModulNbr,
- UINT ui_TimeOut, unsigned char * pb_ChronoStatus,
+ unsigned int ui_TimeOut, unsigned char * pb_ChronoStatus,
PULONG pul_ChronoValue);
int i_APCI1710_ConvertChronoValue(struct comedi_device *dev,
PULONG pul_Hour,
unsigned char * pb_Minute,
unsigned char * pb_Second,
- PUINT pui_MilliSecond, PUINT pui_MicroSecond,
- PUINT pui_NanoSecond);
+ unsigned int * pui_MilliSecond, unsigned int * pui_MicroSecond,
+ unsigned int * pui_NanoSecond);
/*
* CHRONOMETER DIGITAL INPUT OUTPUT FUNCTION
int i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_ConfigType;
+ unsigned int ui_ConfigType;
int i_ReturnValue = 0;
ui_ConfigType = CR_CHAN(insn->chanspec);
case APCI1710_INCCPT_INITCOMPARELOGIC:
i_ReturnValue = i_APCI1710_InitCompareLogic(dev,
- CR_AREF(insn->chanspec), (UINT) data[0]);
+ CR_AREF(insn->chanspec), (unsigned int) data[0]);
break;
case APCI1710_INCCPT_INITFREQUENCYMEASUREMENT:
| Function Name : _INT_ i_APCI1710_InitCompareLogic |
| (unsigned char_ b_BoardHandle, |
| unsigned char_ b_ModulNbr, |
- | UINT_ ui_CompareValue) |
+ | unsigned int_ ui_CompareValue) |
+----------------------------------------------------------------------------+
| Task : Set the 32-Bit compare value. At that moment that the |
| incremental counter arrive to the compare value |
| Input Parameters : unsigned char_ b_BoardHandle : Handle of board APCI-1710 |
| unsigned char_ b_ModulNbr : Module number to configure |
| (0 to 3) |
- | UINT_ ui_CompareValue : 32-Bit compare value |
+ | unsigned int_ ui_CompareValue : 32-Bit compare value |
+----------------------------------------------------------------------------+
| Output Parameters : -
+----------------------------------------------------------------------------+
*/
int i_APCI1710_InitCompareLogic(struct comedi_device * dev,
- unsigned char b_ModulNbr, UINT ui_CompareValue)
+ unsigned char b_ModulNbr, unsigned int ui_CompareValue)
{
int i_ReturnValue = 0;
int i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_BitsType;
+ unsigned int ui_BitsType;
int i_ReturnValue = 0;
ui_BitsType = CR_CHAN(insn->chanspec);
devpriv->tsk_Current = current; // Save the current process task structure
int i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_WriteType;
+ unsigned int ui_WriteType;
int i_ReturnValue = 0;
ui_WriteType = CR_CHAN(insn->chanspec);
case APCI1710_INCCPT_WRITE16BITCOUNTERVALUE:
i_ReturnValue = i_APCI1710_Write16BitCounterValue(dev,
(unsigned char) CR_AREF(insn->chanspec),
- (unsigned char) data[0], (UINT) data[1]);
+ (unsigned char) data[0], (unsigned int) data[1]);
break;
case APCI1710_INCCPT_WRITE32BITCOUNTERVALUE:
| (unsigned char_ b_BoardHandle |
| unsigned char_ b_ModulNbr, |
| unsigned char_ b_SelectedCounter, |
-| UINT_ ui_WriteValue) |
+| unsigned int_ ui_WriteValue) |
+----------------------------------------------------------------------------+
| Task : Write a 16-Bit value (ui_WriteValue) in to the selected|
| 16-Bit counter (b_SelectedCounter) from selected module|
| (0 to 3) |
| unsigned char_ b_SelectedCounter : Selected 16-Bit counter |
| (0 or 1) |
-| UINT_ ui_WriteValue : 16-Bit write value |
+| unsigned int_ ui_WriteValue : 16-Bit write value |
+----------------------------------------------------------------------------+
| Output Parameters : - |
+----------------------------------------------------------------------------+
*/
int i_APCI1710_Write16BitCounterValue(struct comedi_device * dev,
- unsigned char b_ModulNbr, unsigned char b_SelectedCounter, UINT ui_WriteValue)
+ unsigned char b_ModulNbr, unsigned char b_SelectedCounter, unsigned int ui_WriteValue)
{
int i_ReturnValue = 0;
int i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_ReadType;
+ unsigned int ui_ReadType;
int i_ReturnValue = 0;
ui_ReadType = CR_CHAN(insn->chanspec);
case APCI1710_INCCPT_READ16BITCOUNTERVALUE:
i_ReturnValue = i_APCI1710_Read16BitCounterValue(dev,
(unsigned char) CR_AREF(insn->chanspec),
- (unsigned char) CR_RANGE(insn->chanspec), (PUINT) & data[0]);
+ (unsigned char) CR_RANGE(insn->chanspec), (unsigned int *) & data[0]);
break;
case APCI1710_INCCPT_READ32BITCOUNTERVALUE:
| (unsigned char_ b_BoardHandle, |
| unsigned char_ b_ModulNbr, |
| unsigned char_ b_SelectedCounter, |
-| PUINT_ pui_CounterValue) |
+| unsigned int *_ pui_CounterValue) |
+----------------------------------------------------------------------------+
| Task : Latch the selected 16-Bit counter (b_SelectedCounter) |
| from selected module (b_ModulNbr) in to the first |
| unsigned char_ b_SelectedCounter : Selected 16-Bit counter |
| (0 or 1) |
+----------------------------------------------------------------------------+
-| Output Parameters : PUINT_ pui_CounterValue : 16-Bit counter value |
+| Output Parameters : unsigned int *_ pui_CounterValue : 16-Bit counter value |
+----------------------------------------------------------------------------+
| Return Value : 0: No error |
| -1: The handle parameter of the board is wrong |
*/
int i_APCI1710_Read16BitCounterValue(struct comedi_device * dev,
- unsigned char b_ModulNbr, unsigned char b_SelectedCounter, PUINT pui_CounterValue)
+ unsigned char b_ModulNbr, unsigned char b_SelectedCounter, unsigned int * pui_CounterValue)
{
int i_ReturnValue = 0;
DWORD dw_LathchValue = 0;
ui_Address + 4 + (64 * b_ModulNbr));
*pui_CounterValue =
- (UINT) ((dw_LathchValue >> (16 *
+ (unsigned int) ((dw_LathchValue >> (16 *
b_SelectedCounter)) &
0xFFFFU);
} else {
unsigned char * pb_Status, unsigned char * pb_UDStatus, PULONG pul_ReadValue)
{
int i_ReturnValue = 0;
- UINT ui_16BitValue;
+ unsigned int ui_16BitValue;
DWORD dw_StatusReg;
/**************************/
if ((*pul_ReadValue & 0xFFFFU) != 0) {
ui_16BitValue
=
- (UINT)
+ (unsigned int)
*
pul_ReadValue
&
if ((*pul_ReadValue & 0xFFFF0000UL) != 0) {
ui_16BitValue
=
- (UINT)
+ (unsigned int)
(
(*pul_ReadValue
>>
if ((*pul_ReadValue & 0xFFFF0000UL) != 0) {
ui_16BitValue
=
- (UINT)
+ (unsigned int)
(
(*pul_ReadValue
>>
if ((*pul_ReadValue & 0xFFFFU) != 0) {
ui_16BitValue
=
- (UINT)
+ (unsigned int)
*
pul_ReadValue
&
unsigned char b_ExternalStrobeLevel);
int i_APCI1710_InitCompareLogic(struct comedi_device *dev,
- unsigned char b_ModulNbr, UINT ui_CompareValue);
+ unsigned char b_ModulNbr, unsigned int ui_CompareValue);
int i_APCI1710_InitFrequencyMeasurement(struct comedi_device *dev,
unsigned char b_ModulNbr,
int i_APCI1710_Write16BitCounterValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_SelectedCounter,
- UINT ui_WriteValue);
+ unsigned int ui_WriteValue);
int i_APCI1710_Write32BitCounterValue(struct comedi_device *dev,
unsigned char b_ModulNbr, ULONG ul_WriteValue);
int i_APCI1710_Read16BitCounterValue(struct comedi_device *dev,
unsigned char b_ModulNbr, unsigned char b_SelectedCounter,
- PUINT pui_CounterValue);
+ unsigned int * pui_CounterValue);
int i_APCI1710_Read32BitCounterValue(struct comedi_device *dev,
unsigned char b_ModulNbr, PULONG pul_CounterValue);
struct comedi_insn * insn, unsigned int * data)
{
int i_ReturnValue = 0;
- UINT ui_TimerValue;
+ unsigned int ui_TimerValue;
unsigned char b_ModulNbr, b_SSIProfile, b_PositionTurnLength, b_TurnCptLength,
b_PCIInputClock, b_SSICountingMode;
ULONG ul_SSIOutputClock;
ui_TimerValue
=
- (UINT)
+ (unsigned int)
(
((ULONG) (b_PCIInputClock) * 500000UL) / ul_SSIOutputClock);
DPRINTK("Module number error\n");
i_ReturnValue = -2;
}
- data[0] = (UINT) ul_RealTimingInterval;
+ data[0] = (unsigned int) ul_RealTimingInterval;
return (i_ReturnValue);
}
| (unsigned char_ b_BoardHandle, |
| unsigned char_ b_ModulNbr, |
| unsigned char_ b_TorCounter, |
-| UINT_ ui_TimeOut, |
+| unsigned int_ ui_TimeOut, |
| unsigned char *_ pb_TorCounterStatus, |
| PULONG_ pul_TorCounterValue) |
+----------------------------------------------------------------------------+
b_ModulNbr = CR_AREF(insn->chanspec);
b_ReadType = (unsigned char) data[0];
b_TorCounter = (unsigned char) data[1];
- ui_TimeOut = (UINT) data[2]; |
+ ui_TimeOut = (unsigned int) data[2]; |
+----------------------------------------------------------------------------+
| Output Parameters : unsigned char *_ pb_TorCounterStatus : Return the tor counter |
| status. |
unsigned char b_ModulNbr;
unsigned char b_TorCounter;
unsigned char b_ReadType;
- UINT ui_TimeOut;
+ unsigned int ui_TimeOut;
unsigned char * pb_TorCounterStatus;
PULONG pul_TorCounterValue;
b_ModulNbr = CR_AREF(insn->chanspec);
b_ReadType = (unsigned char) data[0];
b_TorCounter = (unsigned char) data[1];
- ui_TimeOut = (UINT) data[2];
+ ui_TimeOut = (unsigned int) data[2];
pb_TorCounterStatus = (unsigned char *) & data[0];
pul_TorCounterValue = (PULONG) & data[1];
DWORD dw_StatusReg = 0;
unsigned char b_ModulNbr;
unsigned char b_OutputChannel;
- UINT ui_State;
+ unsigned int ui_State;
i_ReturnValue = insn->n;
b_ModulNbr = CR_AREF(insn->chanspec);
#define SUCCESS 1
/* variable type definition */
-typedef unsigned int UINT, *PUINT;
typedef int LONG, *PLONG; /* 32-bit */
typedef unsigned int ULONG, *PULONG; /* 32-bit */
typedef unsigned int DWORD, *PDWORD; /* 32-bit */
#define MAKEWORD(H, L) (unsigned short)((L) | ((H) << 8))
#define LOWORD(W) (unsigned short)((W) & 0xFFFF)
#define HIWORD(W) (unsigned short)(((W) >> 16) & 0xFFFF)
-#define MAKEDWORD(H, L) (UINT)((L) | ((H) << 16))
+#define MAKEDWORD(H, L) (unsigned int)((L) | ((H) << 16))
#define ADDI_ENABLE 1
#define ADDI_DISABLE 0
int i_Dma; // dma present or not
int i_Timer; // timer subdevice present or not
unsigned char b_AvailableConvertUnit;
- UINT ui_MinAcquisitiontimeNs; // Minimum Acquisition in Nano secs
- UINT ui_MinDelaytimeNs; // Minimum Delay in Nano secs
+ unsigned int ui_MinAcquisitiontimeNs; // Minimum Acquisition in Nano secs
+ unsigned int ui_MinDelaytimeNs; // Minimum Delay in Nano secs
/* interrupt and reset */
void (*v_hwdrv_Interrupt)(int irq, void *d);
unsigned char b_ValidDriver; // driver is ok
unsigned char b_AiContinuous; // we do unlimited AI
unsigned char b_AiInitialisation;
- UINT ui_AiActualScan; //how many scans we finished
- UINT ui_AiBufferPtr; // data buffer ptr in samples
- UINT ui_AiNbrofChannels; // how many channels is measured
- UINT ui_AiScanLength; // Length of actual scanlist
- UINT ui_AiActualScanPosition; // position in actual scan
- PUINT pui_AiChannelList; // actual chanlist
- UINT ui_AiChannelList[32]; // actual chanlist
+ unsigned int ui_AiActualScan; //how many scans we finished
+ unsigned int ui_AiBufferPtr; // data buffer ptr in samples
+ unsigned int ui_AiNbrofChannels; // how many channels is measured
+ unsigned int ui_AiScanLength; // Length of actual scanlist
+ unsigned int ui_AiActualScanPosition; // position in actual scan
+ unsigned int * pui_AiChannelList; // actual chanlist
+ unsigned int ui_AiChannelList[32]; // actual chanlist
unsigned char b_AiChannelConfiguration[32]; // actual chanlist
- UINT ui_AiReadData[32];
+ unsigned int ui_AiReadData[32];
DWORD dw_AiInitialised;
- UINT ui_AiTimer0; //Timer Constant for Timer0
- UINT ui_AiTimer1; //Timer constant for Timer1
- UINT ui_AiFlags;
- UINT ui_AiDataLength;
+ unsigned int ui_AiTimer0; //Timer Constant for Timer0
+ unsigned int ui_AiTimer1; //Timer constant for Timer1
+ unsigned int ui_AiFlags;
+ unsigned int ui_AiDataLength;
short *AiData; // Pointer to sample data
- UINT ui_AiNbrofScans; // number of scans to do
+ unsigned int ui_AiNbrofScans; // number of scans to do
unsigned short us_UseDma; // To use Dma or not
unsigned char b_DmaDoubleBuffer; // we can use double buffering
- UINT ui_DmaActualBuffer; // which buffer is used now
+ 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
short *ul_DmaBufferVirtual[2]; // pointers to begin of DMA buffer
ULONG ul_DmaBufferHw[2]; // hw address of DMA buff
- UINT ui_DmaBufferSize[2]; // size of dma buffer in bytes
- UINT ui_DmaBufferUsesize[2]; // which size we may now used for transfer
- UINT ui_DmaBufferSamples[2]; // size in samples
- UINT ui_DmaBufferPages[2]; // number of pages in buffer
+ 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
+ unsigned int ui_DmaBufferPages[2]; // number of pages in buffer
unsigned char b_DigitalOutputRegister; // Digital Output Register
unsigned char b_OutputMemoryStatus;
unsigned char b_AnalogInputChannelNbr; // Analog input channel Nbr
unsigned char b_AiCyclicAcquisition; // indicate cyclic acquisition
unsigned char b_InterruptMode; // eoc eos or dma
unsigned char b_EocEosInterrupt; // Enable disable eoc eos interrupt
- UINT ui_EocEosConversionTime;
+ unsigned int ui_EocEosConversionTime;
unsigned char b_EocEosConversionTimeBase;
unsigned char b_SingelDiff;
unsigned char b_ExttrigEnable; /* To enable or disable external trigger */
/* Hardware board infos for 1710 */
struct {
- UINT ui_Address; /* Board address */
- UINT ui_FlashAddress;
+ unsigned int ui_Address; /* Board address */
+ unsigned int ui_FlashAddress;
unsigned char b_InterruptNbr; /* Board interrupt number */
unsigned char b_SlotNumber; /* PCI slot number */
unsigned char b_BoardVersion;
struct {
ULONG ul_InterruptOccur; /* 0 : No interrupt occur */
/* > 0 : Interrupt occur */
- UINT ui_Read; /* Read FIFO */
- UINT ui_Write; /* Write FIFO */
+ unsigned int ui_Read; /* Read FIFO */
+ unsigned int ui_Write; /* Write FIFO */
struct {
unsigned char b_OldModuleMask;
ULONG ul_OldInterruptMask; /* Interrupt mask */
char *pc_PCIChipInformation, struct comedi_device *dev)
{
unsigned short w_Temp, i, w_Count = 0;
- UINT ui_Temp;
+ unsigned int ui_Temp;
str_MainHeader s_MainHeader;
str_DigitalInputHeader s_DigitalInputHeader;
str_DigitalOutputHeader s_DigitalOutputHeader;
s_AnalogInputHeader.w_Nchannel;
this_board->i_Dma = s_AnalogInputHeader.b_HasDma;
this_board->ui_MinAcquisitiontimeNs =
- (UINT) s_AnalogInputHeader.w_MinConvertTiming *
+ (unsigned int) s_AnalogInputHeader.w_MinConvertTiming *
1000;
this_board->ui_MinDelaytimeNs =
- (UINT) s_AnalogInputHeader.w_MinDelayTiming *
+ (unsigned int) s_AnalogInputHeader.w_MinDelayTiming *
1000;
ui_Temp = 0xffff;
this_board->i_AiMaxdata =
unsigned char b_PWMCpt = 0;
unsigned char b_TorCounterCpt = 0;
unsigned char b_PulseIncoderCpt = 0;
- UINT ui_16BitValue;
+ unsigned int ui_16BitValue;
ULONG ul_InterruptLatchReg = 0;
ULONG ul_LatchRegisterValue = 0;
ULONG ul_82X54InterruptStatus;
if ((ul_LatchRegisterValue &
0xFFFFU) != 0) {
ui_16BitValue =
- (UINT)
+ (unsigned int)
ul_LatchRegisterValue
& 0xFFFFU;
ul_LatchRegisterValue =
0xFFFF0000UL) !=
0) {
ui_16BitValue =
- (UINT) (
+ (unsigned int) (
(ul_LatchRegisterValue
>> 16) &
0xFFFFU);
if ((ul_LatchRegisterValue &
0xFFFF0000UL) != 0) {
ui_16BitValue =
- (UINT) (
+ (unsigned int) (
(ul_LatchRegisterValue
>> 16) &
0xFFFFU);
if ((ul_LatchRegisterValue & 0xFFFFU) !=
0) {
ui_16BitValue =
- (UINT)
+ (unsigned int)
ul_LatchRegisterValue &
0xFFFFU;
ul_LatchRegisterValue =
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[0] : 0 Configure As Timer |
int i_APCI035_ConfigTimerWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Status = 0;
- UINT ui_Command = 0;
- UINT ui_Mode = 0;
+ unsigned int ui_Status = 0;
+ unsigned int ui_Command = 0;
+ unsigned int ui_Mode = 0;
i_Temp = 0;
devpriv->tsk_Current = current;
devpriv->b_TimerSelectMode = data[0];
| Task : Start / Stop The Selected Timer , or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[0] : 0 - Stop Selected Timer/Watchdog |
int i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Command = 0;
+ unsigned int ui_Command = 0;
int i_Count = 0;
if (data[0] == 1) {
ui_Command =
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| |
int i_APCI035_ReadTimerWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Status = 0; // Status register
+ unsigned int ui_Status = 0; // Status register
i_WatchdogNbr = insn->unused[0];
/******************/
/* Get the status */
| Task : Read value of the selected channel |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To read |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To read |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
| data[0] : Digital Value Of Input |
int i_APCI035_ReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_CommandRegister = 0;
+ unsigned int ui_CommandRegister = 0;
/******************/
/* Set the start */
/******************/
static void v_APCI035_Interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
- UINT ui_StatusRegister1 = 0;
- UINT ui_StatusRegister2 = 0;
- UINT ui_ReadCommand = 0;
- UINT ui_ChannelNumber = 0;
- UINT ui_DigitalTemperature = 0;
+ unsigned int ui_StatusRegister1 = 0;
+ unsigned int ui_StatusRegister2 = 0;
+ unsigned int ui_ReadCommand = 0;
+ unsigned int ui_ChannelNumber = 0;
+ unsigned int ui_DigitalTemperature = 0;
if (i_Temp == 1) {
i_WatchdogNbr = i_Flag;
i_Flag = i_Flag + 1;
int i_Coupling;
int i_SingleDiff;
int i_AutoCalibration;
- UINT ui_ReloadValue;
- UINT ui_TimeUnitReloadVal;
+ unsigned int ui_ReloadValue;
+ unsigned int ui_TimeUnitReloadVal;
int i_Interrupt;
int i_ModuleSelection;
} Config_Parameters_Main;
#include "hwdrv_apci1032.h"
#include <linux/delay.h>
//Global variables
-UINT ui_InterruptStatus = 0;
+unsigned int ui_InterruptStatus = 0;
/*
+----------------------------------------------------------------------------+
int i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_TmpValue;
+ unsigned int ui_TmpValue;
ULONG ul_Command1 = 0;
ULONG ul_Command2 = 0;
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_Channel : Channel number to read |
+| unsigned int ui_Channel : Channel number to read |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
int i_APCI1032_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_TmpValue = 0;
- UINT ui_Channel;
+ unsigned int ui_TmpValue = 0;
+ unsigned int ui_Channel;
ui_Channel = CR_CHAN(insn->chanspec);
if (ui_Channel >= 0 && ui_Channel <= 31) {
- ui_TmpValue = (UINT) inl(devpriv->iobase + APCI1032_DIGITAL_IP);
+ ui_TmpValue = (unsigned int) inl(devpriv->iobase + APCI1032_DIGITAL_IP);
// since only 1 channel reqd to bring it to last bit it is rotated
// 8 +(chan - 1) times then ANDed with 1 for last bit.
*data = (ui_TmpValue >> ui_Channel) & 0x1;
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To be Read |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To be Read |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI1032_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_PortValue = data[0];
- UINT ui_Mask = 0;
- UINT ui_NoOfChannels;
+ unsigned int ui_PortValue = data[0];
+ unsigned int ui_Mask = 0;
+ unsigned int ui_NoOfChannels;
ui_NoOfChannels = CR_CHAN(insn->chanspec);
if (data[1] == 0) {
- *data = (UINT) inl(devpriv->iobase + APCI1032_DIGITAL_IP);
+ *data = (unsigned int) inl(devpriv->iobase + APCI1032_DIGITAL_IP);
switch (ui_NoOfChannels) {
case 2:
ui_Mask = 3;
{
struct comedi_device *dev = d;
- UINT ui_Temp;
+ unsigned int ui_Temp;
//disable the interrupt
ui_Temp = inl(devpriv->iobase + APCI1032_DIGITAL_IP_IRQ);
outl(ui_Temp & APCI1032_DIGITAL_IP_INTERRUPT_DISABLE,
| Task : Allows or disallows a port event |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_Channel : Channel number to read |
+| unsigned int ui_Channel : Channel number to read |
| unsigned int *data : Data Pointer to read status |
data[0] :0 Start input event
1 Stop input event
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_Channel : Channel number to read |
+| unsigned int ui_Channel : Channel number to read |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To be Read |
-| UINT *data : Data Pointer
+| unsigned int ui_NoOfChannels : No Of Channels To be Read |
+| unsigned int *data : Data Pointer
data[0] : 0 Read a single channel
1 read a port value
data[1] : port value
int i_APCI1500_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_PortValue = data[1];
- UINT ui_Mask = 0;
- UINT ui_Channel;
- UINT ui_TmpValue = 0;
+ unsigned int ui_PortValue = data[1];
+ unsigned int ui_Mask = 0;
+ unsigned int ui_Channel;
+ unsigned int ui_TmpValue = 0;
ui_Channel = CR_CHAN(insn->chanspec);
switch (data[0]) {
case 0:
if (ui_Channel >= 0 && ui_Channel <= 15) {
ui_TmpValue =
- (UINT) inw(devpriv->i_IobaseAddon +
+ (unsigned int) inw(devpriv->i_IobaseAddon +
APCI1500_DIGITAL_IP);
*data = (ui_TmpValue >> ui_Channel) & 0x1;
} //if(ui_Channel >= 0 && ui_Channel <=15)
break;
case 1:
- *data = (UINT) inw(devpriv->i_IobaseAddon +
+ *data = (unsigned int) inw(devpriv->i_IobaseAddon +
APCI1500_DIGITAL_IP);
switch (ui_Channel) {
case 2:
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To Write |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To Write |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI1500_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- static UINT ui_Temp = 0;
- UINT ui_Temp1;
+ static unsigned int ui_Temp = 0;
+ unsigned int ui_Temp1;
- UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+ unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
if (!devpriv->b_OutputMemoryStatus) {
ui_Temp = 0;
int i_APCI1500_ConfigureInterrupt(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Status;
+ unsigned int ui_Status;
int i_RegValue;
int i_Constant;
devpriv->tsk_Current = current;
{
struct comedi_device *dev = d;
- UINT ui_InterruptStatus = 0;
+ unsigned int ui_InterruptStatus = 0;
int i_RegValue = 0;
i_InterruptMask = 0;
/* Reads port B */
/****************/
i_RegValue =
- inb((UINT) devpriv->iobase +
+ inb((unsigned int) devpriv->iobase +
APCI1500_Z8536_PORT_B);
i_RegValue = i_RegValue & 0xC0;
int i_APCI1516_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_TmpValue = 0;
- UINT ui_Channel;
+ unsigned int ui_TmpValue = 0;
+ unsigned int ui_Channel;
ui_Channel = CR_CHAN(insn->chanspec);
if (ui_Channel >= 0 && ui_Channel <= 7) {
- ui_TmpValue = (UINT) inw(devpriv->iobase + APCI1516_DIGITAL_IP);
+ ui_TmpValue = (unsigned int) inw(devpriv->iobase + APCI1516_DIGITAL_IP);
// since only 1 channel reqd to bring it to last bit it is rotated
// 8 +(chan - 1) times then ANDed with 1 for last bit.
*data = (ui_TmpValue >> ui_Channel) & 0x1;
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_PortValue = data[0];
- UINT ui_Mask = 0;
- UINT ui_NoOfChannels;
+ unsigned int ui_PortValue = data[0];
+ unsigned int ui_Mask = 0;
+ unsigned int ui_NoOfChannels;
ui_NoOfChannels = CR_CHAN(insn->chanspec);
- *data = (UINT) inw(devpriv->iobase + APCI1516_DIGITAL_IP);
+ *data = (unsigned int) inw(devpriv->iobase + APCI1516_DIGITAL_IP);
switch (ui_NoOfChannels) {
case 2:
ui_Mask = 3;
int i_APCI1516_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp, ui_Temp1;
- UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+ unsigned int ui_Temp, ui_Temp1;
+ unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
printk("EL311003 : @=%x\n", devpriv->iobase + APCI1516_DIGITAL_OP);
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp;
- UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+ unsigned int ui_Temp;
+ unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
ui_Temp = data[0];
*data = inw(devpriv->iobase + APCI1516_DIGITAL_OP_RW);
if (ui_Temp == 0) {
#include "hwdrv_apci1564.h"
//Global variables
-UINT ui_InterruptStatus_1564 = 0;
-UINT ui_InterruptData, ui_Type;
+unsigned int ui_InterruptStatus_1564 = 0;
+unsigned int ui_InterruptData, ui_Type;
/*
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_Channel : Channel number to read |
+| unsigned int ui_Channel : Channel number to read |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
int i_APCI1564_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_TmpValue = 0;
- UINT ui_Channel;
+ unsigned int ui_TmpValue = 0;
+ unsigned int ui_Channel;
ui_Channel = CR_CHAN(insn->chanspec);
if (ui_Channel >= 0 && ui_Channel <= 31) {
ui_TmpValue =
- (UINT) inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP);
+ (unsigned int) inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP);
// since only 1 channel reqd to bring it to last bit it is rotated
// 8 +(chan - 1) times then ANDed with 1 for last bit.
*data = (ui_TmpValue >> ui_Channel) & 0x1;
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To be Read |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To be Read |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_PortValue = data[0];
- UINT ui_Mask = 0;
- UINT ui_NoOfChannels;
+ unsigned int ui_PortValue = data[0];
+ unsigned int ui_Mask = 0;
+ unsigned int ui_NoOfChannels;
ui_NoOfChannels = CR_CHAN(insn->chanspec);
if (data[1] == 0) {
- *data = (UINT) inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP);
+ *data = (unsigned int) inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP);
switch (ui_NoOfChannels) {
case 2:
ui_Mask = 3;
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[1] : 1 Enable VCC Interrupt |
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To Write |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To Write |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI1564_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp, ui_Temp1;
- UINT ui_NoOfChannel;
+ unsigned int ui_Temp, ui_Temp1;
+ unsigned int ui_NoOfChannel;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
if (devpriv->b_OutputMemoryStatus) {
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To read |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To read |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp;
- UINT ui_NoOfChannel;
+ unsigned int ui_Temp;
+ unsigned int ui_NoOfChannel;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
ui_Temp = data[0];
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[0] : 0 Configure As Timer |
| Task : Start / Stop The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[0] : 0 Timer |
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
static void v_APCI1564_Interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
- UINT ui_DO, ui_DI;
- UINT ui_Timer;
- UINT ui_C1, ui_C2, ui_C3, ui_C4;
+ unsigned int ui_DO, ui_DI;
+ unsigned int ui_Timer;
+ unsigned int ui_C1, ui_C2, ui_C3, ui_C4;
ULONG ul_Command2 = 0;
ui_DI = inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP +
APCI1564_DIGITAL_IP_IRQ) & 0x01;
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[0] : 1 Digital Memory On |
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To Write |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To Write |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI2016_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_NoOfChannel;
- UINT ui_Temp, ui_Temp1;
+ unsigned int ui_NoOfChannel;
+ unsigned int ui_Temp, ui_Temp1;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
if ((ui_NoOfChannel < 0) || (ui_NoOfChannel > 15)) {
comedi_error(dev,
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To read |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To read |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI2016_BitsDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp;
- UINT ui_NoOfChannel;
+ unsigned int ui_Temp;
+ unsigned int ui_NoOfChannel;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
if ((ui_NoOfChannel < 0) || (ui_NoOfChannel > 15)) {
comedi_error(dev,
*/
#include "hwdrv_apci2032.h"
-UINT ui_InterruptData, ui_Type;
+unsigned int ui_InterruptData, ui_Type;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ConfigDigitalOutput |
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[1] : 1 Enable VCC Interrupt |
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To Write |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To Write |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI2032_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp, ui_Temp1;
- UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+ unsigned int ui_Temp, ui_Temp1;
+ unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
if (devpriv->b_OutputMemoryStatus) {
ui_Temp = inl(devpriv->iobase + APCI2032_DIGITAL_OP);
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To read |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To read |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI2032_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp;
- UINT ui_NoOfChannel;
+ unsigned int ui_Temp;
+ unsigned int ui_NoOfChannel;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
ui_Temp = data[0];
*data = inl(devpriv->iobase + APCI2032_DIGITAL_OP_RW);
int i_APCI2200_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_TmpValue = 0;
- UINT ui_Channel;
+ unsigned int ui_TmpValue = 0;
+ unsigned int ui_Channel;
ui_Channel = CR_CHAN(insn->chanspec);
if (ui_Channel >= 0 && ui_Channel <= 7) {
- ui_TmpValue = (UINT) inw(devpriv->iobase + APCI2200_DIGITAL_IP);
+ ui_TmpValue = (unsigned int) inw(devpriv->iobase + APCI2200_DIGITAL_IP);
*data = (ui_TmpValue >> ui_Channel) & 0x1;
} //if(ui_Channel >= 0 && ui_Channel <=7)
else {
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_PortValue = data[0];
- UINT ui_Mask = 0;
- UINT ui_NoOfChannels;
+ unsigned int ui_PortValue = data[0];
+ unsigned int ui_Mask = 0;
+ unsigned int ui_NoOfChannels;
ui_NoOfChannels = CR_CHAN(insn->chanspec);
- *data = (UINT) inw(devpriv->iobase + APCI2200_DIGITAL_IP);
+ *data = (unsigned int) inw(devpriv->iobase + APCI2200_DIGITAL_IP);
switch (ui_NoOfChannels) {
case 2:
ui_Mask = 3;
int i_APCI2200_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp, ui_Temp1;
- UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+ unsigned int ui_Temp, ui_Temp1;
+ unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
if (devpriv->b_OutputMemoryStatus) {
ui_Temp = inw(devpriv->iobase + APCI2200_DIGITAL_OP);
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp;
- UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+ unsigned int ui_Temp;
+ unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
ui_Temp = data[0];
*data = inw(devpriv->iobase + APCI2200_DIGITAL_OP);
if (ui_Temp == 0) {
*/
#include "hwdrv_apci3120.h"
-static UINT ui_Temp = 0;
+static unsigned int ui_Temp = 0;
// FUNCTION DEFINITIONS
int i_APCI3120_InsnConfigAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT i;
+ unsigned int i;
if ((data[0] != APCI3120_EOC_MODE) && (data[0] != APCI3120_EOS_MODE))
return -1;
i++) {
//Read the result in FIFO and write them in shared memory
us_TmpValue = inw(devpriv->iobase);
- data[i] = (UINT) us_TmpValue;
+ data[i] = (unsigned int) us_TmpValue;
}
devpriv->b_InterruptMode = APCI3120_EOC_MODE; // Restore defaults.
struct comedi_subdevice * s)
{
unsigned char b_Tmp;
- UINT ui_Tmp, ui_DelayTiming = 0, ui_TimerValue1 = 0, dmalen0 =
+ unsigned int ui_Tmp, ui_DelayTiming = 0, ui_TimerValue1 = 0, dmalen0 =
0, dmalen1 = 0, ui_TimerValue2 =
0, ui_TimerValue0, ui_ConvertTiming;
unsigned short us_TmpValue;
if((us_TmpValue & 0x00B0)==0x00B0)
{
f_ConvertValue=(((float)ui_ConvertTiming * 0.002) - 2);
- ui_TimerValue0=(UINT)f_ConvertValue;
+ ui_TimerValue0=(unsigned int)f_ConvertValue;
if (mode==2)
{
f_DelayValue = (((float)ui_DelayTiming * 0.00002) - 2);
- ui_TimerValue1 = (UINT) f_DelayValue;
+ ui_TimerValue1 = (unsigned int) f_DelayValue;
}
}
else
{
f_ConvertValue=(((float)ui_ConvertTiming * 0.0012926) - 1);
- ui_TimerValue0=(UINT)f_ConvertValue;
+ ui_TimerValue0=(unsigned int)f_ConvertValue;
if (mode == 2)
{
f_DelayValue = (((float)ui_DelayTiming * 0.000012926) - 1);
- ui_TimerValue1 = (UINT) f_DelayValue;
+ ui_TimerValue1 = (unsigned int) f_DelayValue;
}
}
***********************************************************************************************/
// Read the AI Value
devpriv->ui_AiReadData[0] =
- (UINT) inw(devpriv->iobase + 0);
+ (unsigned int) inw(devpriv->iobase + 0);
devpriv->b_EocEosInterrupt = APCI3120_DISABLE;
send_sig(SIGIO, devpriv->tsk_Current, 0); // send signal to the sample
} else {
i++) {
us_TmpValue = inw(devpriv->iobase + 0);
devpriv->ui_AiReadData[i] =
- (UINT) us_TmpValue;
+ (unsigned int) us_TmpValue;
}
devpriv->b_EocEosInterrupt = APCI3120_DISABLE;
devpriv->b_InterruptMode = APCI3120_EOC_MODE;
unsigned int next_dma_buf, samplesinbuf;
unsigned long low_word, high_word, var;
- UINT ui_Tmp;
+ unsigned int ui_Tmp;
samplesinbuf =
devpriv->ui_DmaBufferUsesize[devpriv->ui_DmaActualBuffer] -
inl(devpriv->i_IobaseAmcc + AMCC_OP_REG_MWTC);
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Timervalue2;
+ unsigned int ui_Timervalue2;
unsigned short us_TmpValue;
unsigned char b_Tmp;
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Timervalue2 = 0;
+ unsigned int ui_Timervalue2 = 0;
unsigned short us_TmpValue;
unsigned char b_Tmp;
us_TmpValue_2 = inw(devpriv->iobase + APCI3120_TIMER_VALUE);
// combining both words
- data[0] = (UINT) ((us_TmpValue) | ((us_TmpValue_2) << 16));
+ data[0] = (unsigned int) ((us_TmpValue) | ((us_TmpValue_2) << 16));
} else // Read watch dog status
{
struct comedi_insn *insn,
unsigned int *data)
{
- UINT ui_Chan, ui_TmpValue;
+ unsigned int ui_Chan, ui_TmpValue;
ui_Chan = CR_CHAN(insn->chanspec); // channel specified
//this_board->i_hwdrv_InsnReadDigitalInput(dev,ui_Chan,data);
if (ui_Chan >= 0 && ui_Chan <= 3) {
- ui_TmpValue = (UINT) inw(devpriv->iobase + APCI3120_RD_STATUS);
+ ui_TmpValue = (unsigned int) inw(devpriv->iobase + APCI3120_RD_STATUS);
// since only 1 channel reqd to bring it to last bit it is rotated
// 8 +(chan - 1) times then ANDed with 1 for last bit.
int i_APCI3120_InsnBitsDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_TmpValue;
- ui_TmpValue = (UINT) inw(devpriv->iobase + APCI3120_RD_STATUS);
+ unsigned int ui_TmpValue;
+ ui_TmpValue = (unsigned int) inw(devpriv->iobase + APCI3120_RD_STATUS);
/***** state of 4 channels in the 11, 10, 9, 8 bits of status reg
rotated right 8 times to bring them to last four bits
ANDed with oxf for value.
unsigned int *data)
{
- UINT ui_Temp1;
+ unsigned int ui_Temp1;
- UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+ unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
if ((data[0] != 0) && (data[0] != 1)) {
comedi_error(dev,
struct comedi_insn *insn,
unsigned int *data)
{
- UINT ui_Range, ui_Channel;
+ unsigned int ui_Range, ui_Channel;
unsigned short us_TmpValue;
ui_Range = CR_RANGE(insn->chanspec);
typedef struct {
unsigned char b_Type; /* EOC or EOS */
unsigned char b_InterruptFlag; /* Interrupt use or not */
- UINT ui_ConvertTiming; /* Selection of the convertion time */
+ unsigned int ui_ConvertTiming; /* Selection of the convertion time */
unsigned char b_NbrOfChannel; /* Number of channel to read */
- UINT ui_ChannelList[MAX_ANALOGINPUT_CHANNELS]; /* Number of the channel to be read */
- UINT ui_RangeList[MAX_ANALOGINPUT_CHANNELS]; /* Gain of each channel */
+ unsigned int ui_ChannelList[MAX_ANALOGINPUT_CHANNELS]; /* Number of the channel to be read */
+ unsigned int ui_RangeList[MAX_ANALOGINPUT_CHANNELS]; /* Gain of each channel */
} str_AnalogReadInformation;
int i_LastChannel;
int i_Sum=0;
int i_Offset;
- UINT ui_Channel_num=0;
+ unsigned int ui_Channel_num=0;
static int i_Count=0;
int i_Initialised=0;
- UINT ui_InterruptChannelValue[96]; //Buffer
+ unsigned int ui_InterruptChannelValue[96]; //Buffer
*/
str_BoardInfos s_BoardInfos[100]; // 100 will be the max number of boards to be used
//END JK 06.07.04: Management of sevrals boards
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | UINT ui_NoOfChannels : No Of Channels To read for Port
+ | unsigned int ui_NoOfChannels : No Of Channels To read for Port
Channel Numberfor single channel
- | UINT data[0] : 0: Read single channel
+ | unsigned int data[0] : 0: Read single channel
1: Read port value
data[1] Port number
+----------------------------------------------------------------------------+
int i_APCI3200_ReadDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp = 0;
- UINT ui_NoOfChannel = 0;
+ unsigned int ui_Temp = 0;
+ unsigned int ui_NoOfChannel = 0;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
ui_Temp = data[0];
*data = inl(devpriv->i_IobaseReserved);
int i_APCI3200_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp = 0, ui_Temp1 = 0;
- UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+ unsigned int ui_Temp = 0, ui_Temp1 = 0;
+ unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
if (devpriv->b_OutputMemoryStatus) {
ui_Temp = inl(devpriv->i_IobaseAddon);
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | UINT ui_NoOfChannels : No Of Channels To read |
- | UINT *data : Data Pointer to read status |
+ | unsigned int ui_NoOfChannels : No Of Channels To read |
+ | unsigned int *data : Data Pointer to read status |
data[0] :0 read single channel
1 read port value
data[1] port no
int i_APCI3200_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp;
- UINT ui_NoOfChannel;
+ unsigned int ui_Temp;
+ unsigned int ui_NoOfChannel;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
ui_Temp = data[0];
*data = inl(devpriv->i_IobaseAddon);
struct comedi_insn * insn, unsigned int * data)
{
- UINT ul_Config = 0, ul_Temp = 0;
- UINT ui_ChannelNo = 0;
- UINT ui_Dummy = 0;
+ unsigned int ul_Config = 0, ul_Temp = 0;
+ unsigned int ui_ChannelNo = 0;
+ unsigned int ui_Dummy = 0;
int i_err = 0;
//Begin JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values
| Task : Read value of the selected channel |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | UINT ui_NoOfChannels : No Of Channels To read |
- | UINT *data : Data Pointer to read status |
+ | unsigned int ui_NoOfChannels : No Of Channels To read |
+ | unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
| data[0] : Digital Value Of Input |
int i_APCI3200_ReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_DummyValue = 0;
+ unsigned int ui_DummyValue = 0;
int i_ConvertCJCCalibration;
int i = 0;
| Task : Read value of the selected channel |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | UINT ui_NoOfChannel : Channel No to read |
- | UINT *data : Data Pointer to read status |
+ | unsigned int ui_NoOfChannel : Channel No to read |
+ | unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
| data[0] : Digital Value read |
int i_APCI3200_Read1AnalogInputChannel(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_EOC = 0;
- UINT ui_ChannelNo = 0;
- UINT ui_CommandRegister = 0;
+ unsigned int ui_EOC = 0;
+ unsigned int ui_ChannelNo = 0;
+ unsigned int ui_CommandRegister = 0;
//BEGIN JK 06.07.04: Management of sevrals boards
//ui_ChannelNo=i_ChannelNo;
| Task : Read calibration offset value of the selected channel|
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | UINT *data : Data Pointer to read status |
+ | unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
| data[0] : Calibration offset Value |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device * dev, UINT * data)
+int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device * dev, unsigned int * data)
{
- UINT ui_Temp = 0, ui_EOC = 0;
- UINT ui_CommandRegister = 0;
+ unsigned int ui_Temp = 0, ui_EOC = 0;
+ unsigned int ui_CommandRegister = 0;
//BEGIN JK 06.07.04: Management of sevrals boards
//while (((inl(devpriv->iobase+i_Offset+12)>>19) & 1) != 1);
| Task : Read calibration gain value of the selected channel |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | UINT *data : Data Pointer to read status |
+ | unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
| data[0] : Calibration gain Value Of Input |
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_ReadCalibrationGainValue(struct comedi_device * dev, UINT * data)
+int i_APCI3200_ReadCalibrationGainValue(struct comedi_device * dev, unsigned int * data)
{
- UINT ui_EOC = 0;
+ unsigned int ui_EOC = 0;
int ui_CommandRegister = 0;
//while (((inl(devpriv->iobase+i_Offset+12)>>19) & 1) != 1);
| Task : Read CJC value of the selected channel |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | UINT *data : Data Pointer to read status |
+ | unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
| data[0] : CJC Value |
int i_APCI3200_ReadCJCValue(struct comedi_device * dev, unsigned int * data)
{
- UINT ui_EOC = 0;
+ unsigned int ui_EOC = 0;
int ui_CommandRegister = 0;
/******************************/
| Task : Read CJC calibration offset value of the selected channel
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | UINT *data : Data Pointer to read status |
+ | unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
| data[0] : CJC calibration offset Value
*/
int i_APCI3200_ReadCJCCalOffset(struct comedi_device * dev, unsigned int * data)
{
- UINT ui_EOC = 0;
+ unsigned int ui_EOC = 0;
int ui_CommandRegister = 0;
/*******************************************/
/*Read calibration offset value for the CJC */
| Task : Read CJC calibration gain value
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
- | UINT ui_NoOfChannels : No Of Channels To read |
- | UINT *data : Data Pointer to read status |
+ | unsigned int ui_NoOfChannels : No Of Channels To read |
+ | unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
| data[0] : CJC calibration gain value
*/
int i_APCI3200_ReadCJCCalGain(struct comedi_device * dev, unsigned int * data)
{
- UINT ui_EOC = 0;
+ unsigned int ui_EOC = 0;
int ui_CommandRegister = 0;
/*******************************/
/* Set the convert timing unit */
int i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Configuration = 0;
+ unsigned int ui_Configuration = 0;
int i_Temp; //,i_TimeUnit;
//if(i_Initialised==0)
int err = 0;
int tmp; // divisor1,divisor2;
- UINT ui_ConvertTime = 0;
- UINT ui_ConvertTimeBase = 0;
- UINT ui_DelayTime = 0;
- UINT ui_DelayTimeBase = 0;
+ unsigned int ui_ConvertTime = 0;
+ unsigned int ui_ConvertTimeBase = 0;
+ unsigned int ui_DelayTime = 0;
+ unsigned int ui_DelayTimeBase = 0;
int i_Triggermode = 0;
int i_TriggerEdge = 0;
int i_NbrOfChannel = 0;
int i_APCI3200_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_subdevice * s)
{
- UINT ui_Configuration = 0;
+ unsigned int ui_Configuration = 0;
//i_InterruptFlag=0;
//i_Initialised=0;
//i_Count=0;
int i_APCI3200_CommandAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s)
{
struct comedi_cmd *cmd = &s->async->cmd;
- UINT ui_Configuration = 0;
+ unsigned int ui_Configuration = 0;
//INT i_CurrentSource = 0;
- UINT ui_Trigger = 0;
- UINT ui_TriggerEdge = 0;
- UINT ui_Triggermode = 0;
- UINT ui_ScanMode = 0;
- UINT ui_ConvertTime = 0;
- UINT ui_ConvertTimeBase = 0;
- UINT ui_DelayTime = 0;
- UINT ui_DelayTimeBase = 0;
- UINT ui_DelayMode = 0;
+ unsigned int ui_Trigger = 0;
+ unsigned int ui_TriggerEdge = 0;
+ unsigned int ui_Triggermode = 0;
+ unsigned int ui_ScanMode = 0;
+ unsigned int ui_ConvertTime = 0;
+ unsigned int ui_ConvertTimeBase = 0;
+ unsigned int ui_DelayTime = 0;
+ unsigned int ui_DelayTimeBase = 0;
+ unsigned int ui_DelayMode = 0;
//i_FirstChannel=cmd->chanlist[0];
//i_LastChannel=cmd->chanlist[1];
s_BoardInfos[dev->minor].i_FirstChannel = cmd->chanlist[0];
void v_APCI3200_Interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
- UINT ui_StatusRegister = 0;
- UINT ui_ChannelNumber = 0;
+ unsigned int ui_StatusRegister = 0;
+ unsigned int ui_ChannelNumber = 0;
int i_CalibrationFlag = 0;
int i_CJCFlag = 0;
- UINT ui_DummyValue = 0;
- UINT ui_DigitalTemperature = 0;
- UINT ui_DigitalInput = 0;
+ unsigned int ui_DummyValue = 0;
+ unsigned int ui_DigitalTemperature = 0;
+ unsigned int ui_DigitalInput = 0;
int i_ConvertCJCCalibration;
//BEGIN JK TEST
*/
int i_APCI3200_InterruptHandleEos(struct comedi_device * dev)
{
- UINT ui_StatusRegister = 0;
+ unsigned int ui_StatusRegister = 0;
struct comedi_subdevice *s = dev->subdevices + 0;
//BEGIN JK 18.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68
s_BoardInfos[dev->minor].i_Count = -1;
- //async->buf_int_count+=(i_LastChannel-i_FirstChannel+4)*sizeof(UINT);
+ //async->buf_int_count+=(i_LastChannel-i_FirstChannel+4)*sizeof(unsigned int);
//Begin JK 18.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68
- //async->buf_int_count+=(s_BoardInfos [dev->minor].i_LastChannel-s_BoardInfos [dev->minor].i_FirstChannel+4)*sizeof(UINT);
+ //async->buf_int_count+=(s_BoardInfos [dev->minor].i_LastChannel-s_BoardInfos [dev->minor].i_FirstChannel+4)*sizeof(unsigned int);
//End JK 18.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68
- //async->buf_int_ptr+=(i_LastChannel-i_FirstChannel+4)*sizeof(UINT);
+ //async->buf_int_ptr+=(i_LastChannel-i_FirstChannel+4)*sizeof(unsigned int);
//Begin JK 18.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68
- //async->buf_int_ptr+=(s_BoardInfos [dev->minor].i_LastChannel-s_BoardInfos [dev->minor].i_FirstChannel+4)*sizeof(UINT);
+ //async->buf_int_ptr+=(s_BoardInfos [dev->minor].i_LastChannel-s_BoardInfos [dev->minor].i_FirstChannel+4)*sizeof(unsigned int);
//comedi_eos(dev,s);
// Set the event type (Comedi Buffer End Of Scan)
int i_Coupling;
int i_SingleDiff;
int i_AutoCalibration;
- UINT ui_ReloadValue;
- UINT ui_TimeUnitReloadVal;
+ unsigned int ui_ReloadValue;
+ unsigned int ui_TimeUnitReloadVal;
int i_Interrupt;
int i_ModuleSelection;
} Config_Parameters_Module1, Config_Parameters_Module2,
int i_LastChannel;
int i_Sum;
int i_Offset;
- UINT ui_Channel_num;
+ unsigned int ui_Channel_num;
int i_Count;
int i_Initialised;
//UINT ui_InterruptChannelValue[96]; //Buffer
- UINT ui_InterruptChannelValue[144]; //Buffer
+ unsigned int ui_InterruptChannelValue[144]; //Buffer
unsigned char b_StructInitialized;
//Begin JK 19.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68
unsigned int ui_ScanValueArray[7 + 12]; // 7 is the maximal number of channels
int i_APCI3200_ReadCJCCalOffset(struct comedi_device *dev, unsigned int *data);
int i_APCI3200_ReadCJCValue(struct comedi_device *dev, unsigned int *data);
-int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev, UINT *data);
-int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev, UINT *data);
+int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev, unsigned int *data);
+int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev, unsigned int *data);
int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data);
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To read |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To read |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI3501_ReadDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp;
- UINT ui_NoOfChannel;
+ unsigned int ui_Temp;
+ unsigned int ui_NoOfChannel;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
ui_Temp = data[0];
*data = inl(devpriv->iobase + APCI3501_DIGITAL_IP);
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[1] : 1 Enable VCC Interrupt |
int i_APCI3501_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp, ui_Temp1;
- UINT ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
+ unsigned int ui_Temp, ui_Temp1;
+ unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); // get the channel
if (devpriv->b_OutputMemoryStatus) {
ui_Temp = inl(devpriv->iobase + APCI3501_DIGITAL_OP);
} //if(devpriv->b_OutputMemoryStatus )
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT ui_NoOfChannels : No Of Channels To read |
-| UINT *data : Data Pointer to read status |
+| unsigned int ui_NoOfChannels : No Of Channels To read |
+| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
int i_APCI3501_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
- UINT ui_Temp;
- UINT ui_NoOfChannel;
+ unsigned int ui_Temp;
+ unsigned int ui_NoOfChannel;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
ui_Temp = data[0];
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[0] : 0 Configure As Timer |
| Task : Start / Stop The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[0] : 0 Timer |
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev : Driver handle |
-| UINT *data : Data Pointer contains |
+| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
| data[0] : 0 Timer |
devpriv->
ui_EocEosConversionTime
=
- (UINT)
+ (unsigned int)
dw_ReloadValue;
devpriv->
b_EocEosConversionTimeBase
b_CopyCpt < devpriv->ui_AiNbrofChannels;
b_CopyCpt++) {
devpriv->ui_AiReadData[b_CopyCpt] =
- (UINT) readl((void *)(devpriv->
+ (unsigned int) readl((void *)(devpriv->
dw_AiBase + 28));
}