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

Staging: comedi: Remove WORD and *PWORD typedefs in addi-data

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a9fce7c9
......@@ -52,23 +52,23 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
/*| Function Name : INT i_AddiHeaderRW_ReadEeprom |*/
/*| (INT i_NbOfWordsToRead, |*/
/*| DWORD dw_PCIBoardEepromAddress, |*/
/*| WORD w_EepromStartAddress, |*/
/*| PWORD pw_DataRead) |*/
/*| unsigned short w_EepromStartAddress, |*/
/*| unsigned short * pw_DataRead) |*/
/*+----------------------------------------------------------------------------+*/
/*| Task : Read word from the 5920 eeprom. |*/
/*+----------------------------------------------------------------------------+*/
/*| Input Parameters : INT i_NbOfWordsToRead : Nbr. of word to read |*/
/*| DWORD dw_PCIBoardEepromAddress : Address of the eeprom |*/
/*| WORD w_EepromStartAddress : Eeprom strat address |*/
/*| unsigned short w_EepromStartAddress : Eeprom strat address |*/
/*+----------------------------------------------------------------------------+*/
/*| Output Parameters : PWORD pw_DataRead : Read data |*/
/*| Output Parameters : unsigned short * pw_DataRead : Read data |*/
/*+----------------------------------------------------------------------------+*/
/*| Return Value : - |*/
/*+----------------------------------------------------------------------------+*/
INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead,
DWORD dw_PCIBoardEepromAddress,
WORD w_EepromStartAddress, PWORD pw_DataRead)
unsigned short w_EepromStartAddress, unsigned short * pw_DataRead)
{
DWORD dw_eeprom_busy = 0;
INT i_Counter = 0;
......@@ -79,7 +79,7 @@ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead,
unsigned char b_ReadHighByte = 0;
unsigned char b_SelectedAddressLow = 0;
unsigned char b_SelectedAddressHigh = 0;
WORD w_ReadWord = 0;
unsigned short w_ReadWord = 0;
for (i_WordCounter = 0; i_WordCounter < i_NbOfWordsToRead;
i_WordCounter++) {
......
......@@ -24,4 +24,4 @@
INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead,
DWORD dw_PCIBoardEepromAddress,
WORD w_EepromStartAddress, PWORD pw_DataRead);
unsigned short w_EepromStartAddress, unsigned short * pw_DataRead);
......@@ -3049,8 +3049,8 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG)
static int i_ADDIDATA_InsnReadEeprom(struct comedi_device * dev, struct comedi_subdevice * s,
struct comedi_insn * insn, unsigned int * data)
{
WORD w_Data;
WORD w_Address;
unsigned short w_Data;
unsigned short w_Address;
w_Address = CR_CHAN(insn->chanspec); // address to be read as 0,1,2,3...255
w_Data = w_EepromReadWord(devpriv->i_IobaseAmcc,
......
......@@ -37,7 +37,6 @@
#define SUCCESS 1
/* variable type definition */
typedef unsigned short WORD, *PWORD;
typedef int INT, *PINT;;
typedef unsigned int UINT, *PUINT;
typedef int LONG, *PLONG; /* 32-bit */
......
......@@ -952,7 +952,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device * dev,
outb(devpriv->b_TimerSelectMode,
dev->iobase + APCI3120_TIMER_CRT1);
//Writing LOW WORD
//Writing LOW unsigned short
b_Tmp = ((devpriv->
b_DigitalOutputRegister) & 0xF0) |
APCI3120_SELECT_TIMER_2_LOW_WORD;
......@@ -960,7 +960,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device * dev,
outw(LOWORD(ui_TimerValue2),
dev->iobase + APCI3120_TIMER_VALUE);
//Writing HIGH WORD
//Writing HIGH unsigned short
b_Tmp = ((devpriv->
b_DigitalOutputRegister) & 0xF0) |
APCI3120_SELECT_TIMER_2_HIGH_WORD;
......@@ -2027,12 +2027,12 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevi
outb(devpriv->b_TimerSelectMode,
devpriv->iobase + APCI3120_TIMER_CRT1);
//Configure the timer 2 for writing the LOW WORD of timer is Delay value
//Configure the timer 2 for writing the LOW unsigned short of timer is Delay value
//You must make a b_tmp variable with DigitalOutPutRegister because at Address_1+APCI3120_TIMER_CRT0
//you can set the digital output and configure the timer 2,and if you don't make this, digital output
//are erase (Set to 0)
//Writing LOW WORD
//Writing LOW unsigned short
b_Tmp = ((devpriv->
b_DigitalOutputRegister) & 0xF0) |
APCI3120_SELECT_TIMER_2_LOW_WORD;
......@@ -2040,7 +2040,7 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevi
outw(LOWORD(ui_Timervalue2),
devpriv->iobase + APCI3120_TIMER_VALUE);
//Writing HIGH WORD
//Writing HIGH unsigned short
b_Tmp = ((devpriv->
b_DigitalOutputRegister) & 0xF0) |
APCI3120_SELECT_TIMER_2_HIGH_WORD;
......@@ -2061,12 +2061,12 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevi
outb(devpriv->b_TimerSelectMode,
devpriv->iobase + APCI3120_TIMER_CRT1);
//Configure the timer 2 for writing the LOW WORD of timer is Delay value
//Configure the timer 2 for writing the LOW unsigned short of timer is Delay value
//You must make a b_tmp variable with DigitalOutPutRegister because at Address_1+APCI3120_TIMER_CRT0
//you can set the digital output and configure the timer 2,and if you don't make this, digital output
//are erase (Set to 0)
//Writing LOW WORD
//Writing LOW unsigned short
b_Tmp = ((devpriv->
b_DigitalOutputRegister) & 0xF0) |
APCI3120_SELECT_TIMER_2_LOW_WORD;
......@@ -2074,7 +2074,7 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevi
outw(LOWORD(ui_Timervalue2),
devpriv->iobase + APCI3120_TIMER_VALUE);
//Writing HIGH WORD
//Writing HIGH unsigned short
b_Tmp = ((devpriv->
b_DigitalOutputRegister) & 0xF0) |
APCI3120_SELECT_TIMER_2_HIGH_WORD;
......@@ -2256,7 +2256,7 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, struct comedi_subdevic
//Calculate the time value to set in the timer
ui_Timervalue2 = ui_Timervalue2 / 70;
}
//Writing LOW WORD
//Writing LOW unsigned short
b_Tmp = ((devpriv->
b_DigitalOutputRegister) & 0xF0) |
APCI3120_SELECT_TIMER_2_LOW_WORD;
......@@ -2265,7 +2265,7 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, struct comedi_subdevic
outw(LOWORD(ui_Timervalue2),
devpriv->iobase + APCI3120_TIMER_VALUE);
//Writing HIGH WORD
//Writing HIGH unsigned short
b_Tmp = ((devpriv->
b_DigitalOutputRegister) & 0xF0) |
APCI3120_SELECT_TIMER_2_HIGH_WORD;
......@@ -2319,7 +2319,7 @@ int i_APCI3120_InsnReadTimer(struct comedi_device * dev, struct comedi_subdevice
//this_board->i_hwdrv_InsnReadTimer(dev,data);
if (devpriv->b_Timer2Mode == APCI3120_TIMER) {
//Read the LOW WORD of Timer 2 register
//Read the LOW unsigned short of Timer 2 register
b_Tmp = ((devpriv->
b_DigitalOutputRegister) & 0xF0) |
APCI3120_SELECT_TIMER_2_LOW_WORD;
......@@ -2327,7 +2327,7 @@ int i_APCI3120_InsnReadTimer(struct comedi_device * dev, struct comedi_subdevice
us_TmpValue = inw(devpriv->iobase + APCI3120_TIMER_VALUE);
//Read the HIGH WORD of Timer 2 register
//Read the HIGH unsigned short of Timer 2 register
b_Tmp = ((devpriv->
b_DigitalOutputRegister) & 0xF0) |
APCI3120_SELECT_TIMER_2_HIGH_WORD;
......
......@@ -96,23 +96,23 @@ str_BoardInfos s_BoardInfos[100]; // 100 will be the max number of boards to be
/*| Function Name : INT i_AddiHeaderRW_ReadEeprom |*/
/*| (INT i_NbOfWordsToRead, |*/
/*| DWORD dw_PCIBoardEepromAddress, |*/
/*| WORD w_EepromStartAddress, |*/
/*| PWORD pw_DataRead) |*/
/*| unsigned short w_EepromStartAddress, |*/
/*| unsigned short * pw_DataRead) |*/
/*+----------------------------------------------------------------------------+*/
/*| Task : Read word from the 5920 eeprom. |*/
/*+----------------------------------------------------------------------------+*/
/*| Input Parameters : INT i_NbOfWordsToRead : Nbr. of word to read |*/
/*| DWORD dw_PCIBoardEepromAddress : Address of the eeprom |*/
/*| WORD w_EepromStartAddress : Eeprom strat address |*/
/*| unsigned short w_EepromStartAddress : Eeprom strat address |*/
/*+----------------------------------------------------------------------------+*/
/*| Output Parameters : PWORD pw_DataRead : Read data |*/
/*| Output Parameters : unsigned short * pw_DataRead : Read data |*/
/*+----------------------------------------------------------------------------+*/
/*| Return Value : - |*/
/*+----------------------------------------------------------------------------+*/
INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead,
DWORD dw_PCIBoardEepromAddress,
WORD w_EepromStartAddress, PWORD pw_DataRead)
unsigned short w_EepromStartAddress, unsigned short * pw_DataRead)
{
DWORD dw_eeprom_busy = 0;
INT i_Counter = 0;
......@@ -123,7 +123,7 @@ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead,
unsigned char b_ReadHighByte = 0;
unsigned char b_SelectedAddressLow = 0;
unsigned char b_SelectedAddressHigh = 0;
WORD w_ReadWord = 0;
unsigned short w_ReadWord = 0;
for (i_WordCounter = 0; i_WordCounter < i_NbOfWordsToRead;
i_WordCounter++) {
......@@ -261,22 +261,22 @@ INT i_AddiHeaderRW_ReadEeprom(INT i_NbOfWordsToRead,
void v_GetAPCI3200EepromCalibrationValue(DWORD dw_PCIBoardEepromAddress,
str_BoardInfos * BoardInformations)
{
WORD w_AnalogInputMainHeaderAddress;
WORD w_AnalogInputComponentAddress;
WORD w_NumberOfModuls = 0;
WORD w_CurrentSources[2];
WORD w_ModulCounter = 0;
WORD w_FirstHeaderSize = 0;
WORD w_NumberOfInputs = 0;
WORD w_CJCFlag = 0;
WORD w_NumberOfGainValue = 0;
WORD w_SingleHeaderAddress = 0;
WORD w_SingleHeaderSize = 0;
WORD w_Input = 0;
WORD w_GainFactorAddress = 0;
WORD w_GainFactorValue[2];
WORD w_GainIndex = 0;
WORD w_GainValue = 0;
unsigned short w_AnalogInputMainHeaderAddress;
unsigned short w_AnalogInputComponentAddress;
unsigned short w_NumberOfModuls = 0;
unsigned short w_CurrentSources[2];
unsigned short w_ModulCounter = 0;
unsigned short w_FirstHeaderSize = 0;
unsigned short w_NumberOfInputs = 0;
unsigned short w_CJCFlag = 0;
unsigned short w_NumberOfGainValue = 0;
unsigned short w_SingleHeaderAddress = 0;
unsigned short w_SingleHeaderSize = 0;
unsigned short w_Input = 0;
unsigned short w_GainFactorAddress = 0;
unsigned short w_GainFactorValue[2];
unsigned short w_GainIndex = 0;
unsigned short w_GainValue = 0;
/*****************************************/
/** Get the Analog input header address **/
......
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