Commit 1783fbfe authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: comedi: Remove BYTE and *PBYTE typedefs in addi-data

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2ec9f875
......@@ -54,20 +54,20 @@ INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice
* 82X54 READ & WRITE FUNCTION
*/
INT i_APCI1710_ReadTimerValue(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
PULONG pul_TimerValue);
INT i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
PBYTE pb_OutputLevel);
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
unsigned char * pb_OutputLevel);
INT i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
PBYTE pb_TimerStatus);
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
unsigned char * pb_TimerStatus);
/*
* 82X54 WRITE FUNCTION
*/
INT i_APCI1710_WriteTimerValue(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
ULONG ul_WriteValue);
......@@ -50,19 +50,19 @@ INT i_APCI1710_InsnReadChrono(struct comedi_device *dev, struct comedi_subdevice
struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_GetChronoProgressStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_ChronoStatus);
unsigned char b_ModulNbr, unsigned char * pb_ChronoStatus);
INT i_APCI1710_ReadChronoValue(struct comedi_device *dev,
BYTE b_ModulNbr,
UINT ui_TimeOut, PBYTE pb_ChronoStatus,
unsigned char b_ModulNbr,
UINT ui_TimeOut, unsigned char * pb_ChronoStatus,
PULONG pul_ChronoValue);
INT i_APCI1710_ConvertChronoValue(struct comedi_device *dev,
BYTE b_ModulNbr,
unsigned char b_ModulNbr,
ULONG ul_ChronoValue,
PULONG pul_Hour,
PBYTE pb_Minute,
PBYTE pb_Second,
unsigned char * pb_Minute,
unsigned char * pb_Second,
PUINT pui_MilliSecond, PUINT pui_MicroSecond,
PUINT pui_NanoSecond);
......
......@@ -70,14 +70,14 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
| I/O. |
+----------------------------------------------------------------------------+
| Input Parameters : |
| BYTE_ b_ModulNbr data[0]: Module number to |
| unsigned char_ b_ModulNbr data[0]: Module number to |
| configure (0 to 3) |
| BYTE_ b_ChannelAMode data[1] : Channel A mode selection |
| unsigned char_ b_ChannelAMode data[1] : Channel A mode selection |
| 0 : Channel used for digital |
| input |
| 1 : Channel used for digital |
| output |
| BYTE_ b_ChannelBMode data[2] : Channel B mode selection |
| unsigned char_ b_ChannelBMode data[2] : Channel B mode selection |
| 0 : Channel used for digital |
| input |
| 1 : Channel used for digital |
......@@ -102,16 +102,16 @@ Activates and deactivates the digital output memory.
INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
BYTE b_ModulNbr, b_ChannelAMode, b_ChannelBMode;
BYTE b_MemoryOnOff, b_ConfigType;
unsigned char b_ModulNbr, b_ChannelAMode, b_ChannelBMode;
unsigned char b_MemoryOnOff, b_ConfigType;
INT i_ReturnValue = 0;
DWORD dw_WriteConfig = 0;
b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
b_ConfigType = (BYTE) data[0]; // Memory or Init
b_ChannelAMode = (BYTE) data[1];
b_ChannelBMode = (BYTE) data[2];
b_MemoryOnOff = (BYTE) data[1]; // if memory operation
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_ConfigType = (unsigned char) data[0]; // Memory or Init
b_ChannelAMode = (unsigned char) data[1];
b_ChannelBMode = (unsigned char) data[2];
b_MemoryOnOff = (unsigned char) data[1]; // if memory operation
i_ReturnValue = insn->n;
/**************************/
......@@ -257,9 +257,9 @@ INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device * dev, struct comedi_sub
|
| BYTE_ b_ModulNbr CR_AREF(chanspec) : Selected module number |
| unsigned char_ b_ModulNbr CR_AREF(chanspec) : Selected module number |
| (0 to 3) |
| BYTE_ b_InputChannel CR_CHAN(chanspec) : Selection from digital |
| unsigned char_ b_InputChannel CR_CHAN(chanspec) : Selection from digital |
| input ( 0 to 6) |
| 0 : Channel C |
| 1 : Channel D |
......@@ -288,22 +288,22 @@ INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device * dev, struct comedi_sub
+----------------------------------------------------------------------------+
*/
//_INT_ i_APCI1710_ReadDigitalIOChlValue (BYTE_ b_BoardHandle,
// BYTE_ b_ModulNbr,
// BYTE_ b_InputChannel,
//_INT_ i_APCI1710_ReadDigitalIOChlValue (unsigned char_ b_BoardHandle,
// unsigned char_ b_ModulNbr,
// unsigned char_ b_InputChannel,
//
// PBYTE_ pb_ChannelStatus)
// unsigned char *_ pb_ChannelStatus)
INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_StatusReg;
BYTE b_ModulNbr, b_InputChannel;
PBYTE pb_ChannelStatus;
b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
b_InputChannel = (BYTE) CR_CHAN(insn->chanspec);
unsigned char b_ModulNbr, b_InputChannel;
unsigned char * pb_ChannelStatus;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_InputChannel = (unsigned char) CR_CHAN(insn->chanspec);
data[0] = 0;
pb_ChannelStatus = (PBYTE) & data[0];
pb_ChannelStatus = (unsigned char *) & data[0];
i_ReturnValue = insn->n;
/**************************/
......@@ -400,7 +400,7 @@ INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
(64 * b_ModulNbr));
*pb_ChannelStatus =
(BYTE) ((dw_StatusReg ^
(unsigned char) ((dw_StatusReg ^
0x1C) >>
b_InputChannel) & 1;
......@@ -453,9 +453,9 @@ INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
| parameter b_Channel. Setting an output means setting |
| an ouput high. |
+----------------------------------------------------------------------------+
| Input Parameters : BYTE_ b_BoardHandle : Handle of board APCI-1710 |
| BYTE_ b_ModulNbr (aref ) : Selected module number (0 to 3)|
| BYTE_ b_OutputChannel (CR_CHAN) : Selection from digital output |
| Input Parameters : unsigned char_ b_BoardHandle : Handle of board APCI-1710 |
| unsigned char_ b_ModulNbr (aref ) : Selected module number (0 to 3)|
| unsigned char_ b_OutputChannel (CR_CHAN) : Selection from digital output |
| channel (0 to 2) |
| 0 : Channel H |
| 1 : Channel A |
......@@ -478,15 +478,15 @@ INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
+----------------------------------------------------------------------------+
*/
//_INT_ i_APCI1710_SetDigitalIOChlOn (BYTE_ b_BoardHandle,
// BYTE_ b_ModulNbr,
// BYTE_ b_OutputChannel)
//_INT_ i_APCI1710_SetDigitalIOChlOn (unsigned char_ b_BoardHandle,
// unsigned char_ b_ModulNbr,
// unsigned char_ b_OutputChannel)
INT i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_WriteValue = 0;
BYTE b_ModulNbr, b_OutputChannel;
unsigned char b_ModulNbr, b_OutputChannel;
i_ReturnValue = insn->n;
b_ModulNbr = CR_AREF(insn->chanspec);
b_OutputChannel = CR_CHAN(insn->chanspec);
......@@ -690,9 +690,9 @@ INT i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device * dev,
| from selected digital I/O module (b_ModulNbr)
+----------------------------------------------------------------------------+
| Input Parameters :
BYTE_ b_BoardHandle : Handle of board APCI-1710 |
| BYTE_ b_ModulNbr CR_AREF(aref) : Selected module number (0 to 3)|
| BYTE_ b_PortValue CR_CHAN(chanspec) : Output Value ( 0 To 7 )
unsigned char_ b_BoardHandle : Handle of board APCI-1710 |
| unsigned char_ b_ModulNbr CR_AREF(aref) : Selected module number (0 to 3)|
| unsigned char_ b_PortValue CR_CHAN(chanspec) : Output Value ( 0 To 7 )
| data[0] read or write port
data[1] if write then indicate ON or OFF
......@@ -725,26 +725,26 @@ INT i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device * dev,
+----------------------------------------------------------------------------+
*/
//_INT_ i_APCI1710_SetDigitalIOPortOn (BYTE_ b_BoardHandle,
// BYTE_ b_ModulNbr,
// BYTE_ b_PortValue)
//_INT_ i_APCI1710_SetDigitalIOPortOn (unsigned char_ b_BoardHandle,
// unsigned char_ b_ModulNbr,
// unsigned char_ b_PortValue)
INT i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
DWORD dw_WriteValue = 0;
DWORD dw_StatusReg;
BYTE b_ModulNbr, b_PortValue;
BYTE b_PortOperation, b_PortOnOFF;
unsigned char b_ModulNbr, b_PortValue;
unsigned char b_PortOperation, b_PortOnOFF;
PBYTE pb_PortValue;
unsigned char * pb_PortValue;
b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
b_PortOperation = (BYTE) data[0]; // Input or output
b_PortOnOFF = (BYTE) data[1]; // if output then On or Off
b_PortValue = (BYTE) data[2]; // if out put then Value
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_PortOperation = (unsigned char) data[0]; // Input or output
b_PortOnOFF = (unsigned char) data[1]; // if output then On or Off
b_PortValue = (unsigned char) data[2]; // if out put then Value
i_ReturnValue = insn->n;
pb_PortValue = (PBYTE) & data[0];
pb_PortValue = (unsigned char *) & data[0];
// if input then read value
switch (b_PortOperation) {
......@@ -781,7 +781,7 @@ INT i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device * dev,
inl(devpriv->s_BoardInfos.
ui_Address + (64 * b_ModulNbr));
*pb_PortValue =
(BYTE) (dw_StatusReg ^ 0x1C);
(unsigned char) (dw_StatusReg ^ 0x1C);
} else {
/*******************************/
......
......@@ -148,124 +148,124 @@ INT i_APCI1710_InsnReadINCCPT(struct comedi_device *dev, struct comedi_subdevice
/* INSN CONFIG */
INT i_APCI1710_InitCounter(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_CounterRange,
BYTE b_FirstCounterModus,
BYTE b_FirstCounterOption,
BYTE b_SecondCounterModus,
BYTE b_SecondCounterOption);
unsigned char b_ModulNbr,
unsigned char b_CounterRange,
unsigned char b_FirstCounterModus,
unsigned char b_FirstCounterOption,
unsigned char b_SecondCounterModus,
unsigned char b_SecondCounterOption);
INT i_APCI1710_CounterAutoTest(struct comedi_device *dev, PBYTE pb_TestStatus);
INT i_APCI1710_CounterAutoTest(struct comedi_device *dev, unsigned char * pb_TestStatus);
INT i_APCI1710_InitIndex(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_ReferenceAction,
BYTE b_IndexOperation, BYTE b_AutoMode,
BYTE b_InterruptEnable);
unsigned char b_ModulNbr,
unsigned char b_ReferenceAction,
unsigned char b_IndexOperation, unsigned char b_AutoMode,
unsigned char b_InterruptEnable);
INT i_APCI1710_InitReference(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_ReferenceLevel);
unsigned char b_ModulNbr, unsigned char b_ReferenceLevel);
INT i_APCI1710_InitExternalStrobe(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_ExternalStrobe,
BYTE b_ExternalStrobeLevel);
unsigned char b_ModulNbr, unsigned char b_ExternalStrobe,
unsigned char b_ExternalStrobeLevel);
INT i_APCI1710_InitCompareLogic(struct comedi_device *dev,
BYTE b_ModulNbr, UINT ui_CompareValue);
unsigned char b_ModulNbr, UINT ui_CompareValue);
INT i_APCI1710_InitFrequencyMeasurement(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_PCIInputClock,
BYTE b_TimingUnity,
unsigned char b_ModulNbr,
unsigned char b_PCIInputClock,
unsigned char b_TimingUnity,
ULONG ul_TimingInterval,
PULONG pul_RealTimingInterval);
/* INSN BITS */
INT i_APCI1710_ClearCounterValue(struct comedi_device *dev, BYTE b_ModulNbr);
INT i_APCI1710_ClearCounterValue(struct comedi_device *dev, unsigned char b_ModulNbr);
INT i_APCI1710_ClearAllCounterValue(struct comedi_device *dev);
INT i_APCI1710_SetInputFilter(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_PCIInputClock,
BYTE b_Filter);
unsigned char b_ModulNbr, unsigned char b_PCIInputClock,
unsigned char b_Filter);
INT i_APCI1710_LatchCounter(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_LatchReg);
unsigned char b_ModulNbr, unsigned char b_LatchReg);
INT i_APCI1710_SetIndexAndReferenceSource(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_SourceSelection);
unsigned char b_ModulNbr,
unsigned char b_SourceSelection);
INT i_APCI1710_SetDigitalChlOn(struct comedi_device *dev, BYTE b_ModulNbr);
INT i_APCI1710_SetDigitalChlOn(struct comedi_device *dev, unsigned char b_ModulNbr);
INT i_APCI1710_SetDigitalChlOff(struct comedi_device *dev, BYTE b_ModulNbr);
INT i_APCI1710_SetDigitalChlOff(struct comedi_device *dev, unsigned char b_ModulNbr);
/* INSN WRITE */
INT i_APCI1710_EnableLatchInterrupt(struct comedi_device *dev, BYTE b_ModulNbr);
INT i_APCI1710_EnableLatchInterrupt(struct comedi_device *dev, unsigned char b_ModulNbr);
INT i_APCI1710_DisableLatchInterrupt(struct comedi_device *dev, BYTE b_ModulNbr);
INT i_APCI1710_DisableLatchInterrupt(struct comedi_device *dev, unsigned char b_ModulNbr);
INT i_APCI1710_Write16BitCounterValue(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_SelectedCounter,
unsigned char b_ModulNbr, unsigned char b_SelectedCounter,
UINT ui_WriteValue);
INT i_APCI1710_Write32BitCounterValue(struct comedi_device *dev,
BYTE b_ModulNbr, ULONG ul_WriteValue);
unsigned char b_ModulNbr, ULONG ul_WriteValue);
INT i_APCI1710_EnableIndex(struct comedi_device *dev, BYTE b_ModulNbr);
INT i_APCI1710_EnableIndex(struct comedi_device *dev, unsigned char b_ModulNbr);
INT i_APCI1710_DisableIndex(struct comedi_device *dev, BYTE b_ModulNbr);
INT i_APCI1710_DisableIndex(struct comedi_device *dev, unsigned char b_ModulNbr);
INT i_APCI1710_EnableCompareLogic(struct comedi_device *dev, BYTE b_ModulNbr);
INT i_APCI1710_EnableCompareLogic(struct comedi_device *dev, unsigned char b_ModulNbr);
INT i_APCI1710_DisableCompareLogic(struct comedi_device *dev, BYTE b_ModulNbr);
INT i_APCI1710_DisableCompareLogic(struct comedi_device *dev, unsigned char b_ModulNbr);
INT i_APCI1710_EnableFrequencyMeasurement(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_InterruptEnable);
unsigned char b_ModulNbr,
unsigned char b_InterruptEnable);
INT i_APCI1710_DisableFrequencyMeasurement(struct comedi_device *dev,
BYTE b_ModulNbr);
unsigned char b_ModulNbr);
/* INSN READ */
INT i_APCI1710_ReadLatchRegisterStatus(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_LatchReg,
PBYTE pb_LatchStatus);
unsigned char b_ModulNbr, unsigned char b_LatchReg,
unsigned char * pb_LatchStatus);
INT i_APCI1710_ReadLatchRegisterValue(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_LatchReg,
unsigned char b_ModulNbr, unsigned char b_LatchReg,
PULONG pul_LatchValue);
INT i_APCI1710_Read16BitCounterValue(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_SelectedCounter,
unsigned char b_ModulNbr, unsigned char b_SelectedCounter,
PUINT pui_CounterValue);
INT i_APCI1710_Read32BitCounterValue(struct comedi_device *dev,
BYTE b_ModulNbr, PULONG pul_CounterValue);
unsigned char b_ModulNbr, PULONG pul_CounterValue);
INT i_APCI1710_GetIndexStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_IndexStatus);
unsigned char b_ModulNbr, unsigned char * pb_IndexStatus);
INT i_APCI1710_GetReferenceStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_ReferenceStatus);
unsigned char b_ModulNbr, unsigned char * pb_ReferenceStatus);
INT i_APCI1710_GetUASStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_UASStatus);
unsigned char b_ModulNbr, unsigned char * pb_UASStatus);
INT i_APCI1710_GetCBStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_CBStatus);
unsigned char b_ModulNbr, unsigned char * pb_CBStatus);
INT i_APCI1710_Get16BitCBStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_CBStatusCounter0,
PBYTE pb_CBStatusCounter1);
unsigned char b_ModulNbr, unsigned char * pb_CBStatusCounter0,
unsigned char * pb_CBStatusCounter1);
INT i_APCI1710_GetUDStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_UDStatus);
unsigned char b_ModulNbr, unsigned char * pb_UDStatus);
INT i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_UDStatus);
unsigned char b_ModulNbr, unsigned char * pb_UDStatus);
INT i_APCI1710_ReadFrequencyMeasurement(struct comedi_device *dev,
BYTE b_ModulNbr,
PBYTE pb_Status, PBYTE pb_UDStatus,
unsigned char b_ModulNbr,
unsigned char * pb_Status, unsigned char * pb_UDStatus,
PULONG pul_ReadValue);
......@@ -30,43 +30,43 @@ INT i_APCI1710_InsnConfigPWM(struct comedi_device *dev, struct comedi_subdevice
struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_InitPWM(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_PWM,
BYTE b_ClockSelection,
BYTE b_TimingUnit,
unsigned char b_ModulNbr,
unsigned char b_PWM,
unsigned char b_ClockSelection,
unsigned char b_TimingUnit,
ULONG ul_LowTiming,
ULONG ul_HighTiming,
PULONG pul_RealLowTiming, PULONG pul_RealHighTiming);
INT i_APCI1710_GetPWMInitialisation(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_PWM,
PBYTE pb_TimingUnit,
unsigned char b_ModulNbr,
unsigned char b_PWM,
unsigned char * pb_TimingUnit,
PULONG pul_LowTiming,
PULONG pul_HighTiming,
PBYTE pb_StartLevel,
PBYTE pb_StopMode,
PBYTE pb_StopLevel,
PBYTE pb_ExternGate,
PBYTE pb_InterruptEnable, PBYTE pb_Enable);
unsigned char * pb_StartLevel,
unsigned char * pb_StopMode,
unsigned char * pb_StopLevel,
unsigned char * pb_ExternGate,
unsigned char * pb_InterruptEnable, unsigned char * pb_Enable);
INT i_APCI1710_InsnWritePWM(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data);
INT i_APCI1710_EnablePWM(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_PWM,
BYTE b_StartLevel,
BYTE b_StopMode,
BYTE b_StopLevel, BYTE b_ExternGate,
BYTE b_InterruptEnable);
unsigned char b_ModulNbr,
unsigned char b_PWM,
unsigned char b_StartLevel,
unsigned char b_StopMode,
unsigned char b_StopLevel, unsigned char b_ExternGate,
unsigned char b_InterruptEnable);
INT i_APCI1710_SetNewPWMTiming(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_PWM, BYTE b_TimingUnit,
unsigned char b_ModulNbr,
unsigned char b_PWM, unsigned char b_TimingUnit,
ULONG ul_LowTiming, ULONG ul_HighTiming);
INT i_APCI1710_DisablePWM(struct comedi_device *dev, BYTE b_ModulNbr, BYTE b_PWM);
INT i_APCI1710_DisablePWM(struct comedi_device *dev, unsigned char b_ModulNbr, unsigned char b_PWM);
INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data);
......
......@@ -74,11 +74,11 @@ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead,
INT i_Counter = 0;
INT i_WordCounter;
INT i;
BYTE pb_ReadByte[1];
BYTE b_ReadLowByte = 0;
BYTE b_ReadHighByte = 0;
BYTE b_SelectedAddressLow = 0;
BYTE b_SelectedAddressHigh = 0;
unsigned char pb_ReadByte[1];
unsigned char b_ReadLowByte = 0;
unsigned char b_ReadHighByte = 0;
unsigned char b_SelectedAddressLow = 0;
unsigned char b_SelectedAddressHigh = 0;
WORD w_ReadWord = 0;
for (i_WordCounter = 0; i_WordCounter < i_NbOfWordsToRead;
......
......@@ -37,7 +37,6 @@
#define SUCCESS 1
/* variable type definition */
typedef unsigned char BYTE, *PBYTE;
typedef short SHORT, *PSHORT;
typedef unsigned short USHORT, *PUSHORT;
typedef unsigned short WORD, *PWORD;
......@@ -50,8 +49,8 @@ typedef unsigned long ULONG_PTR;
typedef const struct comedi_lrange *PCRANGE;
#define LOBYTE(W) (BYTE)((W) & 0xFF)
#define HIBYTE(W) (BYTE)(((W) >> 8) & 0xFF)
#define LOBYTE(W) (unsigned char)((W) & 0xFF)
#define HIBYTE(W) (unsigned char)(((W) >> 8) & 0xFF)
#define MAKEWORD(H, L) (USHORT)((L) | ((H) << 8))
#define LOWORD(W) (USHORT)((W) & 0xFFFF)
#define HIWORD(W) (USHORT)(((W) >> 16) & 0xFFFF)
......@@ -103,7 +102,7 @@ typedef struct {
INT i_Dma; // dma present or not
INT i_Timer; // timer subdevice present or not
BYTE b_AvailableConvertUnit;
unsigned char b_AvailableConvertUnit;
UINT ui_MinAcquisitiontimeNs; // Minimum Acquisition in Nano secs
UINT ui_MinDelaytimeNs; // Minimum Delay in Nano secs
......@@ -222,10 +221,10 @@ typedef union {
struct {
union {
struct {
BYTE b_ModeRegister1;
BYTE b_ModeRegister2;
BYTE b_ModeRegister3;
BYTE b_ModeRegister4;
unsigned char b_ModeRegister1;
unsigned char b_ModeRegister2;
unsigned char b_ModeRegister3;
unsigned char b_ModeRegister4;
} s_ByteModeRegister;
DWORD dw_ModeRegister1_2_3_4;
} s_ModeRegister;
......@@ -244,24 +243,24 @@ typedef union {
/* SSI infos */
struct {
BYTE b_SSIProfile;
BYTE b_PositionTurnLength;
BYTE b_TurnCptLength;
BYTE b_SSIInit;
unsigned char b_SSIProfile;
unsigned char b_PositionTurnLength;
unsigned char b_TurnCptLength;
unsigned char b_SSIInit;
} s_SSICounterInfo;
/* TTL I/O infos */
struct {
BYTE b_TTLInit;
BYTE b_PortConfiguration[4];
unsigned char b_TTLInit;
unsigned char b_PortConfiguration[4];
} s_TTLIOInfo;
/* Digital I/O infos */
struct {
BYTE b_DigitalInit;
BYTE b_ChannelAMode;
BYTE b_ChannelBMode;
BYTE b_OutputMemoryEnabled;
unsigned char b_DigitalInit;
unsigned char b_ChannelAMode;
unsigned char b_ChannelBMode;
unsigned char b_OutputMemoryEnabled;
DWORD dw_OutputMemory;
} s_DigitalIOInfo;
......@@ -271,14 +270,14 @@ typedef union {
struct {
struct {
BYTE b_82X54Init;
BYTE b_InputClockSelection;
BYTE b_InputClockLevel;
BYTE b_OutputLevel;
BYTE b_HardwareGateLevel;
unsigned char b_82X54Init;
unsigned char b_InputClockSelection;
unsigned char b_InputClockLevel;
unsigned char b_OutputLevel;
unsigned char b_HardwareGateLevel;
DWORD dw_ConfigurationWord;
} s_82X54TimerInfo[3];
BYTE b_InterruptMask;
unsigned char b_InterruptMask;
} s_82X54ModuleInfo;
/*********************/
......@@ -286,11 +285,11 @@ typedef union {
/*********************/
struct {
BYTE b_ChronoInit;
BYTE b_InterruptMask;
BYTE b_PCIInputClock;
BYTE b_TimingUnit;
BYTE b_CycleMode;
unsigned char b_ChronoInit;
unsigned char b_InterruptMask;
unsigned char b_PCIInputClock;
unsigned char b_TimingUnit;
unsigned char b_CycleMode;
double d_TimingInterval;
DWORD dw_ConfigReg;
} s_ChronoModuleInfo;
......@@ -301,7 +300,7 @@ typedef union {
struct {
struct {
BYTE b_PulseEncoderInit;
unsigned char b_PulseEncoderInit;
} s_PulseEncoderInfo[4];
DWORD dw_SetRegister;
DWORD dw_ControlRegister;
......@@ -311,49 +310,49 @@ typedef union {
/* Tor conter infos */
struct {
struct {
BYTE b_TorCounterInit;
BYTE b_TimingUnit;
BYTE b_InterruptEnable;
unsigned char b_TorCounterInit;
unsigned char b_TimingUnit;
unsigned char b_InterruptEnable;
double d_TimingInterval;
ULONG ul_RealTimingInterval;
} s_TorCounterInfo[2];
BYTE b_PCIInputClock;
unsigned char b_PCIInputClock;
} s_TorCounterModuleInfo;
/* PWM infos */
struct {
struct {
BYTE b_PWMInit;
BYTE b_TimingUnit;
BYTE b_InterruptEnable;
unsigned char b_PWMInit;
unsigned char b_TimingUnit;
unsigned char b_InterruptEnable;
double d_LowTiming;
double d_HighTiming;
ULONG ul_RealLowTiming;
ULONG ul_RealHighTiming;
} s_PWMInfo[2];
BYTE b_ClockSelection;
unsigned char b_ClockSelection;
} s_PWMModuleInfo;
/* ETM infos */
struct {
struct {
BYTE b_ETMEnable;
BYTE b_ETMInterrupt;
unsigned char b_ETMEnable;
unsigned char b_ETMInterrupt;
} s_ETMInfo[2];
BYTE b_ETMInit;
BYTE b_TimingUnit;
BYTE b_ClockSelection;
unsigned char b_ETMInit;
unsigned char b_TimingUnit;
unsigned char b_ClockSelection;
double d_TimingInterval;
ULONG ul_Timing;
} s_ETMModuleInfo;
/* CDA infos */
struct {
BYTE b_CDAEnable;
BYTE b_CDAInterrupt;
BYTE b_CDAInit;
BYTE b_FctSelection;
BYTE b_CDAReadFIFOOverflow;
unsigned char b_CDAEnable;
unsigned char b_CDAInterrupt;
unsigned char b_CDAInit;
unsigned char b_FctSelection;
unsigned char b_CDAReadFIFOOverflow;
} s_CDAModuleInfo;
} str_ModuleInfo;
......@@ -367,10 +366,10 @@ typedef struct {
INT i_IobaseReserved;
ULONG_PTR dw_AiBase;
struct pcilst_struct *amcc; // ptr too AMCC data
BYTE allocated; // we have blocked card
BYTE b_ValidDriver; // driver is ok
BYTE b_AiContinuous; // we do unlimited AI
BYTE b_AiInitialisation;
unsigned char allocated; // we have blocked card
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
......@@ -378,7 +377,7 @@ typedef struct {
UINT ui_AiActualScanPosition; // position in actual scan
PUINT pui_AiChannelList; // actual chanlist
UINT ui_AiChannelList[32]; // actual chanlist
BYTE b_AiChannelConfiguration[32]; // actual chanlist
unsigned char b_AiChannelConfiguration[32]; // actual chanlist
UINT ui_AiReadData[32];
DWORD dw_AiInitialised;
UINT ui_AiTimer0; //Timer Constant for Timer0
......@@ -388,7 +387,7 @@ typedef struct {
short *AiData; // Pointer to sample data
UINT ui_AiNbrofScans; // number of scans to do
USHORT us_UseDma; // To use Dma or not
BYTE b_DmaDoubleBuffer; // we can use double buffering
unsigned char b_DmaDoubleBuffer; // we can use double buffering
UINT ui_DmaActualBuffer; // which buffer is used now
//*UPDATE-0.7.57->0.7.68
//ULONG ul_DmaBufferVirtual[2];// pointers to begin of DMA buffer
......@@ -398,25 +397,25 @@ typedef struct {
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
BYTE b_DigitalOutputRegister; // Digital Output Register
BYTE b_OutputMemoryStatus;
BYTE b_AnalogInputChannelNbr; // Analog input channel Nbr
BYTE b_AnalogOutputChannelNbr; // Analog input Output Nbr
BYTE b_TimerSelectMode; // Contain data written at iobase + 0C
BYTE b_ModeSelectRegister; // Contain data written at iobase + 0E
unsigned char b_DigitalOutputRegister; // Digital Output Register
unsigned char b_OutputMemoryStatus;
unsigned char b_AnalogInputChannelNbr; // Analog input channel Nbr
unsigned char b_AnalogOutputChannelNbr; // Analog input Output Nbr
unsigned char b_TimerSelectMode; // Contain data written at iobase + 0C
unsigned char b_ModeSelectRegister; // Contain data written at iobase + 0E
USHORT us_OutputRegister; // Contain data written at iobase + 0
BYTE b_InterruptState;
BYTE b_TimerInit; // Specify if InitTimerWatchdog was load
BYTE b_TimerStarted; // Specify if timer 2 is running or not
BYTE b_Timer2Mode; // Specify the timer 2 mode
BYTE b_Timer2Interrupt; //Timer2 interrupt enable or disable
BYTE b_AiCyclicAcquisition; // indicate cyclic acquisition
BYTE b_InterruptMode; // eoc eos or dma
BYTE b_EocEosInterrupt; // Enable disable eoc eos interrupt
unsigned char b_InterruptState;
unsigned char b_TimerInit; // Specify if InitTimerWatchdog was load
unsigned char b_TimerStarted; // Specify if timer 2 is running or not
unsigned char b_Timer2Mode; // Specify the timer 2 mode
unsigned char b_Timer2Interrupt; //Timer2 interrupt enable or disable
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;
BYTE b_EocEosConversionTimeBase;
BYTE b_SingelDiff;
BYTE b_ExttrigEnable; /* To enable or disable external trigger */
unsigned char b_EocEosConversionTimeBase;
unsigned char b_SingelDiff;
unsigned char b_ExttrigEnable; /* To enable or disable external trigger */
/* Pointer to the current process */
struct task_struct *tsk_Current;
......@@ -426,9 +425,9 @@ typedef struct {
struct {
UINT ui_Address; /* Board address */
UINT ui_FlashAddress;
BYTE b_InterruptNbr; /* Board interrupt number */
BYTE b_SlotNumber; /* PCI slot number */
BYTE b_BoardVersion;
unsigned char b_InterruptNbr; /* Board interrupt number */
unsigned char b_SlotNumber; /* PCI slot number */
unsigned char b_BoardVersion;
DWORD dw_MolduleConfiguration[4]; /* Module config */
} s_BoardInfos;
......@@ -439,7 +438,7 @@ typedef struct {
UINT ui_Read; /* Read FIFO */
UINT ui_Write; /* Write FIFO */
struct {
BYTE b_OldModuleMask;
unsigned char b_OldModuleMask;
ULONG ul_OldInterruptMask; /* Interrupt mask */
ULONG ul_OldCounterLatchValue; /* Interrupt counter value */
} s_FIFOInterruptParameters[APCI1710_SAVE_INTERRUPT];
......
......@@ -68,19 +68,19 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
#define EEPROM_TIMER_WATCHDOG_COUNTER 10
struct str_Functionality {
BYTE b_Type;
unsigned char b_Type;
WORD w_Address;
};
typedef struct {
WORD w_HeaderSize;
BYTE b_Nfunctions;
unsigned char b_Nfunctions;
struct str_Functionality s_Functions[7];
} str_MainHeader;
typedef struct {
WORD w_Nchannel;
BYTE b_Interruptible;
unsigned char b_Interruptible;
WORD w_NinterruptLogic;
} str_DigitalInputHeader;
......@@ -92,10 +92,10 @@ typedef struct {
typedef struct {
WORD w_HeaderSize;
BYTE b_Resolution;
BYTE b_Mode; // in case of Watchdog it is functionality
unsigned char b_Resolution;
unsigned char b_Mode; // in case of Watchdog it is functionality
WORD w_MinTiming;
BYTE b_TimeBase;
unsigned char b_TimeBase;
} str_TimerDetails;
typedef struct {
......@@ -105,15 +105,15 @@ typedef struct {
typedef struct {
WORD w_Nchannel;
BYTE b_Resolution;
unsigned char b_Resolution;
} str_AnalogOutputHeader;
typedef struct {
WORD w_Nchannel;
WORD w_MinConvertTiming;
WORD w_MinDelayTiming;
BYTE b_HasDma;
BYTE b_Resolution;
unsigned char b_HasDma;
unsigned char b_Resolution;
} str_AnalogInputHeader;
/*****************************************/
......@@ -152,7 +152,7 @@ void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress);
void v_EepromClock76(DWORD dw_Address, DWORD dw_RegisterValue);
void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress);
void v_EepromSendCommand76(DWORD dw_Address, DWORD dw_EepromCommand,
BYTE b_DataLengthInBits);
unsigned char b_DataLengthInBits);
void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value);
/*
......@@ -180,17 +180,17 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
WORD w_EepromStartAddress)
{
BYTE b_Counter = 0;
unsigned char b_Counter = 0;
BYTE b_ReadByte = 0;
unsigned char b_ReadByte = 0;
BYTE b_ReadLowByte = 0;
unsigned char b_ReadLowByte = 0;
BYTE b_ReadHighByte = 0;
unsigned char b_ReadHighByte = 0;
BYTE b_SelectedAddressLow = 0;
unsigned char b_SelectedAddressLow = 0;
BYTE b_SelectedAddressHigh = 0;
unsigned char b_SelectedAddressHigh = 0;
WORD w_ReadWord = 0;
......@@ -384,7 +384,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress)
{
BYTE b_EepromBusy = 0;
unsigned char b_EepromBusy = 0;
do
{
......@@ -492,7 +492,7 @@ void v_EepromClock76(DWORD dw_Address, DWORD dw_RegisterValue)
| DWORD dw_EepromCommand, |
| BYTE b_DataLengthInBits) |
| unsigned char b_DataLengthInBits) |
+---------------------------------------------------------------------------------+
......@@ -504,7 +504,7 @@ void v_EepromClock76(DWORD dw_Address, DWORD dw_RegisterValue)
| DWORD dw_EepromCommand : PCI eeprom command to write. |
| BYTE b_DataLengthInBits : PCI eeprom command data length. |
| unsigned char b_DataLengthInBits : PCI eeprom command data length. |
+---------------------------------------------------------------------------------+
......@@ -519,7 +519,7 @@ void v_EepromClock76(DWORD dw_Address, DWORD dw_RegisterValue)
*/
void v_EepromSendCommand76(DWORD dw_Address, DWORD dw_EepromCommand,
BYTE b_DataLengthInBits)
unsigned char b_DataLengthInBits)
{
char c_BitPos = 0;
......@@ -824,14 +824,14 @@ INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress,
// Read nbr of functionality
w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress,
pc_PCIChipInformation, 0x100 + 10);
s_MainHeader.b_Nfunctions = (BYTE) w_Temp & 0x00FF;
s_MainHeader.b_Nfunctions = (unsigned char) w_Temp & 0x00FF;
// Read functionality details
for (i = 0; i < s_MainHeader.b_Nfunctions; i++) {
// Read Type
w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress,
pc_PCIChipInformation, 0x100 + 12 + w_Count);
s_MainHeader.s_Functions[i].b_Type = (BYTE) w_Temp & 0x3F;
s_MainHeader.s_Functions[i].b_Type = (unsigned char) w_Temp & 0x3F;
w_Count = w_Count + 2;
//Read Address
s_MainHeader.s_Functions[i].w_Address =
......@@ -953,7 +953,7 @@ INT i_EepromReadDigitalInputHeader(WORD w_PCIBoardEepromAddress,
// interruptible or not
w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress,
pc_PCIChipInformation, 0x100 + w_Address + 8);
s_Header->b_Interruptible = (BYTE) (w_Temp >> 7) & 0x01;
s_Header->b_Interruptible = (unsigned char) (w_Temp >> 7) & 0x01;
// How many interruptible logic
s_Header->w_NinterruptLogic =
......@@ -1039,11 +1039,11 @@ INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress,
//Read Resolution
s_Header->s_TimerDetails[i].b_Resolution =
(BYTE) (w_Temp >> 10) & 0x3F;
(unsigned char) (w_Temp >> 10) & 0x3F;
//Read Mode
s_Header->s_TimerDetails[i].b_Mode =
(BYTE) (w_Temp >> 4) & 0x3F;
(unsigned char) (w_Temp >> 4) & 0x3F;
w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress,
pc_PCIChipInformation,
......@@ -1053,7 +1053,7 @@ INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress,
s_Header->s_TimerDetails[i].w_MinTiming = (w_Temp >> 6) & 0x3FF;
//Read Timebase
s_Header->s_TimerDetails[i].b_TimeBase = (BYTE) (w_Temp) & 0x3F;
s_Header->s_TimerDetails[i].b_TimeBase = (unsigned char) (w_Temp) & 0x3F;
w_Size += s_Header->s_TimerDetails[i].w_HeaderSize;
}
......@@ -1093,7 +1093,7 @@ INT i_EepromReadAnlogOutputHeader(WORD w_PCIBoardEepromAddress,
// Resolution for 1st hard component
w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress,
pc_PCIChipInformation, 0x100 + w_Address + 16);
s_Header->b_Resolution = (BYTE) (w_Temp >> 8) & 0xFF;
s_Header->b_Resolution = (unsigned char) (w_Temp >> 8) & 0xFF;
return 0;
}
......
......@@ -234,11 +234,11 @@ int i_APCI1710_Reset(struct comedi_device * dev)
/*
+----------------------------------------------------------------------------+
| Function's Name : __void__ v_APCI1710_InterruptFunction |
| (BYTE b_Interrupt, __CPPARGS) |
| (unsigned char b_Interrupt, __CPPARGS) |
+----------------------------------------------------------------------------+
| Task : APCI-1710 interrupt function |
+----------------------------------------------------------------------------+
| Input Parameters : BYTE b_Interrupt : Interrupt number |
| Input Parameters : unsigned char b_Interrupt : Interrupt number |
+----------------------------------------------------------------------------+
| Output Parameters : - |
+----------------------------------------------------------------------------+
......@@ -250,11 +250,11 @@ int i_APCI1710_Reset(struct comedi_device * dev)
void v_APCI1710_Interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
BYTE b_ModuleCpt = 0;
BYTE b_InterruptFlag = 0;
BYTE b_PWMCpt = 0;
BYTE b_TorCounterCpt = 0;
BYTE b_PulseIncoderCpt = 0;
unsigned char b_ModuleCpt = 0;
unsigned char b_InterruptFlag = 0;
unsigned char b_PWMCpt = 0;
unsigned char b_TorCounterCpt = 0;
unsigned char b_PulseIncoderCpt = 0;
UINT ui_16BitValue;
ULONG ul_InterruptLatchReg = 0;
ULONG ul_LatchRegisterValue = 0;
......
......@@ -137,7 +137,7 @@ typedef struct {
INT i_Initialised;
//UINT ui_InterruptChannelValue[96]; //Buffer
UINT ui_InterruptChannelValue[144]; //Buffer
BYTE b_StructInitialized;
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
//End JK 19.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment