]> Pileus Git - ~andy/linux/commitdiff
Staging: comedi: Remove WORD and *PWORD typedefs in addi-data
authorBill Pemberton <wfp5p@virginia.edu>
Wed, 25 Mar 2009 15:04:58 +0000 (11:04 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:25 +0000 (11:00 -0700)
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c
drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.h
drivers/staging/comedi/drivers/addi-data/addi_common.c
drivers/staging/comedi/drivers/addi-data/addi_common.h
drivers/staging/comedi/drivers/addi-data/addi_eeprom.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c

index 007ae8c05d3ccdeadecd791e31c827e4f8086595..3ea2f0756095e09daddc0f09952576ecd889f7e4 100644 (file)
@@ -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++) {
index 9ae56bc3adadd306b79e74e9feba864fb9643738..4a0f3c1ef03c82814e0a10cd5e2812490047fbdf 100644 (file)
@@ -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);
index 618c69b6838d55b23622a62e2926da8f90da08cb..724e030d83e2716c3d902b8ea2825dba089c747e 100644 (file)
@@ -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,
index 3dd7c98b1de558878192dc78244804ad8006221a..1b8e2b1b55647e0018fe11292224b7e035bbdb03 100644 (file)
@@ -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 */
index 5cab63836e4c50ce4ed78855bacad352ab718ff6..c0372bee9619456c41dd477a2a84cd0d1920578d 100644 (file)
@@ -51,8 +51,6 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 #define EE76_CMD_LEN           13      // bits in instructions
 #define EE_READ                0x0180  // 01 1000 0000 read instruction
 
-#define        WORD                            unsigned short
-#define PWORD                          unsigned short *
 #define PDWORD                         unsigned int  *
 
 #ifndef DWORD
@@ -69,49 +67,49 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 
 struct str_Functionality {
        unsigned char b_Type;
-       WORD w_Address;
+       unsigned short w_Address;
 };
 
 typedef struct {
-       WORD w_HeaderSize;
+       unsigned short w_HeaderSize;
        unsigned char b_Nfunctions;
        struct str_Functionality s_Functions[7];
 } str_MainHeader;
 
 typedef struct {
-       WORD w_Nchannel;
+       unsigned short w_Nchannel;
        unsigned char b_Interruptible;
-       WORD w_NinterruptLogic;
+       unsigned short w_NinterruptLogic;
 } str_DigitalInputHeader;
 
 typedef struct {
-       WORD w_Nchannel;
+       unsigned short w_Nchannel;
 } str_DigitalOutputHeader;
 
 // used for timer as well as watchdog
 
 typedef struct {
-       WORD w_HeaderSize;
+       unsigned short w_HeaderSize;
        unsigned char b_Resolution;
        unsigned char b_Mode;           // in case of Watchdog it is functionality
-       WORD w_MinTiming;
+       unsigned short w_MinTiming;
        unsigned char b_TimeBase;
 } str_TimerDetails;
 typedef struct {
 
-       WORD w_Ntimer;
+       unsigned short w_Ntimer;
        str_TimerDetails s_TimerDetails[4];     //  supports 4 timers
 } str_TimerMainHeader;
 
 typedef struct {
-       WORD w_Nchannel;
+       unsigned short w_Nchannel;
        unsigned char b_Resolution;
 } str_AnalogOutputHeader;
 
 typedef struct {
-       WORD w_Nchannel;
-       WORD w_MinConvertTiming;
-       WORD w_MinDelayTiming;
+       unsigned short w_Nchannel;
+       unsigned short w_MinConvertTiming;
+       unsigned short w_MinDelayTiming;
        unsigned char b_HasDma;
        unsigned char b_Resolution;
 } str_AnalogInputHeader;
@@ -120,55 +118,55 @@ typedef struct {
                /*            Read Header Functions              */
                /*****************************************/
 
-INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress,
+INT i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress,
        char *pc_PCIChipInformation, struct comedi_device *dev);
 
-INT i_EepromReadDigitalInputHeader(WORD w_PCIBoardEepromAddress,
-       char *pc_PCIChipInformation, WORD w_Address,
+INT i_EepromReadDigitalInputHeader(unsigned short w_PCIBoardEepromAddress,
+       char *pc_PCIChipInformation, unsigned short w_Address,
        str_DigitalInputHeader * s_Header);
 
-INT i_EepromReadDigitalOutputHeader(WORD w_PCIBoardEepromAddress,
-       char *pc_PCIChipInformation, WORD w_Address,
+INT i_EepromReadDigitalOutputHeader(unsigned short w_PCIBoardEepromAddress,
+       char *pc_PCIChipInformation, unsigned short w_Address,
        str_DigitalOutputHeader * s_Header);
 
-INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress,
-       char *pc_PCIChipInformation, WORD w_Address,
+INT i_EepromReadTimerHeader(unsigned short w_PCIBoardEepromAddress,
+       char *pc_PCIChipInformation, unsigned short w_Address,
        str_TimerMainHeader * s_Header);
 
-INT i_EepromReadAnlogOutputHeader(WORD w_PCIBoardEepromAddress,
-       char *pc_PCIChipInformation, WORD w_Address,
+INT i_EepromReadAnlogOutputHeader(unsigned short w_PCIBoardEepromAddress,
+       char *pc_PCIChipInformation, unsigned short w_Address,
        str_AnalogOutputHeader * s_Header);
 
-INT i_EepromReadAnlogInputHeader(WORD w_PCIBoardEepromAddress,
-       char *pc_PCIChipInformation, WORD w_Address,
+INT i_EepromReadAnlogInputHeader(unsigned short w_PCIBoardEepromAddress,
+       char *pc_PCIChipInformation, unsigned short w_Address,
        str_AnalogInputHeader * s_Header);
 
                /******************************************/
                /*      Eeprom Specific Functions                         */
                /******************************************/
-WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
-       WORD w_EepromStartAddress);
-void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress);
+unsigned short w_EepromReadWord(unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
+       unsigned short w_EepromStartAddress);
+void v_EepromWaitBusy(unsigned short w_PCIBoardEepromAddress);
 void v_EepromClock76(DWORD dw_Address, DWORD dw_RegisterValue);
-void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress);
+void v_EepromWaitBusy(unsigned short w_PCIBoardEepromAddress);
 void v_EepromSendCommand76(DWORD dw_Address, DWORD dw_EepromCommand,
        unsigned char b_DataLengthInBits);
-void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value);
+void v_EepromCs76Read(DWORD dw_Address, unsigned short w_offset, unsigned short * pw_Value);
 
 /*
 +----------------------------------------------------------------------------+
-| Function   Name   : WORD w_EepromReadWord                                  |
-|                              (WORD   w_PCIBoardEepromAddress,                         |
+| Function   Name   : unsigned short w_EepromReadWord                                  |
+|                              (unsigned short w_PCIBoardEepromAddress,                         |
 |                               char * pc_PCIChipInformation,                           |
-|                               WORD   w_EepromStartAddress)                            |
+|                               unsigned short   w_EepromStartAddress)                          |
 +----------------------------------------------------------------------------+
 | Task              : Read from eepromn a word                               |
 +----------------------------------------------------------------------------+
-| Input Parameters  : WORD w_PCIBoardEepromAddress : PCI eeprom address      |
+| Input Parameters  : unsigned short w_PCIBoardEepromAddress : PCI eeprom address      |
 |                                                                                                                                       |
 |                    char *pc_PCIChipInformation  : PCI Chip Type.          |
 |                                                                                                                                       |
-|                    WORD w_EepromStartAddress    : Selected eeprom address |
+|                    unsigned short w_EepromStartAddress    : Selected eeprom address |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -176,8 +174,8 @@ void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value);
 +----------------------------------------------------------------------------+
 */
 
-WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
-       WORD w_EepromStartAddress)
+unsigned short w_EepromReadWord(unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
+       unsigned short w_EepromStartAddress)
 {
 
        unsigned char b_Counter = 0;
@@ -192,7 +190,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
 
        unsigned char b_SelectedAddressHigh = 0;
 
-       WORD w_ReadWord = 0;
+       unsigned short w_ReadWord = 0;
 
        /**************************/
 
@@ -331,7 +329,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
 
                }               // for (b_Counter=0; b_Counter<2; b_Counter++)
 
-               w_ReadWord = (b_ReadLowByte | (((WORD) b_ReadHighByte) * 256));
+               w_ReadWord = (b_ReadLowByte | (((unsigned short) b_ReadHighByte) * 256));
 
        }                       // end of if ((!strcmp(pc_PCIChipInformation, "S5920")) || (!strcmp(pc_PCIChipInformation, "S5933")))
 
@@ -359,7 +357,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
 
 | Function   Name   : void v_EepromWaitBusy                                  |
 
-|                      (WORD   w_PCIBoardEepromAddress)                         |
+|                      (unsigned short w_PCIBoardEepromAddress)                         |
 
 +----------------------------------------------------------------------------+
 
@@ -367,7 +365,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
 
 +----------------------------------------------------------------------------+
 
-| Input Parameters  : WORD w_PCIBoardEepromAddress : PCI eeprom base address |
+| Input Parameters  : unsigned short w_PCIBoardEepromAddress : PCI eeprom base address |
 
 +----------------------------------------------------------------------------+
 
@@ -381,7 +379,7 @@ WORD w_EepromReadWord(WORD w_PCIBoardEepromAddress, char *pc_PCIChipInformation,
 
 */
 
-void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress)
+void v_EepromWaitBusy(unsigned short w_PCIBoardEepromAddress)
 {
 
        unsigned char b_EepromBusy = 0;
@@ -403,7 +401,7 @@ void v_EepromWaitBusy(WORD w_PCIBoardEepromAddress)
 
                /*      the operator register is AMCC_OP_REG_MCSR+3 */
 
-               /*      WORD read  EEPROM=0x8000 andAMCC_OP_REG_MCSR+2                  */
+               /*      unsigned short read  EEPROM=0x8000 andAMCC_OP_REG_MCSR+2                  */
 
                /*      DWORD read  EEPROM=0x80000000 and AMCC_OP_REG_MCSR */
 
@@ -625,9 +623,9 @@ void v_EepromSendCommand76(DWORD dw_Address, DWORD dw_EepromCommand,
 
 | Function   Name   : void v_EepromCs76Read(DWORD dw_Address,                     |
 
-|                                         WORD    w_offset,                                              |
+|                                         unsigned short    w_offset,                                            |
 
-|                                         PWORD   pw_Value)                                              |
+|                                         unsigned short *   pw_Value)                                           |
 
 +---------------------------------------------------------------------------------+
 
@@ -637,9 +635,9 @@ void v_EepromSendCommand76(DWORD dw_Address, DWORD dw_EepromCommand,
 
 | Input Parameters  : DWORD dw_Address : PCI eeprom base address                  |
 
-|                    WORD    w_offset : Offset of the adress to read             |
+|                    unsigned short    w_offset : Offset of the adress to read             |
 
-|                    PWORD   pw_Value : PCI eeprom 16 bit read value.            |
+|                    unsigned short *   pw_Value : PCI eeprom 16 bit read value.            |
 
 +---------------------------------------------------------------------------------+
 
@@ -653,7 +651,7 @@ void v_EepromSendCommand76(DWORD dw_Address, DWORD dw_EepromCommand,
 
 */
 
-void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value)
+void v_EepromCs76Read(DWORD dw_Address, unsigned short w_offset, unsigned short * pw_Value)
 {
 
         char c_BitPos = 0;
@@ -786,12 +784,12 @@ void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value)
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name  : INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress,  |
+| Function Name  : INT i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress,  |
 |                              char *  pc_PCIChipInformation,struct comedi_device *dev)    |
 +----------------------------------------------------------------------------+
 | Task              : Read from eeprom Main Header                           |
 +----------------------------------------------------------------------------+
-| Input Parameters  : WORD w_PCIBoardEepromAddress : PCI eeprom address      |
+| Input Parameters  : unsigned short w_PCIBoardEepromAddress : PCI eeprom address      |
 |                                                                                                                                       |
 |                    char *pc_PCIChipInformation  : PCI Chip Type.          |
 |                                                                                                                                       |
@@ -804,10 +802,10 @@ void v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value)
 +----------------------------------------------------------------------------+
 */
 
-INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress,
+INT i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress,
        char *pc_PCIChipInformation, struct comedi_device *dev)
 {
-       WORD w_Temp, i, w_Count = 0;
+       unsigned short w_Temp, i, w_Count = 0;
        UINT ui_Temp;
        str_MainHeader s_MainHeader;
        str_DigitalInputHeader s_DigitalInputHeader;
@@ -920,14 +918,14 @@ INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress,
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name  : INT i_EepromReadDigitalInputHeader(WORD                                      |
+| Function Name  : INT i_EepromReadDigitalInputHeader(unsigned short                                    |
 |                      w_PCIBoardEepromAddress,char *pc_PCIChipInformation,     |
-|                      WORD w_Address,str_DigitalInputHeader *s_Header)                 |
+|                      unsigned short w_Address,str_DigitalInputHeader *s_Header)               |
 |                                                                                                                                       |
 +----------------------------------------------------------------------------+
 | Task              : Read Digital Input Header                              |
 +----------------------------------------------------------------------------+
-| Input Parameters  : WORD w_PCIBoardEepromAddress : PCI eeprom address      |
+| Input Parameters  : unsigned short w_PCIBoardEepromAddress : PCI eeprom address      |
 |                                                                                                                                       |
 |                    char *pc_PCIChipInformation  : PCI Chip Type.          |
 |                                                                                                                                       |
@@ -939,11 +937,11 @@ INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress,
 | Return Value      : 0                                                                                     |
 +----------------------------------------------------------------------------+
 */
-INT i_EepromReadDigitalInputHeader(WORD w_PCIBoardEepromAddress,
-       char *pc_PCIChipInformation, WORD w_Address,
+INT i_EepromReadDigitalInputHeader(unsigned short w_PCIBoardEepromAddress,
+       char *pc_PCIChipInformation, unsigned short w_Address,
        str_DigitalInputHeader * s_Header)
 {
-       WORD w_Temp;
+       unsigned short w_Temp;
 
        // read nbr of channels
        s_Header->w_Nchannel =
@@ -965,14 +963,14 @@ INT i_EepromReadDigitalInputHeader(WORD w_PCIBoardEepromAddress,
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name  : INT i_EepromReadDigitalOutputHeader(WORD                             |
+| Function Name  : INT i_EepromReadDigitalOutputHeader(unsigned short                           |
 |                      w_PCIBoardEepromAddress,char *pc_PCIChipInformation,     |
-|                      WORD w_Address,str_DigitalOutputHeader *s_Header)            |
+|                      unsigned short w_Address,str_DigitalOutputHeader *s_Header)          |
 |                                                                                                                                       |
 +----------------------------------------------------------------------------+
 | Task              : Read Digital Output Header                             |
 +----------------------------------------------------------------------------+
-| Input Parameters  : WORD w_PCIBoardEepromAddress : PCI eeprom address      |
+| Input Parameters  : unsigned short w_PCIBoardEepromAddress : PCI eeprom address      |
 |                                                                                                                                       |
 |                    char *pc_PCIChipInformation  : PCI Chip Type.          |
 |                                                                                                                                       |
@@ -984,8 +982,8 @@ INT i_EepromReadDigitalInputHeader(WORD w_PCIBoardEepromAddress,
 | Return Value      : 0                                                                                     |
 +----------------------------------------------------------------------------+
 */
-INT i_EepromReadDigitalOutputHeader(WORD w_PCIBoardEepromAddress,
-       char *pc_PCIChipInformation, WORD w_Address,
+INT i_EepromReadDigitalOutputHeader(unsigned short w_PCIBoardEepromAddress,
+       char *pc_PCIChipInformation, unsigned short w_Address,
        str_DigitalOutputHeader * s_Header)
 {
 // Read Nbr channels
@@ -997,13 +995,13 @@ INT i_EepromReadDigitalOutputHeader(WORD w_PCIBoardEepromAddress,
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name  : INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress, |
+| Function Name  : INT i_EepromReadTimerHeader(unsigned short w_PCIBoardEepromAddress, |
 |                      char *pc_PCIChipInformation,WORD w_Address,                              |
 |                      str_TimerMainHeader *s_Header)                                                   |
 +----------------------------------------------------------------------------+
 | Task              : Read Timer or Watchdog Header                          |
 +----------------------------------------------------------------------------+
-| Input Parameters  : WORD w_PCIBoardEepromAddress : PCI eeprom address      |
+| Input Parameters  : unsigned short w_PCIBoardEepromAddress : PCI eeprom address      |
 |                                                                                                                                       |
 |                    char *pc_PCIChipInformation  : PCI Chip Type.          |
 |                                                                                                                                       |
@@ -1015,12 +1013,12 @@ INT i_EepromReadDigitalOutputHeader(WORD w_PCIBoardEepromAddress,
 | Return Value      : 0                                                                                     |
 +----------------------------------------------------------------------------+
 */
-INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress,
-       char *pc_PCIChipInformation, WORD w_Address,
+INT i_EepromReadTimerHeader(unsigned short w_PCIBoardEepromAddress,
+       char *pc_PCIChipInformation, unsigned short w_Address,
        str_TimerMainHeader * s_Header)
 {
 
-       WORD i, w_Size = 0, w_Temp;
+       unsigned short i, w_Size = 0, w_Temp;
 
 //Read No of Timer
        s_Header->w_Ntimer =
@@ -1062,13 +1060,13 @@ INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress,
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name  : INT i_EepromReadAnlogOutputHeader(WORD                                       |
+| Function Name  : INT i_EepromReadAnlogOutputHeader(unsigned short                                     |
 |                      w_PCIBoardEepromAddress,char *pc_PCIChipInformation,     |
-|                      WORD w_Address,str_AnalogOutputHeader *s_Header)         |
+|                      unsigned short w_Address,str_AnalogOutputHeader *s_Header)         |
 +----------------------------------------------------------------------------+
 | Task              : Read Nalog Output  Header                              |
 +----------------------------------------------------------------------------+
-| Input Parameters  : WORD w_PCIBoardEepromAddress : PCI eeprom address      |
+| Input Parameters  : unsigned short w_PCIBoardEepromAddress : PCI eeprom address      |
 |                                                                                                                                       |
 |                    char *pc_PCIChipInformation  : PCI Chip Type.          |
 |                                                                                                                                       |
@@ -1081,11 +1079,11 @@ INT i_EepromReadTimerHeader(WORD w_PCIBoardEepromAddress,
 +----------------------------------------------------------------------------+
 */
 
-INT i_EepromReadAnlogOutputHeader(WORD w_PCIBoardEepromAddress,
-       char *pc_PCIChipInformation, WORD w_Address,
+INT i_EepromReadAnlogOutputHeader(unsigned short w_PCIBoardEepromAddress,
+       char *pc_PCIChipInformation, unsigned short w_Address,
        str_AnalogOutputHeader * s_Header)
 {
-       WORD w_Temp;
+       unsigned short w_Temp;
        // No of channels for 1st hard component
        w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress,
                pc_PCIChipInformation, 0x100 + w_Address + 10);
@@ -1099,13 +1097,13 @@ INT i_EepromReadAnlogOutputHeader(WORD w_PCIBoardEepromAddress,
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name  : INT i_EepromReadAnlogInputHeader(WORD                                        |
+| Function Name  : INT i_EepromReadAnlogInputHeader(unsigned short                                      |
 |                      w_PCIBoardEepromAddress,char *pc_PCIChipInformation,     |
-|                      WORD w_Address,str_AnalogInputHeader *s_Header)          |
+|                      unsigned short w_Address,str_AnalogInputHeader *s_Header)          |
 +----------------------------------------------------------------------------+
 | Task              : Read Nalog Output  Header                              |
 +----------------------------------------------------------------------------+
-| Input Parameters  : WORD w_PCIBoardEepromAddress : PCI eeprom address      |
+| Input Parameters  : unsigned short w_PCIBoardEepromAddress : PCI eeprom address      |
 |                                                                                                                                       |
 |                    char *pc_PCIChipInformation  : PCI Chip Type.          |
 |                                                                                                                                       |
@@ -1119,11 +1117,11 @@ INT i_EepromReadAnlogOutputHeader(WORD w_PCIBoardEepromAddress,
 */
 
 // Reads only for ONE  hardware component
-INT i_EepromReadAnlogInputHeader(WORD w_PCIBoardEepromAddress,
-       char *pc_PCIChipInformation, WORD w_Address,
+INT i_EepromReadAnlogInputHeader(unsigned short w_PCIBoardEepromAddress,
+       char *pc_PCIChipInformation, unsigned short w_Address,
        str_AnalogInputHeader * s_Header)
 {
-       WORD w_Temp, w_Offset;
+       unsigned short w_Temp, w_Offset;
        w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress,
                pc_PCIChipInformation, 0x100 + w_Address + 10);
        s_Header->w_Nchannel = (w_Temp >> 4) & 0x03FF;
index 47b859ef8f1f26bf08f052679bd8fd961102f15a..b06ff1ed345fa7316e63fc536cdc6a96b4638a01 100644 (file)
@@ -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;
index d44837c333ffb0532c7c92416f9308dcba9c3a4f..12513624a79452d6546596b0aa7c11ff0d5af2dd 100644 (file)
@@ -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 **/