Staging: comedi: Remove BYTE and *PBYTE typedefs in addi-data
authorBill Pemberton <wfp5p@virginia.edu>
Wed, 25 Mar 2009 15:04:41 +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>
24 files changed:
drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.c
drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.h
drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c
drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.h
drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c
drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c
drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.h
drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c
drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c
drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.h
drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c
drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c
drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c
drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.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_APCI1710.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c

index c96aee0..1dd195d 100644 (file)
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_     i_APCI1710_InitTimer                         |
-|                               (BYTE_   b_BoardHandle,                      |
-|                                BYTE_   b_ModulNbr,                         |
-|                                BYTE_   b_TimerNbr,                         |
-|                                BYTE_   b_TimerMode,                        |
+|                               (unsigned char_   b_BoardHandle,                      |
+|                                unsigned char_   b_ModulNbr,                         |
+|                                unsigned char_   b_TimerNbr,                         |
+|                                unsigned char_   b_TimerMode,                        |
 |                                ULONG_ ul_ReloadValue,                      |
-|                                BYTE_   b_InputClockSelection,              |
-|                                BYTE_   b_InputClockLevel,                  |
-|                                BYTE_   b_OutputLevel,                      |
-|                                BYTE_   b_HardwareGateLevel)
+|                                unsigned char_   b_InputClockSelection,              |
+|                                unsigned char_   b_InputClockLevel,                  |
+|                                unsigned char_   b_OutputLevel,                      |
+|                                unsigned char_   b_HardwareGateLevel)
 INT i_InsnConfig_InitTimer(struct comedi_device *dev,struct comedi_subdevice *s,
        struct comedi_insn *insn,unsigned int *data)
 |
@@ -148,13 +148,13 @@ INT i_InsnConfig_InitTimer(struct comedi_device *dev,struct comedi_subdevice *s,
 |  +--------------------------------+------------------------------------+   |
 |                                                                            |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_   b_BoardHandle        : Handle of board         |
+| Input Parameters  : unsigned char_   b_BoardHandle        : Handle of board         |
 |                                                    APCI-1710               |
-|                     BYTE_   b_ModulNbr           : Module number to        |
+|                     unsigned char_   b_ModulNbr           : Module number to        |
 |                                                    configure (0 to 3)      |
-|                     BYTE_   b_TimerNbr           : Timer number to         |
+|                     unsigned char_   b_TimerNbr           : Timer number to         |
 |                                                    configure (0 to 2)      |
-|                     BYTE_   b_TimerMode          : Timer mode selection    |
+|                     unsigned char_   b_TimerMode          : Timer mode selection    |
 |                                                    (0 to 5)                |
 |                                                    0: Interrupt on terminal|
 |                                                       count                |
@@ -173,21 +173,21 @@ INT i_InsnConfig_InitTimer(struct comedi_device *dev,struct comedi_subdevice *s,
 |                                                     or division factor     |
 |                                                     See timer mode         |
 |                                                     description table.     |
-|                     BYTE_   b_InputClockSelection : Selection from input   |
+|                     unsigned char_   b_InputClockSelection : Selection from input   |
 |                                                     timer clock.           |
 |                                                     See input clock        |
 |                                                     selection table.       |
-|                     BYTE_   b_InputClockLevel     : Selection from input   |
+|                     unsigned char_   b_InputClockLevel     : Selection from input   |
 |                                                     clock level.           |
 |                                                     0 : Low active         |
 |                                                         (Input inverted)   |
 |                                                     1 : High active        |
-|                     BYTE_   b_OutputLevel,        : Selection from output  |
+|                     unsigned char_   b_OutputLevel,        : Selection from output  |
 |                                                     clock level.           |
 |                                                     0 : Low active         |
 |                                                     1 : High active        |
 |                                                         (Output inverted)  |
-|                     BYTE_   b_HardwareGateLevel   : Selection from         |
+|                     unsigned char_   b_HardwareGateLevel   : Selection from         |
 |                                                     hardware gate level.   |
 |                                                     0 : Low active         |
 |                                                         (Input inverted)   |
@@ -195,14 +195,14 @@ INT i_InsnConfig_InitTimer(struct comedi_device *dev,struct comedi_subdevice *s,
 |                                                     If you will not used   |
 |                                                     the hardware gate set  |
 |                                                     this value to 0.
-|b_ModulNbr        = (BYTE) CR_AREF(insn->chanspec);
-       b_TimerNbr                = (BYTE) CR_CHAN(insn->chanspec);
-       b_TimerMode               = (BYTE) data[0];
+|b_ModulNbr        = (unsigned char) CR_AREF(insn->chanspec);
+       b_TimerNbr                = (unsigned char) CR_CHAN(insn->chanspec);
+       b_TimerMode               = (unsigned char) data[0];
        ul_ReloadValue    = (ULONG) data[1];
-       b_InputClockSelection   =(BYTE) data[2];
-       b_InputClockLevel               =(BYTE) data[3];
-       b_OutputLevel                   =(BYTE) data[4];
-       b_HardwareGateLevel             =(BYTE) data[5];
+       b_InputClockSelection   =(unsigned char) data[2];
+       b_InputClockLevel               =(unsigned char) data[3];
+       b_OutputLevel                   =(unsigned char) data[4];
+       b_HardwareGateLevel             =(unsigned char) data[5];
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -224,28 +224,28 @@ INT i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, struct comedi_sub
 {
 
        INT i_ReturnValue = 0;
-       BYTE b_ModulNbr;
-       BYTE b_TimerNbr;
-       BYTE b_TimerMode;
+       unsigned char b_ModulNbr;
+       unsigned char b_TimerNbr;
+       unsigned char b_TimerMode;
        ULONG ul_ReloadValue;
-       BYTE b_InputClockSelection;
-       BYTE b_InputClockLevel;
-       BYTE b_OutputLevel;
-       BYTE b_HardwareGateLevel;
+       unsigned char b_InputClockSelection;
+       unsigned char b_InputClockLevel;
+       unsigned char b_OutputLevel;
+       unsigned char b_HardwareGateLevel;
 
        //BEGIN JK 27.10.2003 : Add the possibility to use a 40 Mhz quartz
        DWORD dw_Test = 0;
        //END JK 27.10.2003 : Add the possibility to use a 40 Mhz quartz
 
        i_ReturnValue = insn->n;
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-       b_TimerNbr = (BYTE) CR_CHAN(insn->chanspec);
-       b_TimerMode = (BYTE) data[0];
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+       b_TimerNbr = (unsigned char) CR_CHAN(insn->chanspec);
+       b_TimerMode = (unsigned char) data[0];
        ul_ReloadValue = (ULONG) data[1];
-       b_InputClockSelection = (BYTE) data[2];
-       b_InputClockLevel = (BYTE) data[3];
-       b_OutputLevel = (BYTE) data[4];
-       b_HardwareGateLevel = (BYTE) data[5];
+       b_InputClockSelection = (unsigned char) data[2];
+       b_InputClockLevel = (unsigned char) data[3];
+       b_OutputLevel = (unsigned char) data[4];
+       b_HardwareGateLevel = (unsigned char) data[5];
 
        /* Test the module number */
        if (b_ModulNbr < 4) {
@@ -402,10 +402,10 @@ INT i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, struct comedi_sub
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_     i_APCI1710_EnableTimer                       |
-|                               (BYTE_ b_BoardHandle,                        |
-|                                BYTE_ b_ModulNbr,                           |
-|                                BYTE_ b_TimerNbr,                           |
-|                                BYTE_ b_InterruptEnable)
+|                               (unsigned char_ b_BoardHandle,                        |
+|                                unsigned char_ b_ModulNbr,                           |
+|                                unsigned char_ b_TimerNbr,                           |
+|                                unsigned char_ b_InterruptEnable)
 INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,struct comedi_subdevice *s,
        struct comedi_insn *insn,unsigned int *data)                |
 +----------------------------------------------------------------------------+
@@ -416,22 +416,22 @@ INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,struct come
 |                     generate a interrupt after the timer value reach       |
 |                     the zero. See function "i_APCI1710_SetBoardIntRoutineX"|
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_   b_BoardHandle     : Handle of board            |
+| Input Parameters  : unsigned char_   b_BoardHandle     : Handle of board            |
 |                                                 APCI-1710                  |
-|                     BYTE_   b_ModulNbr        : Selected module number     |
+|                     unsigned char_   b_ModulNbr        : Selected module number     |
 |                                                 (0 to 3)                   |
-|                     BYTE_   b_TimerNbr        : Timer number to enable     |
+|                     unsigned char_   b_TimerNbr        : Timer number to enable     |
 |                                                 (0 to 2)                   |
-|                     BYTE_   b_InterruptEnable : Enable or disable the      |
+|                     unsigned char_   b_InterruptEnable : Enable or disable the      |
 |                                                 timer interrupt.           |
 |                                                 APCI1710_ENABLE :          |
 |                                                 Enable the timer interrupt |
 |                                                 APCI1710_DISABLE :         |
 |                                                 Disable the timer interrupt|
 i_ReturnValue=insn->n;
-       b_ModulNbr        = (BYTE) CR_AREF(insn->chanspec);
-       b_TimerNbr                = (BYTE) CR_CHAN(insn->chanspec);
-       b_ActionType      = (BYTE) data[0]; // enable disable
+       b_ModulNbr        = (unsigned char) CR_AREF(insn->chanspec);
+       b_TimerNbr                = (unsigned char) CR_CHAN(insn->chanspec);
+       b_ActionType      = (unsigned char) data[0]; // enable disable
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -454,15 +454,15 @@ INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device * dev,
 {
        INT i_ReturnValue = 0;
        DWORD dw_DummyRead;
-       BYTE b_ModulNbr;
-       BYTE b_TimerNbr;
-       BYTE b_ActionType;
-       BYTE b_InterruptEnable;
+       unsigned char b_ModulNbr;
+       unsigned char b_TimerNbr;
+       unsigned char b_ActionType;
+       unsigned char b_InterruptEnable;
 
        i_ReturnValue = insn->n;
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-       b_TimerNbr = (BYTE) CR_CHAN(insn->chanspec);
-       b_ActionType = (BYTE) data[0];  // enable disable
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+       b_TimerNbr = (unsigned char) CR_CHAN(insn->chanspec);
+       b_ActionType = (unsigned char) data[0]; // enable disable
 
        /* Test the module number */
        if (b_ModulNbr < 4) {
@@ -475,7 +475,7 @@ INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device * dev,
 
                                        switch (b_ActionType) {
                                        case APCI1710_ENABLE:
-                                               b_InterruptEnable = (BYTE) data[1];
+                                               b_InterruptEnable = (unsigned char) data[1];
                                                /* Test the interrupt selection */
                                                if ((b_InterruptEnable == APCI1710_ENABLE) ||
                                                    (b_InterruptEnable == APCI1710_DISABLE)) {
@@ -558,8 +558,8 @@ INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_     i_APCI1710_ReadAllTimerValue                 |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        unsigned char_     b_ModulNbr,               |
 |                                        PULONG_ pul_TimerValueArray)
 INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev,struct comedi_subdevice *s,
        struct comedi_insn *insn,unsigned int *data)        |
@@ -567,9 +567,9 @@ INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev,struct comedi_sub
 | Task              : Return the all timer values from selected timer        |
 |                     module (b_ModulNbr).                                   |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_   b_BoardHandle     : Handle of board            |
+| Input Parameters  : unsigned char_   b_BoardHandle     : Handle of board            |
 |                                                 APCI-1710                  |
-|                     BYTE_   b_ModulNbr        : Selected module number     |
+|                     unsigned char_   b_ModulNbr        : Selected module number     |
 |                                                 (0 to 3)                   |
 +----------------------------------------------------------------------------+
 | Output Parameters : PULONG_ pul_TimerValueArray : Timer value array.       |
@@ -594,7 +594,7 @@ INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_su
                                     struct comedi_insn *insn, unsigned int *data)
 {
        INT i_ReturnValue = 0;
-       BYTE b_ModulNbr, b_ReadType;
+       unsigned char b_ModulNbr, b_ReadType;
        PULONG pul_TimerValueArray;
 
        b_ModulNbr = CR_AREF(insn->chanspec);
@@ -684,7 +684,7 @@ struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)
 INT i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice * s,
                             struct comedi_insn * insn, unsigned int * data)
 {
-       BYTE b_BitsType;
+       unsigned char b_BitsType;
        INT i_ReturnValue = 0;
        b_BitsType = data[0];
 
@@ -693,29 +693,29 @@ INT i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice
        switch (b_BitsType) {
        case APCI1710_TIMER_READVALUE:
                i_ReturnValue = i_APCI1710_ReadTimerValue(dev,
-                                                         (BYTE)CR_AREF(insn->chanspec),
-                                                         (BYTE)CR_CHAN(insn->chanspec),
+                                                         (unsigned char)CR_AREF(insn->chanspec),
+                                                         (unsigned char)CR_CHAN(insn->chanspec),
                                                          (PULONG) & data[0]);
                break;
 
        case APCI1710_TIMER_GETOUTPUTLEVEL:
                i_ReturnValue = i_APCI1710_GetTimerOutputLevel(dev,
-                                                              (BYTE)CR_AREF(insn->chanspec),
-                                                              (BYTE)CR_CHAN(insn->chanspec),
-                                                              (PBYTE) &data[0]);
+                                                              (unsigned char)CR_AREF(insn->chanspec),
+                                                              (unsigned char)CR_CHAN(insn->chanspec),
+                                                              (unsigned char *) &data[0]);
                break;
 
        case APCI1710_TIMER_GETPROGRESSSTATUS:
                i_ReturnValue = i_APCI1710_GetTimerProgressStatus(dev,
-                                                                 (BYTE)CR_AREF(insn->chanspec),
-                                                                 (BYTE)CR_CHAN(insn->chanspec),
-                                                                 (PBYTE)&data[0]);
+                                                                 (unsigned char)CR_AREF(insn->chanspec),
+                                                                 (unsigned char)CR_CHAN(insn->chanspec),
+                                                                 (unsigned char *)&data[0]);
                break;
 
        case APCI1710_TIMER_WRITEVALUE:
                i_ReturnValue = i_APCI1710_WriteTimerValue(dev,
-                                                          (BYTE)CR_AREF(insn->chanspec),
-                                                          (BYTE)CR_CHAN(insn->chanspec),
+                                                          (unsigned char)CR_AREF(insn->chanspec),
+                                                          (unsigned char)CR_CHAN(insn->chanspec),
                                                           (ULONG)data[1]);
 
                break;
@@ -733,19 +733,19 @@ INT i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_     i_APCI1710_ReadTimerValue                    |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
-|                                        BYTE_     b_TimerNbr,               |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        unsigned char_     b_ModulNbr,               |
+|                                        unsigned char_     b_TimerNbr,               |
 |                                        PULONG_ pul_TimerValue)             |
 +----------------------------------------------------------------------------+
 | Task              : Return the timer value from selected digital timer     |
 |                     (b_TimerNbr) from selected timer  module (b_ModulNbr). |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_   b_BoardHandle     : Handle of board            |
+| Input Parameters  : unsigned char_   b_BoardHandle     : Handle of board            |
 |                                                 APCI-1710                  |
-|                     BYTE_   b_ModulNbr        : Selected module number     |
+|                     unsigned char_   b_ModulNbr        : Selected module number     |
 |                                                 (0 to 3)                   |
-|                     BYTE_   b_TimerNbr        : Timer number to read       |
+|                     unsigned char_   b_TimerNbr        : Timer number to read       |
 |                                                 (0 to 2)                   |
 +----------------------------------------------------------------------------+
 | Output Parameters : PULONG_ pul_TimerValue    : Timer value                |
@@ -761,7 +761,7 @@ INT i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice
 */
 
 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_ReturnValue = 0;
@@ -818,23 +818,23 @@ INT i_APCI1710_ReadTimerValue(struct comedi_device * dev,
        /*
           +----------------------------------------------------------------------------+
           | Function Name     : _INT_     i_APCI1710_GetTimerOutputLevel               |
-          |                                       (BYTE_     b_BoardHandle,            |
-          |                                        BYTE_     b_ModulNbr,               |
-          |                                        BYTE_     b_TimerNbr,               |
-          |                                        PBYTE_   pb_OutputLevel)            |
+          |                                       (unsigned char_     b_BoardHandle,            |
+          |                                        unsigned char_     b_ModulNbr,               |
+          |                                        unsigned char_     b_TimerNbr,               |
+          |                                        unsigned char *_   pb_OutputLevel)            |
           +----------------------------------------------------------------------------+
           | Task              : Return the output signal level (pb_OutputLevel) from   |
           |                     selected digital timer (b_TimerNbr) from selected timer|
           |                     module (b_ModulNbr).                                   |
           +----------------------------------------------------------------------------+
-          | Input Parameters  : BYTE_   b_BoardHandle     : Handle of board            |
+          | Input Parameters  : unsigned char_   b_BoardHandle     : Handle of board            |
           |                                                 APCI-1710                  |
-          |                     BYTE_   b_ModulNbr        : Selected module number     |
+          |                     unsigned char_   b_ModulNbr        : Selected module number     |
           |                                                 (0 to 3)                   |
-          |                     BYTE_   b_TimerNbr        : Timer number to test       |
+          |                     unsigned char_   b_TimerNbr        : Timer number to test       |
           |                                                 (0 to 2)                   |
           +----------------------------------------------------------------------------+
-          | Output Parameters : PBYTE_ pb_OutputLevel     : Output signal level        |
+          | Output Parameters : unsigned char *_ pb_OutputLevel     : Output signal level        |
           |                                                 0 : The output is low      |
           |                                                 1 : The output is high     |
           +----------------------------------------------------------------------------+
@@ -849,8 +849,8 @@ INT i_APCI1710_ReadTimerValue(struct comedi_device * dev,
         */
 
 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_ReturnValue = 0;
        DWORD dw_TimerStatus;
@@ -869,7 +869,7 @@ INT i_APCI1710_GetTimerOutputLevel(struct comedi_device * dev,
                                        /* Read the timer status */
                                        dw_TimerStatus = inl(devpriv->s_BoardInfos.ui_Address + 16 + (b_TimerNbr * 4) + (64 * b_ModulNbr));
 
-                                       *pb_OutputLevel = (BYTE) (((dw_TimerStatus >> 7) & 1) ^ devpriv-> s_ModuleInfo[b_ModulNbr].s_82X54ModuleInfo.s_82X54TimerInfo[b_TimerNbr].b_OutputLevel);
+                                       *pb_OutputLevel = (unsigned char) (((dw_TimerStatus >> 7) & 1) ^ devpriv-> s_ModuleInfo[b_ModulNbr].s_82X54ModuleInfo.s_82X54TimerInfo[b_TimerNbr].b_OutputLevel);
                                } else {
                                        /* Timer not initialised see function */
                                        DPRINTK("Timer not initialised see function\n");
@@ -897,23 +897,23 @@ INT i_APCI1710_GetTimerOutputLevel(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_     i_APCI1710_GetTimerProgressStatus            |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
-|                                        BYTE_     b_TimerNbr,               |
-|                                        PBYTE_   pb_TimerStatus)            |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        unsigned char_     b_ModulNbr,               |
+|                                        unsigned char_     b_TimerNbr,               |
+|                                        unsigned char *_   pb_TimerStatus)            |
 +----------------------------------------------------------------------------+
 | Task              : Return the progress status (pb_TimerStatus) from       |
 |                     selected digital timer (b_TimerNbr) from selected timer|
 |                     module (b_ModulNbr).                                   |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_   b_BoardHandle     : Handle of board            |
+| Input Parameters  : unsigned char_   b_BoardHandle     : Handle of board            |
 |                                                 APCI-1710                  |
-|                     BYTE_   b_ModulNbr        : Selected module number     |
+|                     unsigned char_   b_ModulNbr        : Selected module number     |
 |                                                 (0 to 3)                   |
-|                     BYTE_   b_TimerNbr        : Timer number to test       |
+|                     unsigned char_   b_TimerNbr        : Timer number to test       |
 |                                                 (0 to 2)                   |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_TimerStatus     : Output signal level        |
+| Output Parameters : unsigned char *_ pb_TimerStatus     : Output signal level        |
 |                                                 0 : Timer not in progress  |
 |                                                 1 : Timer in progress      |
 +----------------------------------------------------------------------------+
@@ -928,8 +928,8 @@ INT i_APCI1710_GetTimerOutputLevel(struct comedi_device * dev,
 */
 
 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)
 {
        INT i_ReturnValue = 0;
        DWORD dw_TimerStatus;
@@ -949,7 +949,7 @@ INT i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
                                        /* Read the timer status */
                                        dw_TimerStatus = inl(devpriv->s_BoardInfos.ui_Address + 16 + (b_TimerNbr * 4) + (64 * b_ModulNbr));
 
-                                       *pb_TimerStatus = (BYTE) ((dw_TimerStatus) >> 8) & 1;
+                                       *pb_TimerStatus = (unsigned char) ((dw_TimerStatus) >> 8) & 1;
                                        printk("ProgressStatus : %d", *pb_TimerStatus);
                                } else {
                                        /* Timer not initialised see function */
@@ -976,9 +976,9 @@ INT i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_     i_APCI1710_WriteTimerValue                   |
-|                                       (BYTE_   b_BoardHandle,              |
-|                                        BYTE_   b_ModulNbr,                 |
-|                                        BYTE_   b_TimerNbr,                 |
+|                                       (unsigned char_   b_BoardHandle,              |
+|                                        unsigned char_   b_ModulNbr,                 |
+|                                        unsigned char_   b_TimerNbr,                 |
 |                                        ULONG_ ul_WriteValue)               |
 +----------------------------------------------------------------------------+
 | Task              : Write the value (ul_WriteValue) into the selected timer|
@@ -986,11 +986,11 @@ INT i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
 |                     The action in depend of the time mode selection.       |
 |                     See timer mode description table.                      |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_   b_BoardHandle     : Handle of board            |
+| Input Parameters  : unsigned char_   b_BoardHandle     : Handle of board            |
 |                                                 APCI-1710                  |
-|                     BYTE_   b_ModulNbr        : Selected module number     |
+|                     unsigned char_   b_ModulNbr        : Selected module number     |
 |                                                 (0 to 3)                   |
-|                     BYTE_   b_TimerNbr        : Timer number to write      |
+|                     unsigned char_   b_TimerNbr        : Timer number to write      |
 |                                                 (0 to 2)                   |
 |                     ULONG_ ul_WriteValue      : Value to write             |
 +----------------------------------------------------------------------------+
@@ -1007,7 +1007,7 @@ INT i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
 */
 
 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)
 {
        INT i_ReturnValue = 0;
index 4797c0b..e8dd496 100644 (file)
@@ -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);
index 1a54d3b..f8d5914 100644 (file)
@@ -62,11 +62,11 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_     i_APCI1710_InitChrono                        |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
-|                                        BYTE_     b_ChronoMode,             |
-|                                        BYTE_     b_PCIInputClock,          |
-|                                        BYTE_     b_TimingUnit,             |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        unsigned char_     b_ModulNbr,               |
+|                                        unsigned char_     b_ChronoMode,             |
+|                                        unsigned char_     b_PCIInputClock,          |
+|                                        unsigned char_     b_TimingUnit,             |
 |                                        ULONG_   ul_TimingInterval,         |
 |                                        PULONG_ pul_RealTimingInterval)
 
@@ -88,12 +88,12 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 |                     The mode 4 to 7 is appropriate for measuring the timing|
 |                     between  two event.                                    |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_   b_BoardHandle    : Handle of board APCI-1710   |
-| BYTE_   b_ModulNbr  CR_AREF(insn->chanspec)  : Module number to configure  |
+| Input Parameters  : unsigned char_   b_BoardHandle    : Handle of board APCI-1710   |
+| unsigned char_   b_ModulNbr  CR_AREF(insn->chanspec)  : Module number to configure  |
 |                                                (0 to 3)                    |
-| BYTE_   b_ChronoMode                         data[0]    : Chronometer action mode     |
+| unsigned char_   b_ChronoMode                                data[0]    : Chronometer action mode     |
 |                                                (0 to 7).                   |
-| BYTE_   b_PCIInputClock                      data[1] : Selection from PCI bus clock|
+| unsigned char_   b_PCIInputClock                     data[1] : Selection from PCI bus clock|
 |                                                - APCI1710_30MHZ :          |
 |                                                  The PC have a PCI bus     |
 |                                                  clock from 30 MHz         |
@@ -104,7 +104,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 |                                                  The APCI-1710 have a      |
 |                                                  integrated 40Mhz          |
 |                                                  quartz.                   |
-|               BYTE_   b_TimingUnit   data[2]    : Base timing unity (0 to 4) |
+|               unsigned char_   b_TimingUnit  data[2]    : Base timing unity (0 to 4) |
 |                                                 0 : ns                     |
 |                                                 1 : Âµs                     |
 |                                                 2 : ms                     |
@@ -141,12 +141,12 @@ INT i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
        double d_RealTimingInterval = 0;
        DWORD dw_ModeArray[8] =
                { 0x01, 0x05, 0x00, 0x04, 0x02, 0x0E, 0x0A, 0x06 };
-       BYTE b_ModulNbr, b_ChronoMode, b_PCIInputClock, b_TimingUnit;
+       unsigned char b_ModulNbr, b_ChronoMode, b_PCIInputClock, b_TimingUnit;
 
        b_ModulNbr = CR_AREF(insn->chanspec);
-       b_ChronoMode = (BYTE) data[0];
-       b_PCIInputClock = (BYTE) data[1];
-       b_TimingUnit = (BYTE) data[2];
+       b_ChronoMode = (unsigned char) data[0];
+       b_PCIInputClock = (unsigned char) data[1];
+       b_TimingUnit = (unsigned char) data[2];
        ul_TimingInterval = (ULONG) data[3];
        i_ReturnValue = insn->n;
 
@@ -786,10 +786,10 @@ INT i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_su
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_EnableChrono                          |
-|                                               (BYTE_ b_BoardHandle,        |
-|                                                BYTE_ b_ModulNbr,           |
-|                                                BYTE_ b_CycleMode,          |
-|                                                BYTE_ b_InterruptEnable)
+|                                               (unsigned char_ b_BoardHandle,        |
+|                                                unsigned char_ b_ModulNbr,           |
+|                                                unsigned char_ b_CycleMode,          |
+|                                                unsigned char_ b_InterruptEnable)
 INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device *dev,
 struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)                                                 |
 +----------------------------------------------------------------------------+
@@ -810,12 +810,12 @@ struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)                                            |
 |                     witch the " i_APCI1710_EnableChrono" function, if no   |
 |                     stop signal occur this start signal is ignored.
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle  : Handle of board APCI-1710       |
-|                     BYTE_ b_ModulNbr   CR_AREF(chanspec)  : Selected module number (0 to 3) |
+| Input Parameters  : unsigned char_ b_BoardHandle  : Handle of board APCI-1710       |
+|                     unsigned char_ b_ModulNbr   CR_AREF(chanspec)  : Selected module number (0 to 3) |
                                   data[0]  ENABle/Disable chrono
-|                     BYTE_ b_CycleMode    : Selected the chronometer        |
+|                     unsigned char_ b_CycleMode    : Selected the chronometer        |
 |                                  data[1]           acquisition mode                |
-|                     BYTE_ b_InterruptEnable : Enable or disable the        |
+|                     unsigned char_ b_InterruptEnable : Enable or disable the        |
 |                                   data[2]            chronometer interrupt.       |
 |                                               APCI1710_ENABLE:             |
 |                                               Enable the chronometer       |
@@ -844,11 +844,11 @@ INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = 0;
-       BYTE b_ModulNbr, b_CycleMode, b_InterruptEnable, b_Action;
+       unsigned char b_ModulNbr, b_CycleMode, b_InterruptEnable, b_Action;
        b_ModulNbr = CR_AREF(insn->chanspec);
-       b_Action = (BYTE) data[0];
-       b_CycleMode = (BYTE) data[1];
-       b_InterruptEnable = (BYTE) data[2];
+       b_Action = (unsigned char) data[0];
+       b_CycleMode = (unsigned char) data[1];
+       b_InterruptEnable = (unsigned char) data[2];
        i_ReturnValue = insn->n;
 
        /**************************/
@@ -1093,7 +1093,7 @@ struct comedi_insn *insn,unsigned int *data)                   |
 INT i_APCI1710_InsnReadChrono(struct comedi_device * dev, struct comedi_subdevice * s,
        struct comedi_insn * insn, unsigned int * data)
 {
-       BYTE b_ReadType;
+       unsigned char b_ReadType;
        INT i_ReturnValue = insn->n;
 
        b_ReadType = CR_CHAN(insn->chanspec);
@@ -1101,23 +1101,23 @@ INT i_APCI1710_InsnReadChrono(struct comedi_device * dev, struct comedi_subdevic
        switch (b_ReadType) {
        case APCI1710_CHRONO_PROGRESS_STATUS:
                i_ReturnValue = i_APCI1710_GetChronoProgressStatus(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (PBYTE) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
                break;
 
        case APCI1710_CHRONO_READVALUE:
                i_ReturnValue = i_APCI1710_ReadChronoValue(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
+                       (unsigned char) CR_AREF(insn->chanspec),
                        (UINT) insn->unused[0],
-                       (PBYTE) & data[0], (PULONG) & data[1]);
+                       (unsigned char *) & data[0], (PULONG) & data[1]);
                break;
 
        case APCI1710_CHRONO_CONVERTVALUE:
                i_ReturnValue = i_APCI1710_ConvertChronoValue(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
+                       (unsigned char) CR_AREF(insn->chanspec),
                        (ULONG) insn->unused[0],
                        (PULONG) & data[0],
-                       (PBYTE) & data[1],
-                       (PBYTE) & data[2],
+                       (unsigned char *) & data[1],
+                       (unsigned char *) & data[2],
                        (PUINT) & data[3],
                        (PUINT) & data[4], (PUINT) & data[5]);
                break;
@@ -1159,15 +1159,15 @@ INT i_APCI1710_InsnReadChrono(struct comedi_device * dev, struct comedi_subdevic
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_GetChronoProgressStatus               |
-|                               (BYTE_    b_BoardHandle,                     |
-|                                BYTE_    b_ModulNbr,                        |
-|                                PBYTE_  pb_ChronoStatus)                    |
+|                               (unsigned char_    b_BoardHandle,                     |
+|                                unsigned char_    b_ModulNbr,                        |
+|                                unsigned char *_  pb_ChronoStatus)                    |
 +----------------------------------------------------------------------------+
 | Task              : Return the chronometer status (pb_ChronoStatus) from   |
 |                     selected chronometer module (b_ModulNbr).              |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle  : Handle of board APCI-1710       |
-|                     BYTE_ b_ModulNbr     : Selected module number (0 to 3) |
+| Input Parameters  : unsigned char_ b_BoardHandle  : Handle of board APCI-1710       |
+|                     unsigned char_ b_ModulNbr     : Selected module number (0 to 3) |
 +----------------------------------------------------------------------------+
 | Output Parameters : PULONG_  pb_ChronoStatus : Return the chronometer      |
 |                                                status.                     |
@@ -1195,7 +1195,7 @@ INT i_APCI1710_InsnReadChrono(struct comedi_device * dev, struct comedi_subdevic
 */
 
 INT i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev,
-       BYTE b_ModulNbr, PBYTE pb_ChronoStatus)
+       unsigned char b_ModulNbr, unsigned char * pb_ChronoStatus)
 {
        INT i_ReturnValue = 0;
        DWORD dw_Status;
@@ -1295,10 +1295,10 @@ INT i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_ReadChronoValue                       |
-|                               (BYTE_     b_BoardHandle,                    |
-|                                BYTE_     b_ModulNbr,                       |
+|                               (unsigned char_     b_BoardHandle,                    |
+|                                unsigned char_     b_ModulNbr,                       |
 |                                UINT_    ui_TimeOut,                        |
-|                                PBYTE_   pb_ChronoStatus,                   |
+|                                unsigned char *_   pb_ChronoStatus,                   |
 |                                PULONG_ pul_ChronoValue)                    |
 +----------------------------------------------------------------------------+
 | Task              : Return the chronometer status (pb_ChronoStatus) and the|
@@ -1323,8 +1323,8 @@ INT i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev,
 |                     "i_APCI1710_InitChrono" function and the time unity is |
 |                     the b_TimingUnit from "i_APCI1710_InitChrono" function|
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle  : Handle of board APCI-1710       |
-|                     BYTE_ b_ModulNbr     : Selected module number (0 to 3) |
+| Input Parameters  : unsigned char_ b_BoardHandle  : Handle of board APCI-1710       |
+|                     unsigned char_ b_ModulNbr     : Selected module number (0 to 3) |
 +----------------------------------------------------------------------------+
 | Output Parameters : PULONG_  pb_ChronoStatus : Return the chronometer      |
 |                                                status.                     |
@@ -1356,8 +1356,8 @@ INT i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev,
 */
 
 INT i_APCI1710_ReadChronoValue(struct comedi_device * dev,
-       BYTE b_ModulNbr,
-       UINT ui_TimeOut, PBYTE pb_ChronoStatus, PULONG pul_ChronoValue)
+       unsigned char b_ModulNbr,
+       UINT ui_TimeOut, unsigned char * pb_ChronoStatus, PULONG pul_ChronoValue)
 {
        INT i_ReturnValue = 0;
        DWORD dw_Status;
@@ -1581,12 +1581,12 @@ INT i_APCI1710_ReadChronoValue(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_ConvertChronoValue                    |
-|                               (BYTE_     b_BoardHandle,                    |
-|                                BYTE_     b_ModulNbr,                       |
+|                               (unsigned char_     b_BoardHandle,                    |
+|                                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)                     |
@@ -1594,15 +1594,15 @@ INT i_APCI1710_ReadChronoValue(struct comedi_device * dev,
 | Task              : Convert the chronometer measured timing                |
 |                     (ul_ChronoValue) in to h, mn, s, ms, Âµs, ns.           |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_   b_BoardHandle : Handle of board APCI-1710      |
-|                     BYTE_   b_ModulNbr    : Selected module number (0 to 3)|
+| Input Parameters  : unsigned char_   b_BoardHandle : Handle of board APCI-1710      |
+|                     unsigned char_   b_ModulNbr    : Selected module number (0 to 3)|
 |                     ULONG_ ul_ChronoValue : Measured chronometer timing    |
 |                                             value.                         |
 |                                             See"i_APCI1710_ReadChronoValue"|
 +----------------------------------------------------------------------------+
 | Output Parameters : PULONG_   pul_Hour        : Chronometer timing hour    |
-|                     PBYTE_     pb_Minute      : Chronometer timing minute  |
-|                     PBYTE_     pb_Second      : Chronometer timing second  |
+|                     unsigned char *_     pb_Minute      : Chronometer timing minute  |
+|                     unsigned char *_     pb_Second      : Chronometer timing second  |
 |                     PUINT_    pui_MilliSecond  : Chronometer timing mini   |
 |                                                 second                     |
 |                     PUINT_    pui_MicroSecond : Chronometer timing micro   |
@@ -1620,11 +1620,11 @@ INT i_APCI1710_ReadChronoValue(struct comedi_device * dev,
 */
 
 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)
 {
        INT i_ReturnValue = 0;
@@ -1689,7 +1689,7 @@ INT i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
 
                                        d_Minute = d_Hour - *pul_Hour;
                                        d_Minute = d_Minute * 60;
-                                       *pb_Minute = (BYTE) d_Minute;
+                                       *pb_Minute = (unsigned char) d_Minute;
 
                            /************************/
                                        /* Calculate the second */
@@ -1697,7 +1697,7 @@ INT i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
 
                                        d_Second = d_Minute - *pb_Minute;
                                        d_Second = d_Second * 60;
-                                       *pb_Second = (BYTE) d_Second;
+                                       *pb_Second = (unsigned char) d_Second;
 
                            /*****************************/
                                        /* Calculate the mini second */
@@ -1764,9 +1764,9 @@ INT i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
 |                     parameter b_Channel. Setting an output means setting an|
 |                     output high.                                           |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle   : Handle of board APCI-1710      |
-|                     BYTE_ b_ModulNbr      : Selected module number (0 to 3)|
-|                     BYTE_ b_OutputChannel : Selection from digital output  |
+| Input Parameters  : unsigned char_ b_BoardHandle   : Handle of board APCI-1710      |
+|                     unsigned char_ b_ModulNbr      : Selected module number (0 to 3)|
+|                     unsigned char_ b_OutputChannel : Selection from digital output  |
 |                           CR_CHAN()                  channel (0 to 2)               |
 |                                              0 : Channel H                 |
 |                                              1 : Channel A                 |
@@ -1787,19 +1787,19 @@ INT i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_SetChronoChlOff                       |
-|                               (BYTE_  b_BoardHandle,                       |
-|                                BYTE_  b_ModulNbr,                          |
-|                                BYTE_  b_OutputChannel)                     |
+|                               (unsigned char_  b_BoardHandle,                       |
+|                                unsigned char_  b_ModulNbr,                          |
+|                                unsigned char_  b_OutputChannel)                     |
 +----------------------------------------------------------------------------+
 | Task              : Resets the output witch has been passed with the       |
 |                     parameter b_Channel. Resetting an output means setting |
 |                     an output low.                                         |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle   : Handle of board APCI-1710
+| Input Parameters  : unsigned char_ b_BoardHandle   : Handle of board APCI-1710
                         data[0] : Chl ON, Chl OFF , Chl Read , Port Read
 
-|                     BYTE_ b_ModulNbr  CR_AREF    : Selected module number (0 to 3)|
-|                     BYTE_ b_OutputChannel CR_CHAN : Selection from digital output  |
+|                     unsigned char_ b_ModulNbr  CR_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                 |
@@ -1820,24 +1820,24 @@ INT i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_ReadChronoChlValue                    |
-|                               (BYTE_   b_BoardHandle,                      |
-|                                BYTE_   b_ModulNbr,                         |
-|                                BYTE_   b_InputChannel,                     |
-|                                PBYTE_ pb_ChannelStatus)                    |
+|                               (unsigned char_   b_BoardHandle,                      |
+|                                unsigned char_   b_ModulNbr,                         |
+|                                unsigned char_   b_InputChannel,                     |
+|                                unsigned char *_ pb_ChannelStatus)                    |
 +----------------------------------------------------------------------------+
 | Task              : Return the status from selected digital input          |
 |                     (b_InputChannel) from selected chronometer             |
 |                     module (b_ModulNbr).                                   |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle   : Handle of board APCI-1710      |
-|                     BYTE_ b_ModulNbr      : Selected module number (0 to 3)|
-|                     BYTE_ b_InputChannel  : Selection from digital input   |
+| Input Parameters  : unsigned char_ b_BoardHandle   : Handle of board APCI-1710      |
+|                     unsigned char_ b_ModulNbr      : Selected module number (0 to 3)|
+|                     unsigned char_ b_InputChannel  : Selection from digital input   |
 |                                             channel (0 to 2)               |
 |                                   CR_CHAN()             0 : Channel E               |
 |                                                1 : Channel F               |
 |                                                2 : Channel G               |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_ChannelStatus : Digital input channel status.|
+| Output Parameters : unsigned char *_ pb_ChannelStatus : Digital input channel status.|
 |                                data[0]                0 : Channel is not active   |
 |                                                1 : Channel is active       |
 +----------------------------------------------------------------------------+
@@ -1854,17 +1854,17 @@ INT i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_ReadChronoPortValue                   |
-|                               (BYTE_   b_BoardHandle,                      |
-|                                BYTE_   b_ModulNbr,                         |
-|                                PBYTE_ pb_PortValue)                        |
+|                               (unsigned char_   b_BoardHandle,                      |
+|                                unsigned char_   b_ModulNbr,                         |
+|                                unsigned char *_ pb_PortValue)                        |
 +----------------------------------------------------------------------------+
 | Task              : Return the status from digital inputs port from        |
 |                     selected  (b_ModulNbr) chronometer module.             |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle   : Handle of board APCI-1710      |
-|                     BYTE_ b_ModulNbr      : Selected module number (0 to 3)|
+| Input Parameters  : unsigned char_ b_BoardHandle   : Handle of board APCI-1710      |
+|                     unsigned char_ b_ModulNbr      : Selected module number (0 to 3)|
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_PortValue   : Digital inputs port status.
+| Output Parameters : unsigned char *_ pb_PortValue   : Digital inputs port status.
 |                     data[0]
 +----------------------------------------------------------------------------+
 | Return Value      :  0: No error                                           |
@@ -1880,14 +1880,14 @@ INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = 0;
-       BYTE b_ModulNbr, b_OutputChannel, b_InputChannel, b_IOType;
+       unsigned char b_ModulNbr, b_OutputChannel, b_InputChannel, b_IOType;
        DWORD dw_Status;
-       PBYTE pb_ChannelStatus;
-       PBYTE pb_PortValue;
+       unsigned char * pb_ChannelStatus;
+       unsigned char * pb_PortValue;
 
        b_ModulNbr = CR_AREF(insn->chanspec);
        i_ReturnValue = insn->n;
-       b_IOType = (BYTE) data[0];
+       b_IOType = (unsigned char) data[0];
 
        /**************************/
        /* Test the module number */
@@ -1915,7 +1915,7 @@ INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
                                case APCI1710_CHRONO_SET_CHANNELOFF:
 
                                        b_OutputChannel =
-                                               (BYTE) CR_CHAN(insn->chanspec);
+                                               (unsigned char) CR_CHAN(insn->chanspec);
                                        if (b_OutputChannel <= 2) {
 
                                                outl(0, devpriv->s_BoardInfos.
@@ -1938,7 +1938,7 @@ INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
                                case APCI1710_CHRONO_SET_CHANNELON:
 
                                        b_OutputChannel =
-                                               (BYTE) CR_CHAN(insn->chanspec);
+                                               (unsigned char) CR_CHAN(insn->chanspec);
                                        if (b_OutputChannel <= 2) {
 
                                                outl(1, devpriv->s_BoardInfos.
@@ -1962,9 +1962,9 @@ INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
                 /**********************************/
                                        /* Test the digital input channel */
                 /**********************************/
-                                       pb_ChannelStatus = (PBYTE) & data[0];
+                                       pb_ChannelStatus = (unsigned char *) & data[0];
                                        b_InputChannel =
-                                               (BYTE) CR_CHAN(insn->chanspec);
+                                               (unsigned char) CR_CHAN(insn->chanspec);
 
                                        if (b_InputChannel <= 2) {
 
@@ -1975,7 +1975,7 @@ INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
                                                        (64 * b_ModulNbr));
 
                                                *pb_ChannelStatus =
-                                                       (BYTE) (((dw_Status >>
+                                                       (unsigned char) (((dw_Status >>
                                                                        b_InputChannel)
                                                                & 1) ^ 1);
                                        }       // if ((b_InputChannel >= 0) && (b_InputChannel <= 2))
@@ -1992,7 +1992,7 @@ INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
 
                                case APCI1710_CHRONO_READ_PORT:
 
-                                       pb_PortValue = (PBYTE) & data[0];
+                                       pb_PortValue = (unsigned char *) & data[0];
 
                                        dw_Status =
                                                inl(devpriv->s_BoardInfos.
@@ -2000,7 +2000,7 @@ INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
                                                (64 * b_ModulNbr));
 
                                        *pb_PortValue =
-                                               (BYTE) ((dw_Status & 0x7) ^ 7);
+                                               (unsigned char) ((dw_Status & 0x7) ^ 7);
                                        break;
                                }
                        } else {
index 26b50ce..31f76d5 100644 (file)
@@ -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);
 
index 8be27ae..37af242 100644 (file)
@@ -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 {
                 /*******************************/
index 1062f2f..cad8ac9 100644 (file)
@@ -89,32 +89,32 @@ INT i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdev
        case APCI1710_INCCPT_INITCOUNTER:
                i_ReturnValue = i_APCI1710_InitCounter(dev,
                        CR_AREF(insn->chanspec),
-                       (BYTE) data[0],
-                       (BYTE) data[1],
-                       (BYTE) data[2], (BYTE) data[3], (BYTE) data[4]);
+                       (unsigned char) data[0],
+                       (unsigned char) data[1],
+                       (unsigned char) data[2], (unsigned char) data[3], (unsigned char) data[4]);
                break;
 
        case APCI1710_INCCPT_COUNTERAUTOTEST:
                i_ReturnValue = i_APCI1710_CounterAutoTest(dev,
-                       (PBYTE) & data[0]);
+                       (unsigned char *) & data[0]);
                break;
 
        case APCI1710_INCCPT_INITINDEX:
                i_ReturnValue = i_APCI1710_InitIndex(dev,
                        CR_AREF(insn->chanspec),
-                       (BYTE) data[0],
-                       (BYTE) data[1], (BYTE) data[2], (BYTE) data[3]);
+                       (unsigned char) data[0],
+                       (unsigned char) data[1], (unsigned char) data[2], (unsigned char) data[3]);
                break;
 
        case APCI1710_INCCPT_INITREFERENCE:
                i_ReturnValue = i_APCI1710_InitReference(dev,
-                       CR_AREF(insn->chanspec), (BYTE) data[0]);
+                       CR_AREF(insn->chanspec), (unsigned char) data[0]);
                break;
 
        case APCI1710_INCCPT_INITEXTERNALSTROBE:
                i_ReturnValue = i_APCI1710_InitExternalStrobe(dev,
                        CR_AREF(insn->chanspec),
-                       (BYTE) data[0], (BYTE) data[1]);
+                       (unsigned char) data[0], (unsigned char) data[1]);
                break;
 
        case APCI1710_INCCPT_INITCOMPARELOGIC:
@@ -125,8 +125,8 @@ INT i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdev
        case APCI1710_INCCPT_INITFREQUENCYMEASUREMENT:
                i_ReturnValue = i_APCI1710_InitFrequencyMeasurement(dev,
                        CR_AREF(insn->chanspec),
-                       (BYTE) data[0],
-                       (BYTE) data[1], (ULONG) data[2], (PULONG) & data[0]);
+                       (unsigned char) data[0],
+                       (unsigned char) data[1], (ULONG) data[2], (PULONG) & data[0]);
                break;
 
        default:
@@ -142,13 +142,13 @@ INT i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdev
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_InitCounter                           |
-|                               (BYTE_          b_BoardHandle,               |
-|                                BYTE_          b_ModulNbr,                  |
-|                                BYTE_          b_CounterRange,              |
-|                                BYTE_          b_FirstCounterModus,         |
-|                                BYTE_          b_FirstCounterOption,        |
-|                                BYTE_          b_SecondCounterModus,        |
-|                                BYTE_          b_SecondCounterOption)       |
+|                               (unsigned char_          b_BoardHandle,               |
+|                                unsigned char_          b_ModulNbr,                  |
+|                                unsigned char_          b_CounterRange,              |
+|                                unsigned char_          b_FirstCounterModus,         |
+|                                unsigned char_          b_FirstCounterOption,        |
+|                                unsigned char_          b_SecondCounterModus,        |
+|                                unsigned char_          b_SecondCounterOption)       |
 +----------------------------------------------------------------------------+
 | Task              : Configure the counter operating mode from selected     |
 |                     module (b_ModulNbr). You must calling this function be |
@@ -273,17 +273,17 @@ INT i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdev
 | +----------------------+--------------------+----------------------------+ |
 |                                                                            |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle         : Handle of board APCI-1710|
-|                     BYTE_ b_ModulNbr            : Module number to         |
+| Input Parameters  : unsigned char_ b_BoardHandle         : Handle of board APCI-1710|
+|                     unsigned char_ b_ModulNbr            : Module number to         |
 |                                                   configure (0 to 3)       |
-|                     BYTE_ b_CounterRange        : Selection form counter   |
+|                     unsigned char_ b_CounterRange        : Selection form counter   |
 |                                                   range.                   |
-|                     BYTE_ b_FirstCounterModus   : First counter operating  |
+|                     unsigned char_ b_FirstCounterModus   : First counter operating  |
 |                                                   mode.                    |
-|                     BYTE_ b_FirstCounterOption  : First counter  option.   |
-|                     BYTE_ b_SecondCounterModus  : Second counter operating |
+|                     unsigned char_ b_FirstCounterOption  : First counter  option.   |
+|                     unsigned char_ b_SecondCounterModus  : Second counter operating |
 |                                                   mode.                    |
-|                     BYTE_ b_SecondCounterOption : Second counter  option.  |
+|                     unsigned char_ b_SecondCounterOption : Second counter  option.  |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -300,11 +300,11 @@ INT i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdev
 */
 
 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_ReturnValue = 0;
 
@@ -508,8 +508,8 @@ INT i_APCI1710_InitCounter(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_CounterAutoTest                       |
-|                                               (BYTE_     b_BoardHandle,    |
-|                                                PBYTE_   pb_TestStatus)     |
+|                                               (unsigned char_     b_BoardHandle,    |
+|                                                unsigned char *_   pb_TestStatus)     |
 +----------------------------------------------------------------------------+
 | Task              : A test mode is intended for testing the component and  |
 |                     the connected periphery. All the 8-bit counter chains  |
@@ -535,9 +535,9 @@ INT i_APCI1710_InitCounter(struct comedi_device * dev,
 |              |    1000         | Error detected of counter 3 |             |
 |              +-----------------+-----------------------------+             |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_   b_BoardHandle : Handle of board APCI-1710      |  |
+| Input Parameters  : unsigned char_   b_BoardHandle : Handle of board APCI-1710      |  |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_TestStatus  : Auto test conclusion. See table|
+| Output Parameters : unsigned char *_ pb_TestStatus  : Auto test conclusion. See table|
 +----------------------------------------------------------------------------+
 | Return Value      :  0: No error                                           |
 |                     -1: The handle parameter of the board is wrong         |
@@ -545,9 +545,9 @@ INT i_APCI1710_InitCounter(struct comedi_device * dev,
 +----------------------------------------------------------------------------+
 */
 
-INT i_APCI1710_CounterAutoTest(struct comedi_device * dev, PBYTE pb_TestStatus)
+INT i_APCI1710_CounterAutoTest(struct comedi_device * dev, unsigned char * pb_TestStatus)
 {
-       BYTE b_ModulCpt = 0;
+       unsigned char b_ModulCpt = 0;
        INT i_ReturnValue = 0;
        DWORD dw_LathchValue;
 
@@ -632,12 +632,12 @@ INT i_APCI1710_CounterAutoTest(struct comedi_device * dev, PBYTE pb_TestStatus)
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name     : _INT_ i_APCI1710_InitIndex (BYTE_ b_BoardHandle,       |
-|                                                 BYTE_ b_ModulNbr,          |
-|                                                 BYTE_ b_ReferenceAction,   |
-|                                                 BYTE_ b_IndexOperation,    |
-|                                                 BYTE_ b_AutoMode,          |
-|                                                 BYTE_ b_InterruptEnable)   |
+| Function Name     : _INT_ i_APCI1710_InitIndex (unsigned char_ b_BoardHandle,       |
+|                                                 unsigned char_ b_ModulNbr,          |
+|                                                 unsigned char_ b_ReferenceAction,   |
+|                                                 unsigned char_ b_IndexOperation,    |
+|                                                 unsigned char_ b_AutoMode,          |
+|                                                 unsigned char_ b_InterruptEnable)   |
 +----------------------------------------------------------------------------+
 | Task              : Initialise the index corresponding to the selected     |
 |                     module (b_ModulNbr). If a INDEX flag occur, you have   |
@@ -665,10 +665,10 @@ INT i_APCI1710_CounterAutoTest(struct comedi_device * dev, PBYTE pb_TestStatus)
 |           |                        | value is cleared (32-Bit)          |  |
 |           +------------------------+------------------------------------+  |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
-|                     BYTE_ b_ReferenceAction : Determine if the reference   |
+|                     unsigned char_ b_ReferenceAction : Determine if the reference   |
 |                                               must set or no for the       |
 |                                               acceptance from index        |
 |                                               APCI1710_ENABLE :            |
@@ -677,15 +677,15 @@ INT i_APCI1710_CounterAutoTest(struct comedi_device * dev, PBYTE pb_TestStatus)
 |                                               APCI1710_DISABLE :           |
 |                                                  Reference have not        |
 |                                                  importance                |
-|                     BYTE_ b_IndexOperation  : Index operating mode.        |
+|                     unsigned char_ b_IndexOperation  : Index operating mode.        |
 |                                               See table.                   |
-|                     BYTE_ b_AutoMode        : Enable or disable the        |
+|                     unsigned char_ b_AutoMode        : Enable or disable the        |
 |                                               automatic index reset.       |
 |                                               APCI1710_ENABLE :            |
 |                                                 Enable the automatic mode  |
 |                                               APCI1710_DISABLE :           |
 |                                                 Disable the automatic mode |
-|                     BYTE_ b_InterruptEnable : Enable or disable the        |
+|                     unsigned char_ b_InterruptEnable : Enable or disable the        |
 |                                               interrupt.                   |
 |                                               APCI1710_ENABLE :            |
 |                                               Enable the interrupt         |
@@ -709,9 +709,9 @@ INT i_APCI1710_CounterAutoTest(struct comedi_device * dev, PBYTE 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_ReturnValue = 0;
 
@@ -1119,9 +1119,9 @@ INT i_APCI1710_InitIndex(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_InitReference                         |
-|                                                (BYTE_ b_BoardHandle,       |
-|                                                 BYTE_ b_ModulNbr,          |
-|                                                 BYTE_ b_ReferenceLevel)    |
+|                                                (unsigned char_ b_BoardHandle,       |
+|                                                 unsigned char_ b_ModulNbr,          |
+|                                                 unsigned char_ b_ReferenceLevel)    |
 +----------------------------------------------------------------------------+
 | Task              : Initialise the reference corresponding to the selected |
 |                     module (b_ModulNbr).                                   |
@@ -1136,10 +1136,10 @@ INT i_APCI1710_InitIndex(struct comedi_device * dev,
 |             |   APCI1710_HIGH    |  Reference occur if "1" |               |
 |             +--------------------+-------------------------+               |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
-|                     BYTE_ b_ReferenceLevel  : Reference level.             |
+|                     unsigned char_ b_ReferenceLevel  : Reference level.             |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -1153,7 +1153,7 @@ INT i_APCI1710_InitIndex(struct comedi_device * dev,
 */
 
 INT i_APCI1710_InitReference(struct comedi_device * dev,
-       BYTE b_ModulNbr, BYTE b_ReferenceLevel)
+       unsigned char b_ModulNbr, unsigned char b_ReferenceLevel)
 {
        INT i_ReturnValue = 0;
 
@@ -1245,21 +1245,21 @@ INT i_APCI1710_InitReference(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_    i_APCI1710_InitExternalStrobe                |
-|                                      (BYTE_ b_BoardHandle,                |
-|                                       BYTE_ b_ModulNbr,                   |
-|                                       BYTE_ b_ExternalStrobe,             |
-|                                       BYTE_ b_ExternalStrobeLevel)        |
+|                                      (unsigned char_ b_BoardHandle,                |
+|                                       unsigned char_ b_ModulNbr,                   |
+|                                       unsigned char_ b_ExternalStrobe,             |
+|                                       unsigned char_ b_ExternalStrobeLevel)        |
 +----------------------------------------------------------------------------+
 | Task              : Initialises the external strobe level corresponding to |
 |                    the selected module (b_ModulNbr).                      |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
-|                    BYTE_ b_ExternalStrobe  : External strobe selection    |
+|                    unsigned char_ b_ExternalStrobe  : External strobe selection    |
 |                                              0 : External strobe A        |
 |                                              1 : External strobe B        |
-|                    BYTE_ b_ExternalStrobeLevel : External strobe level    |
+|                    unsigned char_ b_ExternalStrobeLevel : External strobe level    |
 |                                              APCI1710_LOW :               |
 |                                              External latch occurs if "0" |
 |                                              APCI1710_HIGH :              |
@@ -1278,7 +1278,7 @@ INT i_APCI1710_InitReference(struct comedi_device * dev,
 */
 
 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_ReturnValue = 0;
 
@@ -1368,16 +1368,16 @@ INT i_APCI1710_InitExternalStrobe(struct comedi_device * dev,
        /*
           +----------------------------------------------------------------------------+
           | Function Name     : _INT_ i_APCI1710_InitCompareLogic                      |
-          |                               (BYTE_   b_BoardHandle,                      |
-          |                                BYTE_   b_ModulNbr,                         |
+          |                               (unsigned char_   b_BoardHandle,                      |
+          |                                unsigned char_   b_ModulNbr,                         |
           |                                UINT_  ui_CompareValue)                     |
           +----------------------------------------------------------------------------+
           | Task              : Set the 32-Bit compare value. At that moment that the  |
           |                     incremental counter arrive to the compare value        |
           |                     (ui_CompareValue) a interrupt is generated.            |
           +----------------------------------------------------------------------------+
-          | Input Parameters  : BYTE_  b_BoardHandle    : Handle of board APCI-1710    |
-          |                     BYTE_  b_ModulNbr       : Module number to configure   |
+          | 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         |
           +----------------------------------------------------------------------------+
@@ -1392,7 +1392,7 @@ INT i_APCI1710_InitExternalStrobe(struct comedi_device * dev,
         */
 
 INT i_APCI1710_InitCompareLogic(struct comedi_device * dev,
-       BYTE b_ModulNbr, UINT ui_CompareValue)
+       unsigned char b_ModulNbr, UINT ui_CompareValue)
 {
        INT i_ReturnValue = 0;
 
@@ -1440,10 +1440,10 @@ INT i_APCI1710_InitCompareLogic(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_InitFrequencyMeasurement              |
-|                              (BYTE_           b_BoardHandle,              |
-|                               BYTE_           b_ModulNbr,                 |
-|                               BYTE_           b_PCIInputClock,            |
-|                               BYTE_           b_TimingUnity,              |
+|                              (unsigned char_          b_BoardHandle,              |
+|                               unsigned char_          b_ModulNbr,                 |
+|                               unsigned char_          b_PCIInputClock,            |
+|                               unsigned char_          b_TimingUnity,              |
 |                               ULONG_         ul_TimingInterval,           |
 |                               PULONG_       pul_RealTimingInterval)       |
 +----------------------------------------------------------------------------+
@@ -1456,10 +1456,10 @@ INT i_APCI1710_InitCompareLogic(struct comedi_device * dev,
 |                    you call up any other function which gives access to   |
 |                    the frequency measurement.                             |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_  b_BoardHandle    : Handle of board APCI-1710    |
-|                    BYTE_  b_ModulNbr       : Number of the module to be   |
+| Input Parameters  : unsigned char_  b_BoardHandle    : Handle of board APCI-1710    |
+|                    unsigned char_  b_ModulNbr              : Number of the module to be   |
 |                                              configured (0 to 3)          |
-|                    BYTE_  b_PCIInputClock  : Selection of the PCI bus     |
+|                    unsigned char_  b_PCIInputClock  :        Selection of the PCI bus     |
 |                                              clock                        |
 |                                              - APCI1710_30MHZ :           |
 |                                                The PC has a PCI bus clock |
@@ -1467,7 +1467,7 @@ INT i_APCI1710_InitCompareLogic(struct comedi_device * dev,
 |                                              - APCI1710_33MHZ :           |
 |                                                The PC has a PCI bus clock |
 |                                                of 33 MHz                  |
-|                    BYTE_  b_TimingUnity    : Base time unit (0 to 2)      |
+|                    unsigned char_  b_TimingUnity    : Base time unit (0 to 2)      |
 |                                                0 : ns                     |
 |                                                1 : Ã¦s                     |
 |                                                2 : ms                     |
@@ -1488,9 +1488,9 @@ INT i_APCI1710_InitCompareLogic(struct comedi_device * dev,
 */
 
 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)
 {
        INT i_ReturnValue = 0;
@@ -2026,7 +2026,7 @@ INT i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, struct comedi_subdevic
        switch (ui_BitsType) {
        case APCI1710_INCCPT_CLEARCOUNTERVALUE:
                i_ReturnValue = i_APCI1710_ClearCounterValue(dev,
-                       (BYTE) CR_AREF(insn->chanspec));
+                       (unsigned char) CR_AREF(insn->chanspec));
                break;
 
        case APCI1710_INCCPT_CLEARALLCOUNTERVALUE:
@@ -2035,28 +2035,28 @@ INT i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, struct comedi_subdevic
 
        case APCI1710_INCCPT_SETINPUTFILTER:
                i_ReturnValue = i_APCI1710_SetInputFilter(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
-                       (BYTE) data[0], (BYTE) data[1]);
+                       (unsigned char) CR_AREF(insn->chanspec),
+                       (unsigned char) data[0], (unsigned char) data[1]);
                break;
 
        case APCI1710_INCCPT_LATCHCOUNTER:
                i_ReturnValue = i_APCI1710_LatchCounter(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (BYTE) data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char) data[0]);
                break;
 
        case APCI1710_INCCPT_SETINDEXANDREFERENCESOURCE:
                i_ReturnValue = i_APCI1710_SetIndexAndReferenceSource(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (BYTE) data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char) data[0]);
                break;
 
        case APCI1710_INCCPT_SETDIGITALCHLON:
                i_ReturnValue = i_APCI1710_SetDigitalChlOn(dev,
-                       (BYTE) CR_AREF(insn->chanspec));
+                       (unsigned char) CR_AREF(insn->chanspec));
                break;
 
        case APCI1710_INCCPT_SETDIGITALCHLOFF:
                i_ReturnValue = i_APCI1710_SetDigitalChlOff(dev,
-                       (BYTE) CR_AREF(insn->chanspec));
+                       (unsigned char) CR_AREF(insn->chanspec));
                break;
 
        default:
@@ -2071,14 +2071,14 @@ INT i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, struct comedi_subdevic
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_ClearCounterValue                     |
-|                               (BYTE_      b_BoardHandle,                   |
-|                                BYTE_       b_ModulNbr)                     |
+|                               (unsigned char_      b_BoardHandle,                   |
+|                                unsigned char_       b_ModulNbr)                     |
 +----------------------------------------------------------------------------+
 | Task              : Clear the counter value from selected module           |
 |                     (b_ModulNbr).                                          |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle : Handle of board APCI-1710        |
-|                     BYTE_ b_ModulNbr    : Module number to configure       |
+| Input Parameters  : unsigned char_ b_BoardHandle : Handle of board APCI-1710        |
+|                     unsigned char_ b_ModulNbr    : Module number to configure       |
 |                                           (0 to 3)                         |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
@@ -2091,7 +2091,7 @@ INT i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, struct comedi_subdevic
 +----------------------------------------------------------------------------+
 */
 
-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_ReturnValue = 0;
 
@@ -2137,11 +2137,11 @@ INT i_APCI1710_ClearCounterValue(struct comedi_device * dev, BYTE b_ModulNbr)
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_ClearAllCounterValue                  |
-|                               (BYTE_      b_BoardHandle)                   |
+|                               (unsigned char_      b_BoardHandle)                   |
 +----------------------------------------------------------------------------+
 | Task              : Clear all counter value.                               |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle : Handle of board APCI-1710        |
+| Input Parameters  : unsigned char_ b_BoardHandle : Handle of board APCI-1710        |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -2153,7 +2153,7 @@ INT i_APCI1710_ClearCounterValue(struct comedi_device * dev, BYTE b_ModulNbr)
 
 INT i_APCI1710_ClearAllCounterValue(struct comedi_device * dev)
 {
-       BYTE b_ModulCpt = 0;
+       unsigned char b_ModulCpt = 0;
        INT i_ReturnValue = 0;
 
        /********************************/
@@ -2204,18 +2204,18 @@ INT i_APCI1710_ClearAllCounterValue(struct comedi_device * dev)
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_SetInputFilter                        |
-|                                      (BYTE_ b_BoardHandle,                |
-|                                       BYTE_ b_Module,                     |
-|                                       BYTE_ b_PCIInputClock,              |
-|                                       BYTE_ b_Filter)                     |
+|                                      (unsigned char_ b_BoardHandle,                |
+|                                       unsigned char_ b_Module,                     |
+|                                       unsigned char_ b_PCIInputClock,              |
+|                                       unsigned char_ b_Filter)                    |
 +----------------------------------------------------------------------------+
 | Task              : Disable or enable the software filter from selected    |
 |                    module (b_ModulNbr). b_Filter determine the filter time|
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_  b_BoardHandle    : Handle of board APCI-1710    |
-|                    BYTE_  b_ModulNbr       : Number of the module to be   |
+| Input Parameters  : unsigned char_  b_BoardHandle    : Handle of board APCI-1710    |
+|                    unsigned char_  b_ModulNbr              : Number of the module to be   |
 |                                              configured (0 to 3)          |
-|                    BYTE_  b_PCIInputClock  : Selection of the PCI bus     |
+|                    unsigned char_  b_PCIInputClock  :        Selection of the PCI bus     |
 |                                              clock                        |
 |                                              - APCI1710_30MHZ :           |
 |                                                The PC has a PCI bus clock |
@@ -2226,7 +2226,7 @@ INT i_APCI1710_ClearAllCounterValue(struct comedi_device * dev)
 |                                              - APCI1710_40MHZ :           |
 |                                                The APCI1710 has a 40MHz    |
 |                                                quartz                     |
-|                    BYTE_  b_Filter         : Filter selection             |
+|                    unsigned char_  b_Filter        : Filter selection             |
 |                                                                            |
 |                              30 MHz                                       |
 |                              ------                                       |
@@ -2298,7 +2298,7 @@ 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_ReturnValue = 0;
        DWORD dw_Status = 0;
@@ -2535,18 +2535,18 @@ INT i_APCI1710_SetInputFilter(struct comedi_device * dev,
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name     : _INT_ i_APCI1710_LatchCounter (BYTE_ b_BoardHandle,    |
-|                                                    BYTE_ b_ModulNbr,       |
-|                                                    BYTE_ b_LatchReg)       |
+| Function Name     : _INT_ i_APCI1710_LatchCounter (unsigned char_ b_BoardHandle,    |
+|                                                    unsigned char_ b_ModulNbr,       |
+|                                                    unsigned char_ b_LatchReg)       |
 +----------------------------------------------------------------------------+
 | Task              : Latch the courant value from selected module           |
 |                     (b_ModulNbr) in to the selected latch register         |
 |                     (b_LatchReg).                                          |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle : Handle of board APCI-1710        |
-|                     BYTE_ b_ModulNbr    : Module number to configure       |
+| Input Parameters  : unsigned char_ b_BoardHandle : Handle of board APCI-1710        |
+|                     unsigned char_ b_ModulNbr    : Module number to configure       |
 |                                           (0 to 3)                         |
-|                     BYTE_ b_LatchReg    : Selected latch register          |
+|                     unsigned char_ b_LatchReg    : Selected latch register          |
 |                               0 : for the first latch register             |
 |                               1 : for the second latch register            |
 +----------------------------------------------------------------------------+
@@ -2562,7 +2562,7 @@ INT i_APCI1710_SetInputFilter(struct comedi_device * dev,
 */
 
 INT i_APCI1710_LatchCounter(struct comedi_device * dev,
-       BYTE b_ModulNbr, BYTE b_LatchReg)
+       unsigned char b_ModulNbr, unsigned char b_LatchReg)
 {
        INT i_ReturnValue = 0;
 
@@ -2622,19 +2622,19 @@ INT i_APCI1710_LatchCounter(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_    i_APCI1710_SetIndexAndReferenceSource        |
-|                                      (BYTE_ b_BoardHandle,                |
-|                                       BYTE_ b_ModulNbr,                   |
-|                                       BYTE_ b_SourceSelection)            |
+|                                      (unsigned char_ b_BoardHandle,                |
+|                                       unsigned char_ b_ModulNbr,                   |
+|                                       unsigned char_ b_SourceSelection)            |
 +----------------------------------------------------------------------------+
 | Task              : Determine the hardware source for the index and the    |
 |                    reference logic. Per default the index logic is        |
 |                    connected to the difference input C and the reference  |
 |                    logic is connected to the 24V input E                  |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
-|                    BYTE_ b_SourceSelection : APCI1710_SOURCE_0 :          |
+|                    unsigned char_ b_SourceSelection : APCI1710_SOURCE_0 :          |
 |                                              The index logic is connected |
 |                                              to the difference input C and|
 |                                              the reference logic is       |
@@ -2659,7 +2659,7 @@ INT i_APCI1710_LatchCounter(struct comedi_device * dev,
 */
 
 INT i_APCI1710_SetIndexAndReferenceSource(struct comedi_device * dev,
-       BYTE b_ModulNbr, BYTE b_SourceSelection)
+       unsigned char b_ModulNbr, unsigned char b_SourceSelection)
 {
        INT i_ReturnValue = 0;
 
@@ -2775,14 +2775,14 @@ INT i_APCI1710_SetIndexAndReferenceSource(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_    i_APCI1710_SetDigitalChlOn                   |
-|                                 (BYTE_  b_BoardHandle,                    |
-|                                  BYTE_  b_ModulNbr)                       |
+|                                 (unsigned char_  b_BoardHandle,                    |
+|                                  unsigned char_  b_ModulNbr)                       |
 +----------------------------------------------------------------------------+
 | Task              : Sets the digital output H Setting an output means      |
 |                    setting an ouput high.                                 |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_  b_BoardHandle    : Handle of board APCI-1710    |
-|                    BYTE_  b_ModulNbr       : Number of the module to be   |
+| Input Parameters  : unsigned char_  b_BoardHandle    : Handle of board APCI-1710    |
+|                    unsigned char_  b_ModulNbr              : Number of the module to be   |
 |                                              configured (0 to 3)          |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
@@ -2795,7 +2795,7 @@ INT i_APCI1710_SetIndexAndReferenceSource(struct comedi_device * dev,
 +----------------------------------------------------------------------------+
 */
 
-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_ReturnValue = 0;
 
@@ -2855,14 +2855,14 @@ INT i_APCI1710_SetDigitalChlOn(struct comedi_device * dev, BYTE b_ModulNbr)
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_    i_APCI1710_SetDigitalChlOff                  |
-|                                 (BYTE_  b_BoardHandle,                    |
-|                                  BYTE_  b_ModulNbr)                       |
+|                                 (unsigned char_  b_BoardHandle,                    |
+|                                  unsigned char_  b_ModulNbr)                       |
 +----------------------------------------------------------------------------+
 | Task              : Resets the digital output H. Resetting an output means |
 |                    setting an ouput low.                                  |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_  b_BoardHandle    : Handle of board APCI-1710    |
-|                    BYTE_  b_ModulNbr       : Number of the module to be   |
+| Input Parameters  : unsigned char_  b_BoardHandle    : Handle of board APCI-1710    |
+|                    unsigned char_  b_ModulNbr              : Number of the module to be   |
 |                                              configured (0 to 3)          |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
@@ -2875,7 +2875,7 @@ INT i_APCI1710_SetDigitalChlOn(struct comedi_device * dev, BYTE 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)
 {
        INT i_ReturnValue = 0;
 
@@ -2963,53 +2963,53 @@ INT i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, struct comedi_subdevi
        switch (ui_WriteType) {
        case APCI1710_INCCPT_ENABLELATCHINTERRUPT:
                i_ReturnValue = i_APCI1710_EnableLatchInterrupt(dev,
-                       (BYTE) CR_AREF(insn->chanspec));
+                       (unsigned char) CR_AREF(insn->chanspec));
                break;
 
        case APCI1710_INCCPT_DISABLELATCHINTERRUPT:
                i_ReturnValue = i_APCI1710_DisableLatchInterrupt(dev,
-                       (BYTE) CR_AREF(insn->chanspec));
+                       (unsigned char) CR_AREF(insn->chanspec));
                break;
 
        case APCI1710_INCCPT_WRITE16BITCOUNTERVALUE:
                i_ReturnValue = i_APCI1710_Write16BitCounterValue(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
-                       (BYTE) data[0], (UINT) data[1]);
+                       (unsigned char) CR_AREF(insn->chanspec),
+                       (unsigned char) data[0], (UINT) data[1]);
                break;
 
        case APCI1710_INCCPT_WRITE32BITCOUNTERVALUE:
                i_ReturnValue = i_APCI1710_Write32BitCounterValue(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (ULONG) data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (ULONG) data[0]);
 
                break;
 
        case APCI1710_INCCPT_ENABLEINDEX:
-               i_APCI1710_EnableIndex(dev, (BYTE) CR_AREF(insn->chanspec));
+               i_APCI1710_EnableIndex(dev, (unsigned char) CR_AREF(insn->chanspec));
                break;
 
        case APCI1710_INCCPT_DISABLEINDEX:
                i_ReturnValue = i_APCI1710_DisableIndex(dev,
-                       (BYTE) CR_AREF(insn->chanspec));
+                       (unsigned char) CR_AREF(insn->chanspec));
                break;
 
        case APCI1710_INCCPT_ENABLECOMPARELOGIC:
                i_ReturnValue = i_APCI1710_EnableCompareLogic(dev,
-                       (BYTE) CR_AREF(insn->chanspec));
+                       (unsigned char) CR_AREF(insn->chanspec));
                break;
 
        case APCI1710_INCCPT_DISABLECOMPARELOGIC:
                i_ReturnValue = i_APCI1710_DisableCompareLogic(dev,
-                       (BYTE) CR_AREF(insn->chanspec));
+                       (unsigned char) CR_AREF(insn->chanspec));
                break;
 
        case APCI1710_INCCPT_ENABLEFREQUENCYMEASUREMENT:
                i_ReturnValue = i_APCI1710_EnableFrequencyMeasurement(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (BYTE) data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char) data[0]);
                break;
 
        case APCI1710_INCCPT_DISABLEFREQUENCYMEASUREMENT:
                i_ReturnValue = i_APCI1710_DisableFrequencyMeasurement(dev,
-                       (BYTE) CR_AREF(insn->chanspec));
+                       (unsigned char) CR_AREF(insn->chanspec));
                break;
 
        default:
@@ -3024,15 +3024,15 @@ INT i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, struct comedi_subdevi
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_EnableLatchInterrupt                  |
-|                               (BYTE_ b_BoardHandle,                        |
-|                                BYTE_ b_ModulNbr)                           |
+|                               (unsigned char_ b_BoardHandle,                        |
+|                                unsigned char_ b_ModulNbr)                           |
 +----------------------------------------------------------------------------+
 | Task              : Enable the latch interrupt from selected module        |
 |                     (b_ModulNbr). Each software or hardware latch occur a  |
 |                     interrupt.                                             |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle : Handle of board APCI-1710        |
-|                     BYTE_ b_ModulNbr    : Module number to configure       |
+| Input Parameters  : unsigned char_ b_BoardHandle : Handle of board APCI-1710        |
+|                     unsigned char_ b_ModulNbr    : Module number to configure       |
 |                                           (0 to 3)                         |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
@@ -3047,7 +3047,7 @@ INT i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, struct comedi_subdevi
 +----------------------------------------------------------------------------+
 */
 
-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_ReturnValue = 0;
 
@@ -3111,14 +3111,14 @@ INT i_APCI1710_EnableLatchInterrupt(struct comedi_device * dev, BYTE b_ModulNbr)
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_DisableLatchInterrupt                 |
-|                               (BYTE_ b_BoardHandle,                        |
-|                                BYTE_ b_ModulNbr)                           |
+|                               (unsigned char_ b_BoardHandle,                        |
+|                                unsigned char_ b_ModulNbr)                           |
 +----------------------------------------------------------------------------+
 | Task              : Disable the latch interrupt from selected module       |
 |                     (b_ModulNbr).                                          |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle : Handle of board APCI-1710        |
-|                     BYTE_ b_ModulNbr    : Module number to configure       |
+| Input Parameters  : unsigned char_ b_BoardHandle : Handle of board APCI-1710        |
+|                     unsigned char_ b_ModulNbr    : Module number to configure       |
 |                                           (0 to 3)                         |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
@@ -3133,7 +3133,7 @@ INT i_APCI1710_EnableLatchInterrupt(struct comedi_device * dev, BYTE 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_ReturnValue = 0;
 
@@ -3204,19 +3204,19 @@ INT i_APCI1710_DisableLatchInterrupt(struct comedi_device * dev, BYTE b_ModulNbr
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_Write16BitCounterValue                |
-|                                               (BYTE_  b_BoardHandle        |
-|                                                BYTE_  b_ModulNbr,          |
-|                                                BYTE_  b_SelectedCounter,   |
+|                                               (unsigned char_  b_BoardHandle        |
+|                                                unsigned char_  b_ModulNbr,          |
+|                                                unsigned char_  b_SelectedCounter,   |
 |                                                UINT_ ui_WriteValue)        |
 +----------------------------------------------------------------------------+
 | Task              : Write a 16-Bit value (ui_WriteValue) in to the selected|
 |                     16-Bit counter (b_SelectedCounter) from selected module|
 |                     (b_ModulNbr).                                          |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                              (0 to 3)                      |
-|                     BYTE_ b_SelectedCounter : Selected 16-Bit counter      |
+|                     unsigned char_ b_SelectedCounter : Selected 16-Bit counter      |
 |                                               (0 or 1)                     |
 |                     UINT_ ui_WriteValue     : 16-Bit write value           |
 +----------------------------------------------------------------------------+
@@ -3232,7 +3232,7 @@ INT i_APCI1710_DisableLatchInterrupt(struct comedi_device * dev, BYTE b_ModulNbr
 */
 
 INT i_APCI1710_Write16BitCounterValue(struct comedi_device * dev,
-       BYTE b_ModulNbr, BYTE b_SelectedCounter, UINT ui_WriteValue)
+       unsigned char b_ModulNbr, unsigned char b_SelectedCounter, UINT ui_WriteValue)
 {
        INT i_ReturnValue = 0;
 
@@ -3294,15 +3294,15 @@ INT i_APCI1710_Write16BitCounterValue(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_Write32BitCounterValue                |
-|                                               (BYTE_   b_BoardHandle       |
-|                                                BYTE_   b_ModulNbr,         |
+|                                               (unsigned char_   b_BoardHandle       |
+|                                                unsigned char_   b_ModulNbr,         |
 |                                                ULONG_ ul_WriteValue)       |
 +----------------------------------------------------------------------------+
 | Task              : Write a 32-Bit value (ui_WriteValue) in to the selected|
 |                     module (b_ModulNbr).                                   |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                              (0 to 3)                      |
 |                     ULONG_ ul_WriteValue    : 32-Bit write value           |
 +----------------------------------------------------------------------------+
@@ -3317,7 +3317,7 @@ INT i_APCI1710_Write16BitCounterValue(struct comedi_device * dev,
 */
 
 INT i_APCI1710_Write32BitCounterValue(struct comedi_device * dev,
-       BYTE b_ModulNbr, ULONG ul_WriteValue)
+       unsigned char b_ModulNbr, ULONG ul_WriteValue)
 {
        INT i_ReturnValue = 0;
 
@@ -3362,13 +3362,13 @@ INT i_APCI1710_Write32BitCounterValue(struct comedi_device * dev,
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name     : _INT_ i_APCI1710_EnableIndex (BYTE_  b_BoardHandle,    |
-|                                                   BYTE_  b_ModulNbr)       |
+| Function Name     : _INT_ i_APCI1710_EnableIndex (unsigned char_  b_BoardHandle,    |
+|                                                   unsigned char_  b_ModulNbr)       |
 +----------------------------------------------------------------------------+
 | Task              : Enable the INDEX actions                               |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
@@ -3383,7 +3383,7 @@ INT i_APCI1710_Write32BitCounterValue(struct comedi_device * dev,
 +----------------------------------------------------------------------------+
 */
 
-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_ReturnValue = 0;
        ULONG ul_InterruptLatchReg;
@@ -3460,13 +3460,13 @@ INT i_APCI1710_EnableIndex(struct comedi_device * dev, BYTE b_ModulNbr)
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name     : _INT_ i_APCI1710_DisableIndex (BYTE_  b_BoardHandle,   |
-|                                                    BYTE_  b_ModulNbr)      |
+| Function Name     : _INT_ i_APCI1710_DisableIndex (unsigned char_  b_BoardHandle,   |
+|                                                    unsigned char_  b_ModulNbr)      |
 +----------------------------------------------------------------------------+
 | Task              : Disable the INDEX actions                              |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
@@ -3481,7 +3481,7 @@ INT i_APCI1710_EnableIndex(struct comedi_device * dev, BYTE 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_ReturnValue = 0;
 
@@ -3555,15 +3555,15 @@ INT i_APCI1710_DisableIndex(struct comedi_device * dev, BYTE b_ModulNbr)
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_EnableCompareLogic                    |
-|                               (BYTE_   b_BoardHandle,                      |
-|                                BYTE_   b_ModulNbr)                         |
+|                               (unsigned char_   b_BoardHandle,                      |
+|                                unsigned char_   b_ModulNbr)                         |
 +----------------------------------------------------------------------------+
 | Task              : Enable the 32-Bit compare logic. At that moment that   |
 |                     the incremental counter arrive to the compare value a  |
 |                     interrupt is generated.                                |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_  b_BoardHandle    : Handle of board APCI-1710    |
-|                     BYTE_  b_ModulNbr       : Module number to configure   |
+| Input Parameters  : unsigned char_  b_BoardHandle    : Handle of board APCI-1710    |
+|                     unsigned char_  b_ModulNbr       : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
 | Output Parameters : -
@@ -3580,7 +3580,7 @@ INT i_APCI1710_DisableIndex(struct comedi_device * dev, BYTE 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_ReturnValue = 0;
 
@@ -3659,13 +3659,13 @@ INT i_APCI1710_EnableCompareLogic(struct comedi_device * dev, BYTE b_ModulNbr)
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_DisableCompareLogic                   |
-|                               (BYTE_   b_BoardHandle,                      |
-|                                BYTE_   b_ModulNbr)                         |
+|                               (unsigned char_   b_BoardHandle,                      |
+|                                unsigned char_   b_ModulNbr)                         |
 +----------------------------------------------------------------------------+
 | Task              : Disable the 32-Bit compare logic.
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_  b_BoardHandle    : Handle of board APCI-1710    |
-|                     BYTE_  b_ModulNbr       : Module number to configure   |
+| Input Parameters  : unsigned char_  b_BoardHandle    : Handle of board APCI-1710    |
+|                     unsigned char_  b_ModulNbr       : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
 | Output Parameters : -
@@ -3680,7 +3680,7 @@ INT i_APCI1710_EnableCompareLogic(struct comedi_device * dev, BYTE 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_ReturnValue = 0;
 
@@ -3759,16 +3759,16 @@ INT i_APCI1710_DisableCompareLogic(struct comedi_device * dev, BYTE b_ModulNbr)
        /*
           +----------------------------------------------------------------------------+
           | Function Name     : _INT_ i_APCI1710_EnableFrequencyMeasurement            |
-          |                            (BYTE_   b_BoardHandle,                      |
-          |                             BYTE_   b_ModulNbr,                         |
-          |                             BYTE_   b_InterruptEnable)                  |
+          |                            (unsigned char_   b_BoardHandle,                      |
+          |                             unsigned char_   b_ModulNbr,                         |
+          |                             unsigned char_   b_InterruptEnable)                  |
           +----------------------------------------------------------------------------+
           | Task              : Enables the frequency measurement function             |
           +----------------------------------------------------------------------------+
-          | Input Parameters  : BYTE_  b_BoardHandle    : Handle of board APCI-1710    |
-          |                  BYTE_  b_ModulNbr       : Number of the module to be   |
+          | Input Parameters  : unsigned char_  b_BoardHandle    : Handle of board APCI-1710    |
+          |                  unsigned char_  b_ModulNbr       : Number of the module to be   |
           |                                            configured (0 to 3)          |
-          |                  BYTE_  b_InterruptEnable: Enable or disable the        |
+          |                  unsigned char_  b_InterruptEnable: Enable or disable the        |
           |                                            interrupt.                   |
           |                                            APCI1710_ENABLE:             |
           |                                            Enable the interrupt         |
@@ -3790,7 +3790,7 @@ INT i_APCI1710_DisableCompareLogic(struct comedi_device * dev, BYTE 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_ReturnValue = 0;
 
@@ -3915,13 +3915,13 @@ INT i_APCI1710_EnableFrequencyMeasurement(struct comedi_device * dev,
        /*
           +----------------------------------------------------------------------------+
           | Function Name     : _INT_ i_APCI1710_DisableFrequencyMeasurement           |
-          |                            (BYTE_   b_BoardHandle,                      |
-          |                             BYTE_   b_ModulNbr)                         |
+          |                            (unsigned char_   b_BoardHandle,                      |
+          |                             unsigned char_   b_ModulNbr)                         |
           +----------------------------------------------------------------------------+
           | Task              : Disables the frequency measurement function             |
           +----------------------------------------------------------------------------+
-          | Input Parameters  : BYTE_  b_BoardHandle    : Handle of board APCI-1710    |
-          |                  BYTE_  b_ModulNbr       : Number of the module to be   |
+          | Input Parameters  : unsigned char_  b_BoardHandle    : Handle of board APCI-1710    |
+          |                  unsigned char_  b_ModulNbr       : Number of the module to be   |
           |                                            configured (0 to 3)          |
           +----------------------------------------------------------------------------+
           | Output Parameters : -                                                      |
@@ -3936,7 +3936,7 @@ INT i_APCI1710_EnableFrequencyMeasurement(struct comedi_device * dev,
           +----------------------------------------------------------------------------+
         */
 
-INT i_APCI1710_DisableFrequencyMeasurement(struct comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_DisableFrequencyMeasurement(struct comedi_device * dev, unsigned char b_ModulNbr)
 {
        INT i_ReturnValue = 0;
 
@@ -4061,70 +4061,70 @@ INT i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevic
        switch (ui_ReadType) {
        case APCI1710_INCCPT_READLATCHREGISTERSTATUS:
                i_ReturnValue = i_APCI1710_ReadLatchRegisterStatus(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
-                       (BYTE) CR_RANGE(insn->chanspec), (PBYTE) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec),
+                       (unsigned char) CR_RANGE(insn->chanspec), (unsigned char *) & data[0]);
                break;
 
        case APCI1710_INCCPT_READLATCHREGISTERVALUE:
                i_ReturnValue = i_APCI1710_ReadLatchRegisterValue(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
-                       (BYTE) CR_RANGE(insn->chanspec), (PULONG) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec),
+                       (unsigned char) CR_RANGE(insn->chanspec), (PULONG) & data[0]);
                printk("Latch Register Value %d\n", data[0]);
                break;
 
        case APCI1710_INCCPT_READ16BITCOUNTERVALUE:
                i_ReturnValue = i_APCI1710_Read16BitCounterValue(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
-                       (BYTE) CR_RANGE(insn->chanspec), (PUINT) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec),
+                       (unsigned char) CR_RANGE(insn->chanspec), (PUINT) & data[0]);
                break;
 
        case APCI1710_INCCPT_READ32BITCOUNTERVALUE:
                i_ReturnValue = i_APCI1710_Read32BitCounterValue(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (PULONG) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (PULONG) & data[0]);
                break;
 
        case APCI1710_INCCPT_GETINDEXSTATUS:
                i_ReturnValue = i_APCI1710_GetIndexStatus(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (PBYTE) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
                break;
 
        case APCI1710_INCCPT_GETREFERENCESTATUS:
                i_ReturnValue = i_APCI1710_GetReferenceStatus(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (PBYTE) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
                break;
 
        case APCI1710_INCCPT_GETUASSTATUS:
                i_ReturnValue = i_APCI1710_GetUASStatus(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (PBYTE) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
                break;
 
        case APCI1710_INCCPT_GETCBSTATUS:
                i_ReturnValue = i_APCI1710_GetCBStatus(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (PBYTE) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
                break;
 
        case APCI1710_INCCPT_GET16BITCBSTATUS:
                i_ReturnValue = i_APCI1710_Get16BitCBStatus(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
-                       (PBYTE) & data[0], (PBYTE) & data[1]);
+                       (unsigned char) CR_AREF(insn->chanspec),
+                       (unsigned char *) & data[0], (unsigned char *) & data[1]);
                break;
 
        case APCI1710_INCCPT_GETUDSTATUS:
                i_ReturnValue = i_APCI1710_GetUDStatus(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (PBYTE) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
 
                break;
 
        case APCI1710_INCCPT_GETINTERRUPTUDLATCHEDSTATUS:
                i_ReturnValue = i_APCI1710_GetInterruptUDLatchedStatus(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (PBYTE) & data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
                break;
 
        case APCI1710_INCCPT_READFREQUENCYMEASUREMENT:
                i_ReturnValue = i_APCI1710_ReadFrequencyMeasurement(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
-                       (PBYTE) & data[0],
-                       (PBYTE) & data[1], (PULONG) & data[2]);
+                       (unsigned char) CR_AREF(insn->chanspec),
+                       (unsigned char *) & data[0],
+                       (unsigned char *) & data[1], (PULONG) & data[2]);
                break;
 
        case APCI1710_INCCPT_READINTERRUPT:
@@ -4162,22 +4162,22 @@ INT i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevic
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_ReadLatchRegisterStatus               |
-|                                                   (BYTE_   b_BoardHandle,  |
-|                                                    BYTE_   b_ModulNbr,     |
-|                                                    BYTE_   b_LatchReg,     |
-|                                                    PBYTE_ pb_LatchStatus)  |
+|                                                   (unsigned char_   b_BoardHandle,  |
+|                                                    unsigned char_   b_ModulNbr,     |
+|                                                    unsigned char_   b_LatchReg,     |
+|                                                    unsigned char *_ pb_LatchStatus)  |
 +----------------------------------------------------------------------------+
 | Task              : Read the latch register status from selected module    |
 |                     (b_ModulNbr) and selected latch register (b_LatchReg). |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle : Handle of board APCI-1710        |
-|                     BYTE_ b_ModulNbr    : Module number to configure       |
+| Input Parameters  : unsigned char_ b_BoardHandle : Handle of board APCI-1710        |
+|                     unsigned char_ b_ModulNbr    : Module number to configure       |
 |                                           (0 to 3)                         |
-|                     BYTE_ b_LatchReg    : Selected latch register          |
+|                     unsigned char_ b_LatchReg    : Selected latch register          |
 |                               0 : for the first latch register             |
 |                               1 : for the second latch register            |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_LatchStatus :   Latch register status.       |
+| Output Parameters : unsigned char *_ pb_LatchStatus :   Latch register status.       |
 |                                               0 : No latch occur           |
 |                                               1 : A software latch occur   |
 |                                               2 : A hardware latch occur   |
@@ -4194,7 +4194,7 @@ INT i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevic
 */
 
 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_ReturnValue = 0;
        DWORD dw_LatchReg;
@@ -4220,7 +4220,7 @@ INT i_APCI1710_ReadLatchRegisterStatus(struct comedi_device * dev,
                                        ui_Address + (64 * b_ModulNbr));
 
                                *pb_LatchStatus =
-                                       (BYTE) ((dw_LatchReg >> (b_LatchReg *
+                                       (unsigned char) ((dw_LatchReg >> (b_LatchReg *
                                                        4)) & 0x3);
                        } else {
                 /**************************************************/
@@ -4254,18 +4254,18 @@ INT i_APCI1710_ReadLatchRegisterStatus(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_ReadLatchRegisterValue                |
-|                                                   (BYTE_     b_BoardHandle,|
-|                                                    BYTE_     b_ModulNbr,   |
-|                                                    BYTE_     b_LatchReg,   |
+|                                                   (unsigned char_     b_BoardHandle,|
+|                                                    unsigned char_     b_ModulNbr,   |
+|                                                    unsigned char_     b_LatchReg,   |
 |                                                    PULONG_ pul_LatchValue) |
 +----------------------------------------------------------------------------+
 | Task              : Read the latch register value from selected module     |
 |                     (b_ModulNbr) and selected latch register (b_LatchReg). |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle : Handle of board APCI-1710        |
-|                     BYTE_ b_ModulNbr    : Module number to configure       |
+| Input Parameters  : unsigned char_ b_BoardHandle : Handle of board APCI-1710        |
+|                     unsigned char_ b_ModulNbr    : Module number to configure       |
 |                                           (0 to 3)                         |
-|                     BYTE_ b_LatchReg    : Selected latch register          |
+|                     unsigned char_ b_LatchReg    : Selected latch register          |
 |                               0 : for the first latch register             |
 |                               1 : for the second latch register            |
 +----------------------------------------------------------------------------+
@@ -4281,7 +4281,7 @@ INT i_APCI1710_ReadLatchRegisterStatus(struct comedi_device * dev,
 */
 
 INT i_APCI1710_ReadLatchRegisterValue(struct comedi_device * dev,
-       BYTE b_ModulNbr, BYTE b_LatchReg, PULONG pul_LatchValue)
+       unsigned char b_ModulNbr, unsigned char b_LatchReg, PULONG pul_LatchValue)
 {
        INT i_ReturnValue = 0;
 
@@ -4338,19 +4338,19 @@ INT i_APCI1710_ReadLatchRegisterValue(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_Read16BitCounterValue                 |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
-|                                        BYTE_     b_SelectedCounter,        |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        unsigned char_     b_ModulNbr,               |
+|                                        unsigned char_     b_SelectedCounter,        |
 |                                        PUINT_   pui_CounterValue)          |
 +----------------------------------------------------------------------------+
 | Task              : Latch the selected 16-Bit counter (b_SelectedCounter)  |
 |                     from selected module (b_ModulNbr) in to the first      |
 |                     latch register and return the latched value.           |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                              (0 to 3)                      |
-|                     BYTE_ b_SelectedCounter : Selected 16-Bit counter      |
+|                     unsigned char_ b_SelectedCounter : Selected 16-Bit counter      |
 |                                               (0 or 1)                     |
 +----------------------------------------------------------------------------+
 | Output Parameters : PUINT_ pui_CounterValue : 16-Bit counter value         |
@@ -4365,7 +4365,7 @@ INT i_APCI1710_ReadLatchRegisterValue(struct comedi_device * dev,
 */
 
 INT i_APCI1710_Read16BitCounterValue(struct comedi_device * dev,
-       BYTE b_ModulNbr, BYTE b_SelectedCounter, PUINT pui_CounterValue)
+       unsigned char b_ModulNbr, unsigned char b_SelectedCounter, PUINT pui_CounterValue)
 {
        INT i_ReturnValue = 0;
        DWORD dw_LathchValue = 0;
@@ -4437,16 +4437,16 @@ INT i_APCI1710_Read16BitCounterValue(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_Read32BitCounterValue                 |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        unsigned char_     b_ModulNbr,               |
 |                                        PULONG_ pul_CounterValue)           |
 +----------------------------------------------------------------------------+
 | Task              : Latch the 32-Bit counter from selected module          |
 |                     (b_ModulNbr) in to the first latch register and return |
 |                     the latched value.                                     |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                              (0 to 3)                      |
 +----------------------------------------------------------------------------+
 | Output Parameters : PULONG_  pul_CounterValue : 32-Bit counter value       |
@@ -4460,7 +4460,7 @@ INT i_APCI1710_Read16BitCounterValue(struct comedi_device * dev,
 */
 
 INT i_APCI1710_Read32BitCounterValue(struct comedi_device * dev,
-       BYTE b_ModulNbr, PULONG pul_CounterValue)
+       unsigned char b_ModulNbr, PULONG pul_CounterValue)
 {
        INT i_ReturnValue = 0;
 
@@ -4512,17 +4512,17 @@ INT i_APCI1710_Read32BitCounterValue(struct comedi_device * dev,
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name     : _INT_ i_APCI1710_GetIndexStatus (BYTE_   b_BoardHandle,|
-|                                                      BYTE_   b_ModulNbr,   |
-|                                                      PBYTE_ pb_IndexStatus)|
+| Function Name     : _INT_ i_APCI1710_GetIndexStatus (unsigned char_   b_BoardHandle,|
+|                                                      unsigned char_   b_ModulNbr,   |
+|                                                      unsigned char *_ pb_IndexStatus)|
 +----------------------------------------------------------------------------+
 | Task              : Return the index status                                |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_IndexStatus   : 0 : No INDEX occur           |
+| Output Parameters : unsigned char *_ pb_IndexStatus   : 0 : No INDEX occur           |
 |                                               1 : A INDEX occur            |
 +----------------------------------------------------------------------------+
 | Return Value      :  0: No error                                           |
@@ -4536,7 +4536,7 @@ INT i_APCI1710_Read32BitCounterValue(struct comedi_device * dev,
 */
 
 INT i_APCI1710_GetIndexStatus(struct comedi_device * dev,
-       BYTE b_ModulNbr, PBYTE pb_IndexStatus)
+       unsigned char b_ModulNbr, unsigned char * pb_IndexStatus)
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusReg = 0;
@@ -4563,7 +4563,7 @@ INT i_APCI1710_GetIndexStatus(struct comedi_device * dev,
                                dw_StatusReg = inl(devpriv->s_BoardInfos.
                                        ui_Address + 12 + (64 * b_ModulNbr));
 
-                               *pb_IndexStatus = (BYTE) (dw_StatusReg & 1);
+                               *pb_IndexStatus = (unsigned char) (dw_StatusReg & 1);
                        } else {
                 /*************************************************************/
                                /* Index not initialised see function "i_APCI1710_InitIndex" */
@@ -4596,17 +4596,17 @@ INT i_APCI1710_GetIndexStatus(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_GetReferenceStatus                    |
-|                                                (BYTE_   b_BoardHandle,     |
-|                                                 BYTE_   b_ModulNbr,        |
-|                                                 PBYTE_ pb_ReferenceStatus) |
+|                                                (unsigned char_   b_BoardHandle,     |
+|                                                 unsigned char_   b_ModulNbr,        |
+|                                                 unsigned char *_ pb_ReferenceStatus) |
 +----------------------------------------------------------------------------+
 | Task              : Return the reference status                            |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_ReferenceStatus   : 0 : No REFERENCE occur   |
+| Output Parameters : unsigned char *_ pb_ReferenceStatus   : 0 : No REFERENCE occur   |
 |                                                   1 : A REFERENCE occur    |
 +----------------------------------------------------------------------------+
 | Return Value      :  0: No error                                           |
@@ -4620,7 +4620,7 @@ INT i_APCI1710_GetIndexStatus(struct comedi_device * dev,
 */
 
 INT i_APCI1710_GetReferenceStatus(struct comedi_device * dev,
-       BYTE b_ModulNbr, PBYTE pb_ReferenceStatus)
+       unsigned char b_ModulNbr, unsigned char * pb_ReferenceStatus)
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusReg = 0;
@@ -4649,7 +4649,7 @@ INT i_APCI1710_GetReferenceStatus(struct comedi_device * dev,
                                        ui_Address + 24 + (64 * b_ModulNbr));
 
                                *pb_ReferenceStatus =
-                                       (BYTE) (~dw_StatusReg & 1);
+                                       (unsigned char) (~dw_StatusReg & 1);
                        } else {
                 /*********************************************************************/
                                /* Reference not initialised see function "i_APCI1710_InitReference" */
@@ -4682,17 +4682,17 @@ INT i_APCI1710_GetReferenceStatus(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_GetUASStatus                          |
-|                               (BYTE_   b_BoardHandle,                      |
-|                                BYTE_   b_ModulNbr,                         |
-|                                PBYTE_ pb_UASStatus)                        |
+|                               (unsigned char_   b_BoardHandle,                      |
+|                                unsigned char_   b_ModulNbr,                         |
+|                                unsigned char *_ pb_UASStatus)                        |
 +----------------------------------------------------------------------------+
 | Task              : Return the error signal (UAS) status                   |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_UASStatus      : 0 : UAS is low "0"          |
+| Output Parameters : unsigned char *_ pb_UASStatus      : 0 : UAS is low "0"          |
 |                                                1 : UAS is high "1"         |
 +----------------------------------------------------------------------------+
 | Return Value      :  0: No error                                           |
@@ -4704,7 +4704,7 @@ INT i_APCI1710_GetReferenceStatus(struct comedi_device * dev,
 */
 
 INT i_APCI1710_GetUASStatus(struct comedi_device * dev,
-       BYTE b_ModulNbr, PBYTE pb_UASStatus)
+       unsigned char b_ModulNbr, unsigned char * pb_UASStatus)
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusReg = 0;
@@ -4724,7 +4724,7 @@ INT i_APCI1710_GetUASStatus(struct comedi_device * dev,
                        dw_StatusReg = inl(devpriv->s_BoardInfos.
                                ui_Address + 24 + (64 * b_ModulNbr));
 
-                       *pb_UASStatus = (BYTE) ((dw_StatusReg >> 1) & 1);
+                       *pb_UASStatus = (unsigned char) ((dw_StatusReg >> 1) & 1);
                } else {
              /****************************************/
                        /* Counter not initialised see function */
@@ -4750,17 +4750,17 @@ INT i_APCI1710_GetUASStatus(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_GetCBStatus                           |
-|                               (BYTE_   b_BoardHandle,                      |
-|                                BYTE_   b_ModulNbr,                         |
-|                                PBYTE_ pb_CBStatus)                         |
+|                               (unsigned char_   b_BoardHandle,                      |
+|                                unsigned char_   b_ModulNbr,                         |
+|                                unsigned char *_ pb_CBStatus)                         |
 +----------------------------------------------------------------------------+
 | Task              : Return the counter overflow status                     |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_CBStatus      : 0 : Counter no overflow      |
+| Output Parameters : unsigned char *_ pb_CBStatus      : 0 : Counter no overflow      |
 |                                               1 : Counter overflow         |
 +----------------------------------------------------------------------------+
 | Return Value      :  0: No error                                           |
@@ -4772,7 +4772,7 @@ INT i_APCI1710_GetUASStatus(struct comedi_device * dev,
 */
 
 INT i_APCI1710_GetCBStatus(struct comedi_device * dev,
-       BYTE b_ModulNbr, PBYTE pb_CBStatus)
+       unsigned char b_ModulNbr, unsigned char * pb_CBStatus)
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusReg = 0;
@@ -4792,7 +4792,7 @@ INT i_APCI1710_GetCBStatus(struct comedi_device * dev,
                        dw_StatusReg = inl(devpriv->s_BoardInfos.
                                ui_Address + 16 + (64 * b_ModulNbr));
 
-                       *pb_CBStatus = (BYTE) (dw_StatusReg & 1);
+                       *pb_CBStatus = (unsigned char) (dw_StatusReg & 1);
 
                } else {
              /****************************************/
@@ -4818,25 +4818,25 @@ INT i_APCI1710_GetCBStatus(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_Get16BitCBStatus                      |
-|                                      (BYTE_     b_BoardHandle,            |
-|                                       BYTE_     b_ModulNbr,               |
-|                                       PBYTE_ pb_CBStatusCounter0,         |
-|                                       PBYTE_ pb_CBStatusCounter1)         |
+|                                      (unsigned char_     b_BoardHandle,            |
+|                                       unsigned char_     b_ModulNbr,               |
+|                                       unsigned char *_ pb_CBStatusCounter0,         |
+|                                       unsigned char *_ pb_CBStatusCounter1)         |
 +----------------------------------------------------------------------------+
 | Task              : Returns the counter overflow (counter initialised to   |
 |                    2*16-bit) status from selected incremental counter     |
 |                    module                                                 |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_CBStatusCounter0 : 0 : No overflow occur for |
+| Output Parameters : unsigned char *_ pb_CBStatusCounter0 : 0 : No overflow occur for |
 |                                                     the first 16-bit      |
 |                                                     counter               |
 |                                                 1 : Overflow occur for the|
 |                                                     first 16-bit counter  |
-|                    PBYTE_ pb_CBStatusCounter1 : 0 : No overflow occur for |
+|                    unsigned char *_ pb_CBStatusCounter1 : 0 : No overflow occur for |
 |                                                     the second 16-bit     |
 |                                                     counter               |
 |                                                 1 : Overflow occur for the|
@@ -4854,7 +4854,7 @@ INT i_APCI1710_GetCBStatus(struct comedi_device * dev,
 */
 
 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_ReturnValue = 0;
        DWORD dw_StatusReg = 0;
@@ -4894,10 +4894,10 @@ INT i_APCI1710_Get16BitCBStatus(struct comedi_device * dev,
                                                (64 * b_ModulNbr));
 
                                        *pb_CBStatusCounter1 =
-                                               (BYTE) ((dw_StatusReg >> 0) &
+                                               (unsigned char) ((dw_StatusReg >> 0) &
                                                1);
                                        *pb_CBStatusCounter0 =
-                                               (BYTE) ((dw_StatusReg >> 1) &
+                                               (unsigned char) ((dw_StatusReg >> 1) &
                                                1);
                                }       // if ((ps_APCI1710Variable->s_Board [b_BoardHandle].s_BoardInfos.dw_MolduleConfiguration [b_ModulNbr] & 0xFFFF) >= 0x3136)
                                else {
@@ -4943,17 +4943,17 @@ INT i_APCI1710_Get16BitCBStatus(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_GetUDStatus                           |
-|                               (BYTE_   b_BoardHandle,                      |
-|                                BYTE_   b_ModulNbr,                         |
-|                                PBYTE_ pb_UDStatus)                         |
+|                               (unsigned char_   b_BoardHandle,                      |
+|                                unsigned char_   b_ModulNbr,                         |
+|                                unsigned char *_ pb_UDStatus)                         |
 +----------------------------------------------------------------------------+
 | Task              : Return the counter progress status                     |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_UDStatus      : 0 : Counter progress in the  |
+| Output Parameters : unsigned char *_ pb_UDStatus      : 0 : Counter progress in the  |
 |                                                   selected mode down       |
 |                                               1 : Counter progress in the  |
 |                                                   selected mode up         |
@@ -4967,7 +4967,7 @@ INT i_APCI1710_Get16BitCBStatus(struct comedi_device * dev,
 */
 
 INT i_APCI1710_GetUDStatus(struct comedi_device * dev,
-       BYTE b_ModulNbr, PBYTE pb_UDStatus)
+       unsigned char b_ModulNbr, unsigned char * pb_UDStatus)
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusReg = 0;
@@ -4987,7 +4987,7 @@ INT i_APCI1710_GetUDStatus(struct comedi_device * dev,
                        dw_StatusReg = inl(devpriv->s_BoardInfos.
                                ui_Address + 24 + (64 * b_ModulNbr));
 
-                       *pb_UDStatus = (BYTE) ((dw_StatusReg >> 2) & 1);
+                       *pb_UDStatus = (unsigned char) ((dw_StatusReg >> 2) & 1);
 
                } else {
              /****************************************/
@@ -5013,18 +5013,18 @@ INT i_APCI1710_GetUDStatus(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_GetInterruptUDLatchedStatus           |
-|                               (BYTE_   b_BoardHandle,                      |
-|                                BYTE_   b_ModulNbr,                         |
-|                                PBYTE_ pb_UDStatus)                         |
+|                               (unsigned char_   b_BoardHandle,                      |
+|                                unsigned char_   b_ModulNbr,                         |
+|                                unsigned char *_ pb_UDStatus)                         |
 +----------------------------------------------------------------------------+
 | Task              : Return the counter progress latched status after a     |
 |                     index interrupt occur.                                 |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Module number to configure   |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Module number to configure   |
 |                                               (0 to 3)                     |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_UDStatus      : 0 : Counter progress in the  |
+| Output Parameters : unsigned char *_ pb_UDStatus      : 0 : Counter progress in the  |
 |                                                   selected mode down       |
 |                                               1 : Counter progress in the  |
 |                                                   selected mode up         |
@@ -5041,7 +5041,7 @@ INT i_APCI1710_GetUDStatus(struct comedi_device * dev,
 */
 
 INT i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device * dev,
-       BYTE b_ModulNbr, PBYTE pb_UDStatus)
+       unsigned char b_ModulNbr, unsigned char * pb_UDStatus)
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusReg = 0;
@@ -5074,7 +5074,7 @@ INT i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device * dev,
                                dw_StatusReg = inl(devpriv->s_BoardInfos.
                                        ui_Address + 12 + (64 * b_ModulNbr));
 
-                               *pb_UDStatus = (BYTE) ((dw_StatusReg >> 1) & 1);
+                               *pb_UDStatus = (unsigned char) ((dw_StatusReg >> 1) & 1);
                        } else {
                    /****************************/
                                /* No index interrupt occur */
@@ -5106,20 +5106,20 @@ INT i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device * dev,
        /*
           +----------------------------------------------------------------------------+
           | Function Name     : _INT_ i_APCI1710_ReadFrequencyMeasurement              |
-          |                            (BYTE_            b_BoardHandle,             |
-          |                             BYTE_            b_ModulNbr,                |
-          |                             PBYTE_          pb_Status,                  |
+          |                            (unsigned char_            b_BoardHandle,             |
+          |                             unsigned char_            b_ModulNbr,                |
+          |                             unsigned char *_          pb_Status,                  |
           |                             PULONG_        pul_ReadValue)               |
           +----------------------------------------------------------------------------+
           | Task              : Returns the status (pb_Status) and the number of       |
           |                  increments in the set time.                            |
           |                  See function " i_APCI1710_InitFrequencyMeasurement "   |
           +----------------------------------------------------------------------------+
-          | Input Parameters  : BYTE_  b_BoardHandle    : Handle of board APCI-1710    |
-          |                  BYTE_  b_ModulNbr       : Number of the module to be   |
+          | Input Parameters  : unsigned char_  b_BoardHandle    : Handle of board APCI-1710    |
+          |                  unsigned char_  b_ModulNbr       : Number of the module to be   |
           |                                            configured (0 to 3)          |
           +----------------------------------------------------------------------------+
-          | Output Parameters : PBYTE_ pb_Status     : Returns the frequency        |
+          | Output Parameters : unsigned char *_ pb_Status     : Returns the frequency        |
           |                                            measurement status           |
           |                                            0 : Counting cycle not       |
           |                                                started.                 |
@@ -5127,7 +5127,7 @@ INT i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device * dev,
           |                                            2 : Counting cycle stopped.  |
           |                                                The measurement cycle is |
           |                                                completed.               |
-          |                  PBYTE_ pb_UDStatus      : 0 : Counter progress in the  |
+          |                  unsigned char *_ pb_UDStatus      : 0 : Counter progress in the  |
           |                                                   selected mode down       |
           |                                               1 : Counter progress in the  |
           |                                                   selected mode up         |
@@ -5146,8 +5146,8 @@ INT i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device * dev,
         */
 
 INT i_APCI1710_ReadFrequencyMeasurement(struct comedi_device * dev,
-       BYTE b_ModulNbr,
-       PBYTE pb_Status, PBYTE pb_UDStatus, PULONG pul_ReadValue)
+       unsigned char b_ModulNbr,
+       unsigned char * pb_Status, unsigned char * pb_UDStatus, PULONG pul_ReadValue)
 {
        INT i_ReturnValue = 0;
        UINT ui_16BitValue;
@@ -5198,7 +5198,7 @@ INT i_APCI1710_ReadFrequencyMeasurement(struct comedi_device * dev,
                                        if (dw_StatusReg & 1) {
                                                *pb_Status = 2;
                                                *pb_UDStatus =
-                                                       (BYTE) ((dw_StatusReg >>
+                                                       (unsigned char) ((dw_StatusReg >>
                                                                1) & 3);
 
                       /******************/
index 5153cf6..62719b2 100644 (file)
@@ -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);
index 3ac6a26..7364cf0 100644 (file)
@@ -60,11 +60,11 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_InitPulseEncoder                      |
-|                               (BYTE_          b_BoardHandle,               |
-|                                BYTE_          b_ModulNbr,                  |
-|                                BYTE_          b_PulseEncoderNbr,           |
-|                                BYTE_          b_InputLevelSelection,       |
-|                                BYTE_          b_TriggerOutputAction,       |
+|                               (unsigned char_          b_BoardHandle,               |
+|                                unsigned char_          b_ModulNbr,                  |
+|                                unsigned char_          b_PulseEncoderNbr,           |
+|                                unsigned char_          b_InputLevelSelection,       |
+|                                unsigned char_          b_TriggerOutputAction,       |
 |                                ULONG_        ul_StartValue)                |
 +----------------------------------------------------------------------------+
 | Task              : Configure the pulse encoder operating mode selected via|
@@ -74,12 +74,12 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 |                     You must calling this function be for you call any     |
 |                     other function witch access of pulse encoders.         |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle         : Handle of board APCI-1710|
-|                     BYTE_ b_ModulNbr            : Module number to         |
+| Input Parameters  : unsigned char_ b_BoardHandle         : Handle of board APCI-1710|
+|                     unsigned char_ b_ModulNbr            : Module number to         |
 |                                                   configure (0 to 3)       |
-|                     BYTE_ b_PulseEncoderNbr     : Pulse encoder selection  |
+|                     unsigned char_ b_PulseEncoderNbr     : Pulse encoder selection  |
 |                                                   (0 to 3)                 |
-|                     BYTE_ b_InputLevelSelection : Input level selection    |
+|                     unsigned char_ b_InputLevelSelection : Input level selection    |
 |                                                   (0 or 1)                 |
 |                                                       0 : Set pulse encoder|
 |                                                           count the the low|
@@ -87,7 +87,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 |                                                       1 : Set pulse encoder|
 |                                                           count the the    |
 |                                                           high level pulse.|
-|                     BYTE_ b_TriggerOutputAction : Digital TRIGGER output   |
+|                     unsigned char_ b_TriggerOutputAction : Digital TRIGGER output   |
 |                                                   action                   |
 |                                                       0 : No action        |
 |                                                       1 : Set the trigger  |
@@ -104,10 +104,10 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 |                                                           encoder          |
 |                     ULONG_ ul_StartValue        : Pulse encoder start value|
 |                                                   (1 to 4294967295)
-       b_ModulNbr                              =(BYTE) CR_AREF(insn->chanspec);
-       b_PulseEncoderNbr               =(BYTE) data[0];
-       b_InputLevelSelection   =(BYTE) data[1];
-       b_TriggerOutputAction   =(BYTE) data[2];
+       b_ModulNbr                              =(unsigned char) CR_AREF(insn->chanspec);
+       b_PulseEncoderNbr               =(unsigned char) data[0];
+       b_InputLevelSelection   =(unsigned char) data[1];
+       b_TriggerOutputAction   =(unsigned char) data[2];
        ul_StartValue                   =(ULONG) data[3];
        |
 +----------------------------------------------------------------------------+
@@ -129,16 +129,16 @@ INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
        INT i_ReturnValue = 0;
        DWORD dw_IntRegister;
 
-       BYTE b_ModulNbr;
-       BYTE b_PulseEncoderNbr;
-       BYTE b_InputLevelSelection;
-       BYTE b_TriggerOutputAction;
+       unsigned char b_ModulNbr;
+       unsigned char b_PulseEncoderNbr;
+       unsigned char b_InputLevelSelection;
+       unsigned char b_TriggerOutputAction;
        ULONG ul_StartValue;
 
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-       b_PulseEncoderNbr = (BYTE) data[0];
-       b_InputLevelSelection = (BYTE) data[1];
-       b_TriggerOutputAction = (BYTE) data[2];
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+       b_PulseEncoderNbr = (unsigned char) data[0];
+       b_InputLevelSelection = (unsigned char) data[1];
+       b_TriggerOutputAction = (unsigned char) data[2];
        ul_StartValue = (ULONG) data[3];
 
        i_ReturnValue = insn->n;
@@ -352,11 +352,11 @@ INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_EnablePulseEncoder                    |
-|                                       (BYTE_  b_BoardHandle,               |
-|                                        BYTE_  b_ModulNbr,                  |
-|                                        BYTE_  b_PulseEncoderNbr,           |
-|                                        BYTE_  b_CycleSelection,            |
-|                                        BYTE_  b_InterruptHandling)         |
+|                                       (unsigned char_  b_BoardHandle,               |
+|                                        unsigned char_  b_ModulNbr,                  |
+|                                        unsigned char_  b_PulseEncoderNbr,           |
+|                                        unsigned char_  b_CycleSelection,            |
+|                                        unsigned char_  b_InterruptHandling)         |
 +----------------------------------------------------------------------------+
 | Task              : Enableor disable  the selected pulse encoder (b_PulseEncoderNbr)  |
 |                     from selected module (b_ModulNbr). Each input pulse    |
@@ -365,12 +365,12 @@ INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
 |                     interrupt is generated when the pulse encoder has run  |
 |                     down.                                                  |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_   b_BoardHandle       : Handle of board APCI-1710|
-|                     BYTE_   b_ModulNbr          : Module number to         |
+| Input Parameters  : unsigned char_   b_BoardHandle       : Handle of board APCI-1710|
+|                     unsigned char_   b_ModulNbr          : Module number to         |
 |                                                   configure (0 to 3)       |
-|                     BYTE_   b_PulseEncoderNbr   : Pulse encoder selection  |
+|                     unsigned char_   b_PulseEncoderNbr   : Pulse encoder selection  |
 |                                                   (0 to 3)                 |
-|                     BYTE_   b_CycleSelection    : APCI1710_CONTINUOUS:     |
+|                     unsigned char_   b_CycleSelection    : APCI1710_CONTINUOUS:     |
 |                                                       Each time the        |
 |                                                       counting value is set|
 |                                                       on "0", the pulse    |
@@ -381,7 +381,7 @@ INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
 |                                                       If the counter is set|
 |                                                       on "0", the pulse    |
 |                                                       encoder is stopped.  |
-|                     BYTE_   b_InterruptHandling : Interrupts can be        |
+|                     unsigned char_   b_InterruptHandling : Interrupts can be        |
 |                                                   generated, when the pulse|
 |                                                   encoder has run down.    |
 |                                                   With this parameter the  |
@@ -393,11 +393,11 @@ INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
 |                                                     APCI1710_DISABLE:      |
 |                                                     Interrupts are disabled
 
-       b_ModulNbr                      =(BYTE) CR_AREF(insn->chanspec);
-       b_Action                        =(BYTE) data[0];
-       b_PulseEncoderNbr       =(BYTE) data[1];
-       b_CycleSelection        =(BYTE) data[2];
-       b_InterruptHandling     =(BYTE) data[3];|
+       b_ModulNbr                      =(unsigned char) CR_AREF(insn->chanspec);
+       b_Action                        =(unsigned char) data[0];
+       b_PulseEncoderNbr       =(unsigned char) data[1];
+       b_CycleSelection        =(unsigned char) data[2];
+       b_InterruptHandling     =(unsigned char) data[3];|
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -418,18 +418,18 @@ INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = 0;
-       BYTE b_ModulNbr;
-       BYTE b_PulseEncoderNbr;
-       BYTE b_CycleSelection;
-       BYTE b_InterruptHandling;
-       BYTE b_Action;
+       unsigned char b_ModulNbr;
+       unsigned char b_PulseEncoderNbr;
+       unsigned char b_CycleSelection;
+       unsigned char b_InterruptHandling;
+       unsigned char b_Action;
 
        i_ReturnValue = insn->n;
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-       b_Action = (BYTE) data[0];
-       b_PulseEncoderNbr = (BYTE) data[1];
-       b_CycleSelection = (BYTE) data[2];
-       b_InterruptHandling = (BYTE) data[3];
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+       b_Action = (unsigned char) data[0];
+       b_PulseEncoderNbr = (unsigned char) data[1];
+       b_CycleSelection = (unsigned char) data[2];
+       b_InterruptHandling = (unsigned char) data[3];
 
        /***********************************/
        /* Test the selected module number */
@@ -662,33 +662,33 @@ INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_ReadPulseEncoderStatus                |
-|                                       (BYTE_  b_BoardHandle,               |
-|                                        BYTE_  b_ModulNbr,                  |
-|                                        BYTE_  b_PulseEncoderNbr,           |
-|                                        PBYTE_ pb_Status)                   |
+|                                       (unsigned char_  b_BoardHandle,               |
+|                                        unsigned char_  b_ModulNbr,                  |
+|                                        unsigned char_  b_PulseEncoderNbr,           |
+|                                        unsigned char *_ pb_Status)                   |
 +----------------------------------------------------------------------------+
 | Task    APCI1710_PULSEENCODER_READ          : Reads the pulse encoder status
                                                                                        and valuefrom selected pulse     |
 |                     encoder (b_PulseEncoderNbr) from selected module       |
 |                     (b_ModulNbr).                                          |
 +----------------------------------------------------------------------------+
-       BYTE   b_Type; data[0]
+       unsigned char   b_Type; data[0]
    APCI1710_PULSEENCODER_WRITE
  Writes a 32-bit value (ul_WriteValue) into the selected|
 |                     pulse encoder (b_PulseEncoderNbr) from selected module |
 |                     (b_ModulNbr). This operation set the new start pulse   |
 |                     encoder value.
  APCI1710_PULSEENCODER_READ
-| Input Parameters  : BYTE_   b_BoardHandle       : Handle of board APCI-1710|
-|            CRAREF()         BYTE_   b_ModulNbr          : Module number to         |
+| Input Parameters  : unsigned char_   b_BoardHandle       : Handle of board APCI-1710|
+|            CRAREF()         unsigned char_   b_ModulNbr          : Module number to         |
 |                                                   configure (0 to 3)       |
-|              data[1]       BYTE_   b_PulseEncoderNbr   : Pulse encoder selection  |
+|              data[1]       unsigned char_   b_PulseEncoderNbr   : Pulse encoder selection  |
 |                                                   (0 to 3)
    APCI1710_PULSEENCODER_WRITE
                                data[2]         ULONG_ ul_WriteValue        : 32-bit value to be       |
 |                                                   written             |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_ pb_Status            : Pulse encoder status.    |
+| Output Parameters : unsigned char *_ pb_Status            : Pulse encoder status.    |
 |                                                       0 : No overflow occur|
 |                                                       1 : Overflow occur
                                                PULONG_ pul_ReadValue       : Pulse encoder value      |  |
@@ -702,29 +702,29 @@ INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device * dev,
 +----------------------------------------------------------------------------+
 */
 
-/*_INT_   i_APCI1710_ReadPulseEncoderStatus       (BYTE_   b_BoardHandle,
-                                                BYTE_   b_ModulNbr,
-                                                BYTE_   b_PulseEncoderNbr,
+/*_INT_   i_APCI1710_ReadPulseEncoderStatus       (unsigned char_   b_BoardHandle,
+                                                unsigned char_   b_ModulNbr,
+                                                unsigned char_   b_PulseEncoderNbr,
 
-                                                PBYTE_ pb_Status)
+                                                unsigned char *_ pb_Status)
                                                 */
 INT i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusRegister;
-       BYTE b_ModulNbr;
-       BYTE b_PulseEncoderNbr;
-       PBYTE pb_Status;
-       BYTE b_Type;
+       unsigned char b_ModulNbr;
+       unsigned char b_PulseEncoderNbr;
+       unsigned char * pb_Status;
+       unsigned char b_Type;
        PULONG pul_ReadValue;
        ULONG ul_WriteValue;
 
        i_ReturnValue = insn->n;
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-       b_Type = (BYTE) data[0];
-       b_PulseEncoderNbr = (BYTE) data[1];
-       pb_Status = (PBYTE) & data[0];
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+       b_Type = (unsigned char) data[0];
+       b_PulseEncoderNbr = (unsigned char) data[1];
+       pb_Status = (unsigned char *) & data[0];
        pul_ReadValue = (PULONG) & data[1];
 
        /***********************************/
@@ -766,7 +766,7 @@ INT i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev,
                                                dw_StatusRegister;
 
                                        *pb_Status =
-                                               (BYTE) (devpriv->
+                                               (unsigned char) (devpriv->
                                                s_ModuleInfo[b_ModulNbr].
                                                s_PulseEncoderModuleInfo.
                                                dw_StatusRegister >> (1 +
index 5ddd092..fffd0f2 100644 (file)
@@ -73,16 +73,16 @@ struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)
 INT i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice * s,
        struct comedi_insn * insn, unsigned int * data)
 {
-       BYTE b_ConfigType;
+       unsigned char b_ConfigType;
        INT i_ReturnValue = 0;
        b_ConfigType = CR_CHAN(insn->chanspec);
 
        switch (b_ConfigType) {
        case APCI1710_PWM_INIT:
-               i_ReturnValue = i_APCI1710_InitPWM(dev, (BYTE) CR_AREF(insn->chanspec), //  b_ModulNbr
-                       (BYTE) data[0], //b_PWM
-                       (BYTE) data[1], // b_ClockSelection
-                       (BYTE) data[2], // b_TimingUnit
+               i_ReturnValue = i_APCI1710_InitPWM(dev, (unsigned char) CR_AREF(insn->chanspec),        //  b_ModulNbr
+                       (unsigned char) data[0],        //b_PWM
+                       (unsigned char) data[1],        // b_ClockSelection
+                       (unsigned char) data[2],        // b_TimingUnit
                        (ULONG) data[3],        //ul_LowTiming
                        (ULONG) data[4],        //ul_HighTiming
                        (PULONG) & data[0],     //pul_RealLowTiming
@@ -91,17 +91,17 @@ INT i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice
                break;
 
        case APCI1710_PWM_GETINITDATA:
-               i_ReturnValue = i_APCI1710_GetPWMInitialisation(dev, (BYTE) CR_AREF(insn->chanspec),    // b_ModulNbr
-                       (BYTE) data[0], //b_PWM
-                       (PBYTE) & data[0],      //pb_TimingUnit
+               i_ReturnValue = i_APCI1710_GetPWMInitialisation(dev, (unsigned char) CR_AREF(insn->chanspec),   // b_ModulNbr
+                       (unsigned char) data[0],        //b_PWM
+                       (unsigned char *) & data[0],    //pb_TimingUnit
                        (PULONG) & data[1],     //pul_LowTiming
                        (PULONG) & data[2],     //pul_HighTiming
-                       (PBYTE) & data[3],      // pb_StartLevel
-                       (PBYTE) & data[4],      // pb_StopMode
-                       (PBYTE) & data[5],      // pb_StopLevel
-                       (PBYTE) & data[6],      // pb_ExternGate
-                       (PBYTE) & data[7],      // pb_InterruptEnable
-                       (PBYTE) & data[8]       // pb_Enable
+                       (unsigned char *) & data[3],    // pb_StartLevel
+                       (unsigned char *) & data[4],    // pb_StopMode
+                       (unsigned char *) & data[5],    // pb_StopLevel
+                       (unsigned char *) & data[6],    // pb_ExternGate
+                       (unsigned char *) & data[7],    // pb_InterruptEnable
+                       (unsigned char *) & data[8]     // pb_Enable
                        );
                break;
 
@@ -117,11 +117,11 @@ INT i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_InitPWM                               |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
-|                                        BYTE_     b_PWM,                    |
-|                                        BYTE_     b_ClockSelection,         |
-|                                        BYTE_     b_TimingUnit,             |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        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,          |
@@ -135,11 +135,11 @@ INT i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice
 |                     You must calling this function be for you call any     |
 |                     other function witch access of the PWM.                |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_     b_BoardHandle    : Handle of board APCI-1710 |
-|                     BYTE_     b_ModulNbr       : Module number to configure|
+| Input Parameters  : unsigned char_     b_BoardHandle    : Handle of board APCI-1710 |
+|                     unsigned char_     b_ModulNbr       : Module number to configure|
 |                                                  (0 to 3)                  |
-|                     BYTE_     b_PWM            : Selected PWM (0 or 1).    |
-|                     BYTE_     b_ClockSelection : Selection from PCI bus    |
+|                     unsigned char_     b_PWM            : Selected PWM (0 or 1).    |
+|                     unsigned char_     b_ClockSelection : Selection from PCI bus    |
 |                                                  clock                     |
 |                                                   - APCI1710_30MHZ :       |
 |                                                     The PC have a 30 MHz   |
@@ -151,7 +151,7 @@ INT i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice
 |                                                     The APCI-1710 have a   |
 |                                                     integrated 40Mhz       |
 |                                                     quartz.                |
-|                     BYTE_     b_TimingUnit     : Base timing Unit (0 to 4) |
+|                     unsigned char_     b_TimingUnit     : Base timing Unit (0 to 4) |
 |                                                       0 : ns               |
 |                                                       1 : Ã¦s               |
 |                                                       2 : ms               |
@@ -180,10 +180,10 @@ INT i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice
 */
 
 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)
@@ -1442,29 +1442,29 @@ INT i_APCI1710_InitPWM(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_GetPWMInitialisation                  |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
-|                                        BYTE_     b_PWM,                    |
-|                                        PBYTE_   pb_TimingUnit,             |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        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)                 |
 +----------------------------------------------------------------------------+
 | Task              : Return the PWM (b_PWM) initialisation from selected    |
 |                     module (b_ModulNbr). You must calling the              |
 |                     "i_APCI1710_InitPWM" function be for you call this     |
 |                     function.                                              |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle : Handle of board APCI-1710        |
-|                     BYTE_ b_ModulNbr    : Selected module number (0 to 3)  |
-|                     BYTE_ b_PWM         : Selected PWM (0 or 1)            |
+| Input Parameters  : unsigned char_ b_BoardHandle : Handle of board APCI-1710        |
+|                     unsigned char_ b_ModulNbr    : Selected module number (0 to 3)  |
+|                     unsigned char_ b_PWM         : Selected PWM (0 or 1)            |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_  pb_TimingUnit      : Base timing Unit (0 to 4) |
+| Output Parameters : unsigned char *_  pb_TimingUnit      : Base timing Unit (0 to 4) |
 |                                                       0 : ns               |
 |                                                       1 : Ã¦s               |
 |                                                       2 : ms               |
@@ -1472,13 +1472,13 @@ INT i_APCI1710_InitPWM(struct comedi_device * dev,
 |                                                       4 : mn               |
 |                     PULONG_ pul_LowTiming      : Low base timing value.    |
 |                     PULONG_ pul_HighTiming     : High base timing value.   |
-|                     PBYTE_  pb_StartLevel      : Start period level        |
+|                     unsigned char *_  pb_StartLevel      : Start period level        |
 |                                                  selection                 |
 |                                                       0 : The period start |
 |                                                           with a low level |
 |                                                       1 : The period start |
 |                                                           with a high level|
-|                     PBYTE_  pb_StopMode        : Stop mode selection       |
+|                     unsigned char *_  pb_StopMode        : Stop mode selection       |
 |                                                  0 : The PWM is stopped    |
 |                                                      directly after the    |
 |                                                     "i_APCI1710_DisablePWM"|
@@ -1489,7 +1489,7 @@ INT i_APCI1710_InitPWM(struct comedi_device * dev,
 |                                                      function the PWM is   |
 |                                                      stopped at the end    |
 |                                                      from last period cycle|
-|                     PBYTE_  pb_StopLevel        : Stop PWM level selection |
+|                     unsigned char *_  pb_StopLevel        : Stop PWM level selection |
 |                                                    0 : The output signal   |
 |                                                        keep the level after|
 |                                                        the                 |
@@ -1504,13 +1504,13 @@ INT i_APCI1710_InitPWM(struct comedi_device * dev,
 |                                                        the                 |
 |                                                     "i_APCI1710_DisablePWM"|
 |                                                        function            |
-|                     PBYTE_  pb_ExternGate      : Extern gate action        |
+|                     unsigned char *_  pb_ExternGate      : Extern gate action        |
 |                                                  selection                 |
 |                                                   0 : Extern gate signal   |
 |                                                       not used.            |
 |                                                   1 : Extern gate signal   |
 |                                                       used.                |
-|                     PBYTE_  pb_InterruptEnable : Enable or disable the PWM |
+|                     unsigned char *_  pb_InterruptEnable : Enable or disable the PWM |
 |                                                  interrupt.                |
 |                                                  - APCI1710_ENABLE :       |
 |                                                    Enable the PWM interrupt|
@@ -1519,7 +1519,7 @@ INT i_APCI1710_InitPWM(struct comedi_device * dev,
 |                                                  - APCI1710_DISABLE :      |
 |                                                    Disable the PWM         |
 |                                                    interrupt               |
-|                     PBYTE_  pb_Enable          : Indicate if the PWM is    |
+|                     unsigned char *_  pb_Enable          : Indicate if the PWM is    |
 |                                                  enabled or no             |
 |                                                       0 : PWM not enabled  |
 |                                                       1 : PWM enabled      |
@@ -1535,15 +1535,15 @@ INT i_APCI1710_InitPWM(struct comedi_device * dev,
 */
 
 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_ReturnValue = 0;
        DWORD dw_Status;
@@ -1602,20 +1602,20 @@ INT i_APCI1710_GetPWMInitialisation(struct comedi_device * dev,
                                                (64 * b_ModulNbr));
 
                                        *pb_StartLevel =
-                                               (BYTE) ((dw_Command >> 5) & 1);
+                                               (unsigned char) ((dw_Command >> 5) & 1);
                                        *pb_StopMode =
-                                               (BYTE) ((dw_Command >> 0) & 1);
+                                               (unsigned char) ((dw_Command >> 0) & 1);
                                        *pb_StopLevel =
-                                               (BYTE) ((dw_Command >> 1) & 1);
+                                               (unsigned char) ((dw_Command >> 1) & 1);
                                        *pb_ExternGate =
-                                               (BYTE) ((dw_Command >> 4) & 1);
+                                               (unsigned char) ((dw_Command >> 4) & 1);
                                        *pb_InterruptEnable =
-                                               (BYTE) ((dw_Command >> 3) & 1);
+                                               (unsigned char) ((dw_Command >> 3) & 1);
 
                                        if (*pb_StopLevel) {
                                                *pb_StopLevel =
                                                        *pb_StopLevel +
-                                                       (BYTE) ((dw_Command >>
+                                                       (unsigned char) ((dw_Command >>
                                                                2) & 1);
                                        }
 
@@ -1628,7 +1628,7 @@ INT i_APCI1710_GetPWMInitialisation(struct comedi_device * dev,
                                                (64 * b_ModulNbr));
 
                                        *pb_Enable =
-                                               (BYTE) ((dw_Command >> 0) & 1);
+                                               (unsigned char) ((dw_Command >> 0) & 1);
 
                                        *pb_TimingUnit = devpriv->
                                                s_ModuleInfo[b_ModulNbr].
@@ -1686,30 +1686,30 @@ struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)
 INT i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice * s,
        struct comedi_insn * insn, unsigned int * data)
 {
-       BYTE b_WriteType;
+       unsigned char b_WriteType;
        INT i_ReturnValue = 0;
        b_WriteType = CR_CHAN(insn->chanspec);
 
        switch (b_WriteType) {
        case APCI1710_PWM_ENABLE:
                i_ReturnValue = i_APCI1710_EnablePWM(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
-                       (BYTE) data[0],
-                       (BYTE) data[1],
-                       (BYTE) data[2],
-                       (BYTE) data[3], (BYTE) data[4], (BYTE) data[5]);
+                       (unsigned char) CR_AREF(insn->chanspec),
+                       (unsigned char) data[0],
+                       (unsigned char) data[1],
+                       (unsigned char) data[2],
+                       (unsigned char) data[3], (unsigned char) data[4], (unsigned char) data[5]);
                break;
 
        case APCI1710_PWM_DISABLE:
                i_ReturnValue = i_APCI1710_DisablePWM(dev,
-                       (BYTE) CR_AREF(insn->chanspec), (BYTE) data[0]);
+                       (unsigned char) CR_AREF(insn->chanspec), (unsigned char) data[0]);
                break;
 
        case APCI1710_PWM_NEWTIMING:
                i_ReturnValue = i_APCI1710_SetNewPWMTiming(dev,
-                       (BYTE) CR_AREF(insn->chanspec),
-                       (BYTE) data[0],
-                       (BYTE) data[1], (ULONG) data[2], (ULONG) data[3]);
+                       (unsigned char) CR_AREF(insn->chanspec),
+                       (unsigned char) data[0],
+                       (unsigned char) data[1], (ULONG) data[2], (ULONG) data[3]);
                break;
 
        default:
@@ -1724,14 +1724,14 @@ INT i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_     i_APCI1710_EnablePWM                         |
-|                                       (BYTE_  b_BoardHandle,               |
-|                                        BYTE_  b_ModulNbr,                  |
-|                                        BYTE_  b_PWM,                       |
-|                                        BYTE_  b_StartLevel,                |
-|                                        BYTE_  b_StopMode,                  |
-|                                        BYTE_  b_StopLevel,                 |
-|                                        BYTE_  b_ExternGate,                |
-|                                        BYTE_  b_InterruptEnable)           |
+|                                       (unsigned char_  b_BoardHandle,               |
+|                                        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)           |
 +----------------------------------------------------------------------------+
 | Task              : Enable the selected PWM (b_PWM) from selected module   |
 |                     (b_ModulNbr). You must calling the "i_APCI1710_InitPWM"|
@@ -1741,16 +1741,16 @@ INT i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice
 |                     See function "i_APCI1710_SetBoardIntRoutineX" and the  |
 |                     Interrupt mask description chapter.                    |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle     : Handle of board APCI-1710    |
-|                     BYTE_ b_ModulNbr        : Selected module number       |
+| Input Parameters  : unsigned char_ b_BoardHandle     : Handle of board APCI-1710    |
+|                     unsigned char_ b_ModulNbr        : Selected module number       |
 |                                               (0 to 3)                     |
-|                     BYTE_ b_PWM             : Selected PWM (0 or 1)        |
-|                     BYTE_ b_StartLevel      : Start period level selection |
+|                     unsigned char_ b_PWM             : Selected PWM (0 or 1)        |
+|                     unsigned char_ b_StartLevel      : Start period level selection |
 |                                                0 : The period start with a |
 |                                                    low level               |
 |                                                1 : The period start with a |
 |                                                    high level              |
-|                     BYTE_ b_StopMode        : Stop mode selection          |
+|                     unsigned char_ b_StopMode        : Stop mode selection          |
 |                                                0 : The PWM is stopped      |
 |                                                    directly after the      |
 |                                                    "i_APCI1710_DisablePWM" |
@@ -1761,7 +1761,7 @@ INT i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice
 |                                                     function the PWM is    |
 |                                                     stopped at the end from|
 |                                                     last period cycle.     |
-|                     BYTE_ b_StopLevel       : Stop PWM level selection     |
+|                     unsigned char_ b_StopLevel       : Stop PWM level selection     |
 |                                                0 : The output signal keep  |
 |                                                    the level after the     |
 |                                                    "i_APCI1710_DisablePWM" |
@@ -1774,11 +1774,11 @@ INT i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice
 |                                                    to high after the       |
 |                                                    "i_APCI1710_DisablePWM" |
 |                                                    function                |
-|                     BYTE_ b_ExternGate      : Extern gate action selection |
+|                     unsigned char_ b_ExternGate      : Extern gate action selection |
 |                                                0 : Extern gate signal not  |
 |                                                    used.                   |
 |                                                1 : Extern gate signal used.|
-|                     BYTE_ b_InterruptEnable : Enable or disable the PWM    |
+|                     unsigned char_ b_InterruptEnable : Enable or disable the PWM    |
 |                                               interrupt.                   |
 |                                               - APCI1710_ENABLE :          |
 |                                                 Enable the PWM interrupt   |
@@ -1807,11 +1807,11 @@ INT i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice
 */
 
 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_ReturnValue = 0;
        DWORD dw_Status;
@@ -2034,9 +2034,9 @@ INT i_APCI1710_EnablePWM(struct comedi_device * dev,
 
 /*
 +----------------------------------------------------------------------------+
-| Function Name     : _INT_ i_APCI1710_DisablePWM (BYTE_  b_BoardHandle,     |
-|                                                  BYTE_  b_ModulNbr,        |
-|                                                  BYTE_  b_PWM)             |
+| Function Name     : _INT_ i_APCI1710_DisablePWM (unsigned char_  b_BoardHandle,     |
+|                                                  unsigned char_  b_ModulNbr,        |
+|                                                  unsigned char_  b_PWM)             |
 +----------------------------------------------------------------------------+
 | Task              : Disable the selected PWM (b_PWM) from selected module  |
 |                     (b_ModulNbr). The output signal level depend of the    |
@@ -2045,8 +2045,8 @@ INT i_APCI1710_EnablePWM(struct comedi_device * dev,
 |                     parameters from this function.                         |
 +----------------------------------------------------------------------------+
 | Input Parameters  :BYTE_ b_BoardHandle : Handle of board APCI-1710         |
-|                    BYTE_ b_ModulNbr    : Selected module number (0 to 3)   |
-|                    BYTE_ b_PWM         : Selected PWM (0 or 1)             |
+|                    unsigned char_ b_ModulNbr    : Selected module number (0 to 3)   |
+|                    unsigned char_ b_PWM         : Selected PWM (0 or 1)             |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -2062,7 +2062,7 @@ INT i_APCI1710_EnablePWM(struct comedi_device * dev,
 +----------------------------------------------------------------------------+
 */
 
-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_ReturnValue = 0;
        DWORD dw_Status;
@@ -2150,11 +2150,11 @@ INT i_APCI1710_DisablePWM(struct comedi_device * dev, BYTE b_ModulNbr, BYTE b_PW
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_SetNewPWMTiming                       |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
-|                                        BYTE_     b_PWM,                    |
-|                                        BYTE_     b_ClockSelection,         |
-|                                        BYTE_     b_TimingUnit,             |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        unsigned char_     b_ModulNbr,               |
+|                                        unsigned char_     b_PWM,                    |
+|                                        unsigned char_     b_ClockSelection,         |
+|                                        unsigned char_     b_TimingUnit,             |
 |                                        ULONG_   ul_LowTiming,              |
 |                                        ULONG_   ul_HighTiming)             |
 +----------------------------------------------------------------------------+
@@ -2162,11 +2162,11 @@ INT i_APCI1710_DisablePWM(struct comedi_device * dev, BYTE b_ModulNbr, BYTE b_PW
 |                     ul_TimingUnit determine the low/high timing base for   |
 |                     the period.                                            |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_     b_BoardHandle    : Handle of board APCI-1710 |
-|                     BYTE_     b_ModulNbr       : Module number to configure|
+| Input Parameters  : unsigned char_     b_BoardHandle    : Handle of board APCI-1710 |
+|                     unsigned char_     b_ModulNbr       : Module number to configure|
 |                                                  (0 to 3)                  |
-|                     BYTE_     b_PWM            : Selected PWM (0 or 1).    |
-|                     BYTE_     b_TimingUnit     : Base timing Unit (0 to 4) |
+|                     unsigned char_     b_PWM            : Selected PWM (0 or 1).    |
+|                     unsigned char_     b_TimingUnit     : Base timing Unit (0 to 4) |
 |                                                       0 : ns               |
 |                                                       1 : Ã¦s               |
 |                                                       2 : ms               |
@@ -2190,10 +2190,10 @@ INT i_APCI1710_DisablePWM(struct comedi_device * dev, BYTE b_ModulNbr, BYTE b_PW
 */
 
 INT i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
-       BYTE b_ModulNbr,
-       BYTE b_PWM, BYTE b_TimingUnit, ULONG ul_LowTiming, ULONG ul_HighTiming)
+       unsigned char b_ModulNbr,
+       unsigned char b_PWM, unsigned char b_TimingUnit, ULONG ul_LowTiming, ULONG ul_HighTiming)
 {
-       BYTE b_ClockSelection;
+       unsigned char b_ClockSelection;
        INT i_ReturnValue = 0;
        ULONG ul_LowTimerValue = 0;
        ULONG ul_HighTimerValue = 0;
@@ -3417,37 +3417,37 @@ INT i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_GetPWMStatus                          |
-|                               (BYTE_    b_BoardHandle,                     |
-|                                BYTE_    b_ModulNbr,                        |
-|                                BYTE_    b_PWM,                             |
-|                                PBYTE_  pb_PWMOutputStatus,                 |
-|                                PBYTE_  pb_ExternGateStatus)                |
+|                               (unsigned char_    b_BoardHandle,                     |
+|                                unsigned char_    b_ModulNbr,                        |
+|                                unsigned char_    b_PWM,                             |
+|                                unsigned char *_  pb_PWMOutputStatus,                 |
+|                                unsigned char *_  pb_ExternGateStatus)                |
 +----------------------------------------------------------------------------+
 | Task              : Return the status from selected PWM (b_PWM) from       |
 |                     selected module (b_ModulNbr).                          |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_  b_BoardHandle : Handle of board APCI-1710       |
-|                     BYTE_  b_PWM         : Selected PWM (0 or 1)           |
-|                     BYTE_  b_ModulNbr    : Selected module number (0 to 3)
-       b_ModulNbr                      =(BYTE)  CR_AREF(insn->chanspec);
-       b_PWM                           =(BYTE)  data[0];
+| Input Parameters  : unsigned char_  b_BoardHandle : Handle of board APCI-1710       |
+|                     unsigned char_  b_PWM         : Selected PWM (0 or 1)           |
+|                     unsigned char_  b_ModulNbr    : Selected module number (0 to 3)
+       b_ModulNbr                      =(unsigned char)  CR_AREF(insn->chanspec);
+       b_PWM                           =(unsigned char)  data[0];
 
  |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_  pb_PWMOutputStatus  : Return the PWM output    |
+| Output Parameters : unsigned char *_  pb_PWMOutputStatus  : Return the PWM output    |
 |                                                   level status.            |
 |                                                    0 : The PWM output level|
 |                                                        is low.             |
 |                                                    1 : The PWM output level|
 |                                                        is high.            |
-|                     PBYTE_  pb_ExternGateStatus : Return the extern gate   |
+|                     unsigned char *_  pb_ExternGateStatus : Return the extern gate   |
 |                                                   level status.            |
 |                                                    0 : The extern gate is  |
 |                                                        low.                |
 |                                                    1 : The extern gate is  |
 |                                                        high.
-    pb_PWMOutputStatus =(PBYTE) data[0];
-       pb_ExternGateStatus =(PBYTE) data[1];             |
+    pb_PWMOutputStatus =(unsigned char *) data[0];
+       pb_ExternGateStatus =(unsigned char *) data[1];             |
 +----------------------------------------------------------------------------+
 | Return Value      :  0: No error                                           |
 |                     -1: The handle parameter of the board is wrong         |
@@ -3466,16 +3466,16 @@ INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su
        INT i_ReturnValue = 0;
        DWORD dw_Status;
 
-       BYTE b_ModulNbr;
-       BYTE b_PWM;
-       PBYTE pb_PWMOutputStatus;
-       PBYTE pb_ExternGateStatus;
+       unsigned char b_ModulNbr;
+       unsigned char b_PWM;
+       unsigned char * pb_PWMOutputStatus;
+       unsigned char * pb_ExternGateStatus;
 
        i_ReturnValue = insn->n;
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-       b_PWM = (BYTE) CR_CHAN(insn->chanspec);
-       pb_PWMOutputStatus = (PBYTE) & data[0];
-       pb_ExternGateStatus = (PBYTE) & data[1];
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+       b_PWM = (unsigned char) CR_CHAN(insn->chanspec);
+       pb_PWMOutputStatus = (unsigned char *) & data[0];
+       pb_ExternGateStatus = (unsigned char *) & data[1];
 
        /**************************/
        /* Test the module number */
@@ -3509,10 +3509,10 @@ INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su
 
                                        if (dw_Status & 0x1) {
                                                *pb_PWMOutputStatus =
-                                                       (BYTE) ((dw_Status >> 7)
+                                                       (unsigned char) ((dw_Status >> 7)
                                                        & 1);
                                                *pb_ExternGateStatus =
-                                                       (BYTE) ((dw_Status >> 6)
+                                                       (unsigned char) ((dw_Status >> 6)
                                                        & 1);
                                        }       // if (dw_Status & 0x1)
                                        else {
index c1b7f4c..8d8052d 100644 (file)
@@ -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);
index bb6e162..35153b1 100644 (file)
@@ -65,31 +65,31 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_InitSSI                               |
-|                               (BYTE_    b_BoardHandle,                     |
-|                                BYTE_    b_ModulNbr,                        |
-|                                BYTE_    b_SSIProfile,                      |
-|                                BYTE_    b_PositionTurnLength,              |
-|                                BYTE_    b_TurnCptLength,                   |
-|                                BYTE_    b_PCIInputClock,                   |
+|                               (unsigned char_    b_BoardHandle,                     |
+|                                unsigned char_    b_ModulNbr,                        |
+|                                unsigned char_    b_SSIProfile,                      |
+|                                unsigned char_    b_PositionTurnLength,              |
+|                                unsigned char_    b_TurnCptLength,                   |
+|                                unsigned char_    b_PCIInputClock,                   |
 |                                ULONG_  ul_SSIOutputClock,                  |
-|                                BYTE_    b_SSICountingMode)                 |
+|                                unsigned char_    b_SSICountingMode)                 |
 +----------------------------------------------------------------------------+
 | Task              : Configure the SSI operating mode from selected module  |
 |                     (b_ModulNbr). You must calling this function be for you|
 |                     call any other function witch access of SSI.           |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle         : Handle of board APCI-1710|
-|                     BYTE_ b_ModulNbr            : Module number to         |
+| Input Parameters  : unsigned char_ b_BoardHandle         : Handle of board APCI-1710|
+|                     unsigned char_ b_ModulNbr            : Module number to         |
 |                                                   configure (0 to 3)       |
-|                     BYTE_  b_SSIProfile         : Selection from SSI       |
+|                     unsigned char_  b_SSIProfile         : Selection from SSI       |
 |                                                   profile length (2 to 32).|
-|                     BYTE_  b_PositionTurnLength : Selection from SSI       |
+|                     unsigned char_  b_PositionTurnLength : Selection from SSI       |
 |                                                   position data length     |
 |                                                   (1 to 31).               |
-|                     BYTE_  b_TurnCptLength      : Selection from SSI turn  |
+|                     unsigned char_  b_TurnCptLength      : Selection from SSI turn  |
 |                                                   counter data length      |
 |                                                   (1 to 31).               |
-|                     BYTE   b_PCIInputClock      : Selection from PCI bus   |
+|                     unsigned char   b_PCIInputClock      : Selection from PCI bus   |
 |                                                   clock                    |
 |                                                 - APCI1710_30MHZ :         |
 |                                                   The PC have a PCI bus    |
@@ -103,7 +103,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 |                                                   for 30 MHz selection.    |
 |                                                   From  252 to 5 000 000 Hz|
 |                                                   for 33 MHz selection.    |
-|                     BYTE   b_SSICountingMode    : SSI counting mode        |
+|                     unsigned char   b_SSICountingMode    : SSI counting mode        |
 |                                                   selection                |
 |                                                 - APCI1710_BINARY_MODE :   |
 |                                                    Binary counting mode.   |
@@ -111,12 +111,12 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 |                                                    Gray counting mode.
 
        b_ModulNbr                      = CR_AREF(insn->chanspec);
-       b_SSIProfile            = (BYTE) data[0];
-       b_PositionTurnLength= (BYTE) data[1];
-       b_TurnCptLength         = (BYTE) data[2];
-       b_PCIInputClock         = (BYTE) data[3];
+       b_SSIProfile            = (unsigned char) data[0];
+       b_PositionTurnLength= (unsigned char) data[1];
+       b_TurnCptLength         = (unsigned char) data[2];
+       b_PCIInputClock         = (unsigned char) data[3];
        ul_SSIOutputClock       = (ULONG) data[4];
-       b_SSICountingMode       = (BYTE)  data[5];     |
+       b_SSICountingMode       = (unsigned char)  data[5];     |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -138,17 +138,17 @@ INT i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subde
 {
        INT i_ReturnValue = 0;
        UINT ui_TimerValue;
-       BYTE b_ModulNbr, b_SSIProfile, b_PositionTurnLength, b_TurnCptLength,
+       unsigned char b_ModulNbr, b_SSIProfile, b_PositionTurnLength, b_TurnCptLength,
                b_PCIInputClock, b_SSICountingMode;
        ULONG ul_SSIOutputClock;
 
        b_ModulNbr = CR_AREF(insn->chanspec);
-       b_SSIProfile = (BYTE) data[0];
-       b_PositionTurnLength = (BYTE) data[1];
-       b_TurnCptLength = (BYTE) data[2];
-       b_PCIInputClock = (BYTE) data[3];
+       b_SSIProfile = (unsigned char) data[0];
+       b_PositionTurnLength = (unsigned char) data[1];
+       b_TurnCptLength = (unsigned char) data[2];
+       b_PCIInputClock = (unsigned char) data[3];
        ul_SSIOutputClock = (ULONG) data[4];
-       b_SSICountingMode = (BYTE) data[5];
+       b_SSICountingMode = (unsigned char) data[5];
 
        i_ReturnValue = insn->n;
        /**************************/
@@ -357,9 +357,9 @@ INT i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subde
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_  i_APCI1710_Read1SSIValue                        |
-|                               (BYTE_     b_BoardHandle,                    |
-|                                BYTE_     b_ModulNbr,                       |
-|                                BYTE_     b_SelectedSSI,                    |
+|                               (unsigned char_     b_BoardHandle,                    |
+|                                unsigned char_     b_ModulNbr,                       |
+|                                unsigned char_     b_SelectedSSI,                    |
 |                                PULONG_ pul_Position,                       |
 |                                PULONG_ pul_TurnCpt)
  INT i_APCI1710_ReadSSIValue(struct comedi_device *dev,struct comedi_subdevice *s,
@@ -373,15 +373,15 @@ INT i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subde
                                                or Read all SSI counter (b_SelectedSSI) from              |
 |                     selected module (b_ModulNbr).                            |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle         : Handle of board APCI-1710|
-|                     BYTE_ b_ModulNbr            : Module number to         |
+| Input Parameters  : unsigned char_ b_BoardHandle         : Handle of board APCI-1710|
+|                     unsigned char_ b_ModulNbr            : Module number to         |
 |                                                   configure (0 to 3)       |
-|                     BYTE_ b_SelectedSSI         : Selection from SSI       |
+|                     unsigned char_ b_SelectedSSI         : Selection from SSI       |
 |                                                   counter (0 to 2)
 
-    b_ModulNbr         =   (BYTE) CR_AREF(insn->chanspec);
-       b_SelectedSSI   =       (BYTE) CR_CHAN(insn->chanspec); (in case of single ssi)
-       b_ReadType              =       (BYTE) CR_RANGE(insn->chanspec);
+    b_ModulNbr         =   (unsigned char) CR_AREF(insn->chanspec);
+       b_SelectedSSI   =       (unsigned char) CR_CHAN(insn->chanspec); (in case of single ssi)
+       b_ReadType              =       (unsigned char) CR_RANGE(insn->chanspec);
 |
 +----------------------------------------------------------------------------+
 | Output Parameters : PULONG_  pul_Position       : SSI position in the turn |
@@ -404,18 +404,18 @@ INT i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdev
        struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = 0;
-       BYTE b_Cpt;
-       BYTE b_Length;
-       BYTE b_Schift;
-       BYTE b_SSICpt;
+       unsigned char b_Cpt;
+       unsigned char b_Length;
+       unsigned char b_Schift;
+       unsigned char b_SSICpt;
        DWORD dw_And;
        DWORD dw_And1;
        DWORD dw_And2;
        DWORD dw_StatusReg;
        DWORD dw_CounterValue;
-       BYTE b_ModulNbr;
-       BYTE b_SelectedSSI;
-       BYTE b_ReadType;
+       unsigned char b_ModulNbr;
+       unsigned char b_SelectedSSI;
+       unsigned char b_ReadType;
        PULONG pul_Position;
        PULONG pul_TurnCpt;
        PULONG pul_Position1;
@@ -428,9 +428,9 @@ INT i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdev
 // For Read all
        pul_Position = (PULONG) & data[0];      //0-2
        pul_TurnCpt = (PULONG) & data[3];       //3-5
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-       b_SelectedSSI = (BYTE) CR_CHAN(insn->chanspec);
-       b_ReadType = (BYTE) CR_RANGE(insn->chanspec);
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+       b_SelectedSSI = (unsigned char) CR_CHAN(insn->chanspec);
+       b_ReadType = (unsigned char) CR_RANGE(insn->chanspec);
 
        /**************************/
        /* Test the module number */
@@ -701,10 +701,10 @@ INT i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdev
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_   i_APCI1710_ReadSSI1DigitalInput                |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
-|                                        BYTE_     b_InputChannel,           |
-|                                        PBYTE_   pb_ChannelStatus)          |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        unsigned char_     b_ModulNbr,               |
+|                                        unsigned char_     b_InputChannel,           |
+|                                        unsigned char *_   pb_ChannelStatus)          |
 +----------------------------------------------------------------------------+
 | Task              :
                                        (0) Set the digital output from selected SSI moule         |
@@ -716,13 +716,13 @@ INT i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdev
                     (3)Read the status from all SSI digital inputs from       |
 |                     selected SSI module (b_ModulNbr)                   |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle         : Handle of board APCI-1710|
-|                     BYTE_ b_ModulNbr    CR_AREF        : Module number to         |
+| Input Parameters  : unsigned char_ b_BoardHandle         : Handle of board APCI-1710|
+|                     unsigned char_ b_ModulNbr    CR_AREF        : Module number to         |
 |                                                   configure (0 to 3)       |
-|                     BYTE_ b_InputChannel CR_CHAN       : Selection from digital   |
+|                     unsigned char_ b_InputChannel CR_CHAN       : Selection from digital   |
 |                        data[0] which IOTYPE                           input ( 0 to 2)          |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_  pb_ChannelStatus    : Digital input channel    |
+| Output Parameters : unsigned char *_  pb_ChannelStatus    : Digital input channel    |
 |                                 data[0]                  status                   |
 |                                                   0 : Channle is not active|
 |                                                   1 : Channle is active    |
@@ -740,14 +740,14 @@ INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device * dev, struct comedi_su
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusReg;
-       BYTE b_ModulNbr;
-       BYTE b_InputChannel;
-       PBYTE pb_ChannelStatus;
-       PBYTE pb_InputStatus;
-       BYTE b_IOType;
+       unsigned char b_ModulNbr;
+       unsigned char b_InputChannel;
+       unsigned char * pb_ChannelStatus;
+       unsigned char * pb_InputStatus;
+       unsigned char b_IOType;
        i_ReturnValue = insn->n;
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-       b_IOType = (BYTE) data[0];
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+       b_IOType = (unsigned char) data[0];
 
        /**************************/
        /* Test the module number */
@@ -785,8 +785,8 @@ INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device * dev, struct comedi_su
                                /* Test the digital imnput channel number */
                                   /******************************************/
 
-                               b_InputChannel = (BYTE) CR_CHAN(insn->chanspec);
-                               pb_ChannelStatus = (PBYTE) & data[0];
+                               b_InputChannel = (unsigned char) CR_CHAN(insn->chanspec);
+                               pb_ChannelStatus = (unsigned char *) & data[0];
 
                                if (b_InputChannel <= 2) {
                                        /**************************/
@@ -797,7 +797,7 @@ INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device * dev, struct comedi_su
                                                inl(devpriv->s_BoardInfos.
                                                ui_Address + (64 * b_ModulNbr));
                                        *pb_ChannelStatus =
-                                               (BYTE) (((~dw_StatusReg) >> (4 +
+                                               (unsigned char) (((~dw_StatusReg) >> (4 +
                                                                b_InputChannel))
                                                & 1);
                                } else {
@@ -814,13 +814,13 @@ INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device * dev, struct comedi_su
                                        /**************************/
                                /* Read all digital input */
                                        /**************************/
-                               pb_InputStatus = (PBYTE) & data[0];
+                               pb_InputStatus = (unsigned char *) & data[0];
 
                                dw_StatusReg =
                                        inl(devpriv->s_BoardInfos.ui_Address +
                                        (64 * b_ModulNbr));
                                *pb_InputStatus =
-                                       (BYTE) (((~dw_StatusReg) >> 4) & 7);
+                                       (unsigned char) (((~dw_StatusReg) >> 4) & 7);
                                break;
 
                        default:
index 90316e1..c1b4f07 100644 (file)
@@ -63,11 +63,11 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_     i_APCI1710_InitTorCounter                    |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
-|                                        BYTE_     b_TorCounter,             |
-|                                        BYTE_     b_PCIInputClock,          |
-|                                        BYTE_     b_TimingUnit,             |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        unsigned char_     b_ModulNbr,               |
+|                                        unsigned char_     b_TorCounter,             |
+|                                        unsigned char_     b_PCIInputClock,          |
+|                                        unsigned char_     b_TimingUnit,             |
 |                                        ULONG_   ul_TimingInterval,         |
 |                                        PULONG_ pul_RealTimingInterval)     |
 +----------------------------------------------------------------------------+
@@ -82,11 +82,11 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 +----------------------------------------------------------------------------+
 | Input Parameters  :    |
 |
-               CR_AREF BYTE_   b_ModulNbr       : Module number to configure  |
+               CR_AREF unsigned char_   b_ModulNbr       : Module number to configure  |
 |                                                (0 to 3)                    |
-|           data[0] BYTE_   b_TorCounter     : Tor counter selection       |
+|           data[0] unsigned char_   b_TorCounter     : Tor counter selection       |
 |                                                (0 or 1).                   |
-|           data[1] BYTE_   b_PCIInputClock  : Selection from PCI bus clock|
+|           data[1] unsigned char_   b_PCIInputClock  : Selection from PCI bus clock|
 |                                                - APCI1710_30MHZ :          |
 |                                                  The PC have a PCI bus     |
 |                                                  clock from 30 MHz         |
@@ -104,7 +104,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 |                                                 than it is not possibl to |
 |                                                 used the gate input for   |
 |                                                 enabled the acquisition   |
-|           data[2] BYTE_   b_TimingUnit    : Base timing unit (0 to 4)    |
+|           data[2] unsigned char_   b_TimingUnit    : Base timing unit (0 to 4)    |
 |                                                 0 : ns                     |
 |                                                 1 : Âµs                     |
 |                                                 2 : ms                     |
@@ -137,19 +137,19 @@ INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
        ULONG ul_TimerValue = 0;
        DWORD dw_Command;
        double d_RealTimingInterval = 0;
-       BYTE b_ModulNbr;
-       BYTE b_TorCounter;
-       BYTE b_PCIInputClock;
-       BYTE b_TimingUnit;
+       unsigned char b_ModulNbr;
+       unsigned char b_TorCounter;
+       unsigned char b_PCIInputClock;
+       unsigned char b_TimingUnit;
        ULONG ul_TimingInterval;
        ULONG ul_RealTimingInterval = 0;
 
        i_ReturnValue = insn->n;
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
 
-       b_TorCounter = (BYTE) data[0];
-       b_PCIInputClock = (BYTE) data[1];
-       b_TimingUnit = (BYTE) data[2];
+       b_TorCounter = (unsigned char) data[0];
+       b_PCIInputClock = (unsigned char) data[1];
+       b_TimingUnit = (unsigned char) data[2];
        ul_TimingInterval = (ULONG) data[3];
        printk("INPUT clock %d\n", b_PCIInputClock);
 
@@ -864,13 +864,13 @@ INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_EnableTorCounter                      |
-|                                               (BYTE_ b_BoardHandle,        |
-|                                                BYTE_ b_ModulNbr,           |
-|                                               BYTE_ b_TorCounter,         |
-|                                               BYTE_ b_InputMode,          |
-|                                               BYTE_ b_ExternGate,         |
-|                                                BYTE_ b_CycleMode,          |
-|                                                BYTE_ b_InterruptEnable)    |
+|                                               (unsigned char_ b_BoardHandle,        |
+|                                                unsigned char_ b_ModulNbr,           |
+|                                               unsigned char_ b_TorCounter,         |
+|                                               unsigned char_ b_InputMode,          |
+|                                               unsigned char_ b_ExternGate,         |
+|                                                unsigned char_ b_CycleMode,          |
+|                                                unsigned char_ b_InterruptEnable)    |
 +----------------------------------------------------------------------------+
 | Task              : Enable the tor counter (b_TorCounter) from selected    |
 |                    module (b_ModulNbr). You must calling the              |
@@ -883,13 +883,13 @@ INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
 |                     The b_CycleMode parameter determine if you will        |
 |                     measured a single or more cycle.                       |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle  : Handle of board APCI-1710       |
-|                     BYTE_ b_ModulNbr     : Selected module number (0 to 3) |
-|                     BYTE_ b_TorCounter   : Tor counter selection (0 or 1). |
-|                    BYTE_ b_InputMode    : Input signal level selection    |
+| Input Parameters  : unsigned char_ b_BoardHandle  : Handle of board APCI-1710       |
+|                     unsigned char_ b_ModulNbr     : Selected module number (0 to 3) |
+|                     unsigned char_ b_TorCounter   : Tor counter selection (0 or 1). |
+|                    unsigned char_ b_InputMode    : Input signal level selection    |
 |                                              0 : Tor count each low level |
 |                                              1 : Tor count each high level|
-|                    BYTE_ b_ExternGate   : Extern gate action selection    |
+|                    unsigned char_ b_ExternGate   : Extern gate action selection    |
 |                                              0 : Extern gate signal not   |
 |                                                  used                     |
 |                                              1 : Extern gate signal used. |
@@ -928,9 +928,9 @@ INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
 |                                            The gate input is used for the |
 |                                            signal B                       |
 |                                                                           |
-|                     BYTE_ b_CycleMode    : Selected the tor counter        |
+|                     unsigned char_ b_CycleMode    : Selected the tor counter        |
 |                                            acquisition mode                |
-|                     BYTE_ b_InterruptEnable : Enable or disable the        |
+|                     unsigned char_ b_InterruptEnable : Enable or disable the        |
 |                                               tor counter interrupt.       |
 |                                               APCI1710_ENABLE:             |
 |                                               Enable the tor counter       |
@@ -959,9 +959,9 @@ INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_DisableTorCounter                     |
-|                                               (BYTE_  b_BoardHandle,       |
-|                                                BYTE_  b_ModulNbr,          |
-|                                               BYTE_  b_TorCounter)        |
+|                                               (unsigned char_  b_BoardHandle,       |
+|                                                unsigned char_  b_ModulNbr,          |
+|                                               unsigned char_  b_TorCounter)        |
 +----------------------------------------------------------------------------+
 | Task              : Disable the tor counter (b_TorCounter) from selected   |
 |                    module (b_ModulNbr). If you disable the tor counter    |
@@ -969,9 +969,9 @@ INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
 |                    counter witch the " i_APCI1710_EnableTorCounter"       |
 |                    function, the status register is cleared               |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle  : Handle of board APCI-1710       |
-|                     BYTE_ b_ModulNbr     : Selected module number (0 to 3) |
-|                     BYTE_ b_TorCounter   : Tor counter selection (0 or 1). |
+| Input Parameters  : unsigned char_ b_BoardHandle  : Handle of board APCI-1710       |
+|                     unsigned char_ b_ModulNbr     : Selected module number (0 to 3) |
+|                     unsigned char_ b_TorCounter   : Tor counter selection (0 or 1). |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -994,20 +994,20 @@ INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
        DWORD dw_Status;
        DWORD dw_DummyRead;
        DWORD dw_ConfigReg;
-       BYTE b_ModulNbr, b_Action;
-       BYTE b_TorCounter;
-       BYTE b_InputMode;
-       BYTE b_ExternGate;
-       BYTE b_CycleMode;
-       BYTE b_InterruptEnable;
-
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-       b_Action = (BYTE) data[0];      // enable or disable
-       b_TorCounter = (BYTE) data[1];
-       b_InputMode = (BYTE) data[2];
-       b_ExternGate = (BYTE) data[3];
-       b_CycleMode = (BYTE) data[4];
-       b_InterruptEnable = (BYTE) data[5];
+       unsigned char b_ModulNbr, b_Action;
+       unsigned char b_TorCounter;
+       unsigned char b_InputMode;
+       unsigned char b_ExternGate;
+       unsigned char b_CycleMode;
+       unsigned char b_InterruptEnable;
+
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+       b_Action = (unsigned char) data[0];     // enable or disable
+       b_TorCounter = (unsigned char) data[1];
+       b_InputMode = (unsigned char) data[2];
+       b_ExternGate = (unsigned char) data[3];
+       b_CycleMode = (unsigned char) data[4];
+       b_InterruptEnable = (unsigned char) data[5];
        i_ReturnValue = insn->n;;
        devpriv->tsk_Current = current; // Save the current process task structure
        /**************************/
@@ -1381,16 +1381,16 @@ INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_GetTorCounterInitialisation           |
-|                                               (BYTE_     b_BoardHandle,    |
-|                                                BYTE_     b_ModulNbr,       |
-|                                               BYTE_     b_TorCounter,     |
-|                                               PBYTE_   pb_TimingUnit,     |
+|                                               (unsigned char_     b_BoardHandle,    |
+|                                                unsigned char_     b_ModulNbr,       |
+|                                               unsigned char_     b_TorCounter,     |
+|                                               unsigned char *_   pb_TimingUnit,     |
 |                                               PULONG_ pul_TimingInterval, |
-|                                               PBYTE_   pb_InputMode,      |
-|                                               PBYTE_   pb_ExternGate,     |
-|                                                PBYTE_   pb_CycleMode,      |
-|                                               PBYTE_   pb_Enable,         |
-|                                                PBYTE_   pb_InterruptEnable)|
+|                                               unsigned char *_   pb_InputMode,      |
+|                                               unsigned char *_   pb_ExternGate,     |
+|                                                unsigned char *_   pb_CycleMode,      |
+|                                               unsigned char *_   pb_Enable,         |
+|                                                unsigned char *_   pb_InterruptEnable)|
 +----------------------------------------------------------------------------+
 | Task              : Enable the tor counter (b_TorCounter) from selected    |
 |                    module (b_ModulNbr). You must calling the              |
@@ -1403,37 +1403,37 @@ INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
 |                     The b_CycleMode parameter determine if you will        |
 |                     measured a single or more cycle.                       |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle  : Handle of board APCI-1710       |
-|                     BYTE_ b_ModulNbr     : Selected module number (0 to 3) |
-|                     BYTE_ b_TorCounter   : Tor counter selection (0 or 1)
+| Input Parameters  : unsigned char_ b_BoardHandle  : Handle of board APCI-1710       |
+|                     unsigned char_ b_ModulNbr     : Selected module number (0 to 3) |
+|                     unsigned char_ b_TorCounter   : Tor counter selection (0 or 1)
 
        b_ModulNbr                      =       CR_AREF(insn->chanspec);
        b_TorCounter            =       CR_CHAN(insn->chanspec);
 . |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_  pb_TimingUnit    : Base timing unit (0 to 4)   |
+| Output Parameters : unsigned char *_  pb_TimingUnit    : Base timing unit (0 to 4)   |
 |                                                 0 : ns                     |
 |                                                 1 : Âµs                     |
 |                                                 2 : ms                     |
 |                                                 3 : s                      |
 |                                                 4 : mn                     |
 |                     PULONG_ pul_TimingInterval : Base timing value.        |
-|                    PBYTE_ pb_InputMode        : Input signal level        |
+|                    unsigned char *_ pb_InputMode        : Input signal level        |
 |                                                 selection                 |
 |                                              0 : Tor count each low level |
 |                                              1 : Tor count each high level|
-|                    PBYTE_ pb_ExternGate      : Extern gate action         |
+|                    unsigned char *_ pb_ExternGate    : Extern gate action         |
 |                                                selection                  |
 |                                                0 : Extern gate signal not |
 |                                                    used                   |
 |                                                1 : Extern gate signal used|
-|                     PBYTE_ pb_CycleMode       : Tor counter acquisition    |
+|                     unsigned char *_ pb_CycleMode       : Tor counter acquisition    |
 |                                                mode                       |
-|                    PBYTE_ pb_Enable          : Indicate if the tor counter|
+|                    unsigned char *_ pb_Enable                : Indicate if the tor counter|
 |                                                is enabled or no           |
 |                                                0 : Tor counter disabled   |
 |                                                1 : Tor counter enabled    |
-|                     PBYTE_ pb_InterruptEnable : Enable or disable the      |
+|                     unsigned char *_ pb_InterruptEnable : Enable or disable the      |
 |                                                 tor counter interrupt.     |
 |                                                 APCI1710_ENABLE:           |
 |                                                 Enable the tor counter     |
@@ -1441,13 +1441,13 @@ INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
 |                                                 APCI1710_DISABLE:          |
 |                                                 Disable the tor counter    |
 |                                                 interrupt
-       pb_TimingUnit           =       (PBYTE) &data[0];
+       pb_TimingUnit           =       (unsigned char *) &data[0];
        pul_TimingInterval      =  (PULONG) &data[1];
-       pb_InputMode            =       (PBYTE) &data[2];
-       pb_ExternGate           =       (PBYTE) &data[3];
-       pb_CycleMode            =       (PBYTE) &data[4];
-       pb_Enable                       =       (PBYTE) &data[5];
-       pb_InterruptEnable      =       (PBYTE) &data[6];
+       pb_InputMode            =       (unsigned char *) &data[2];
+       pb_ExternGate           =       (unsigned char *) &data[3];
+       pb_CycleMode            =       (unsigned char *) &data[4];
+       pb_Enable                       =       (unsigned char *) &data[5];
+       pb_InterruptEnable      =       (unsigned char *) &data[6];
                  |
 +----------------------------------------------------------------------------+
 | Return Value      :  0: No error                                           |
@@ -1465,27 +1465,27 @@ INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
 {
        INT i_ReturnValue = 0;
        DWORD dw_Status;
-       BYTE b_ModulNbr;
-       BYTE b_TorCounter;
-       PBYTE pb_TimingUnit;
+       unsigned char b_ModulNbr;
+       unsigned char b_TorCounter;
+       unsigned char * pb_TimingUnit;
        PULONG pul_TimingInterval;
-       PBYTE pb_InputMode;
-       PBYTE pb_ExternGate;
-       PBYTE pb_CycleMode;
-       PBYTE pb_Enable;
-       PBYTE pb_InterruptEnable;
+       unsigned char * pb_InputMode;
+       unsigned char * pb_ExternGate;
+       unsigned char * pb_CycleMode;
+       unsigned char * pb_Enable;
+       unsigned char * pb_InterruptEnable;
 
        i_ReturnValue = insn->n;
        b_ModulNbr = CR_AREF(insn->chanspec);
        b_TorCounter = CR_CHAN(insn->chanspec);
 
-       pb_TimingUnit = (PBYTE) & data[0];
+       pb_TimingUnit = (unsigned char *) & data[0];
        pul_TimingInterval = (PULONG) & data[1];
-       pb_InputMode = (PBYTE) & data[2];
-       pb_ExternGate = (PBYTE) & data[3];
-       pb_CycleMode = (PBYTE) & data[4];
-       pb_Enable = (PBYTE) & data[5];
-       pb_InterruptEnable = (PBYTE) & data[6];
+       pb_InputMode = (unsigned char *) & data[2];
+       pb_ExternGate = (unsigned char *) & data[3];
+       pb_CycleMode = (unsigned char *) & data[4];
+       pb_Enable = (unsigned char *) & data[5];
+       pb_InterruptEnable = (unsigned char *) & data[6];
 
        /**************************/
        /* Test the module number */
@@ -1526,9 +1526,9 @@ INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
                                                (64 * b_ModulNbr));
 
                                        *pb_CycleMode =
-                                               (BYTE) ((dw_Status >> 4) & 1);
+                                               (unsigned char) ((dw_Status >> 4) & 1);
                                        *pb_InterruptEnable =
-                                               (BYTE) ((dw_Status >> 5) & 1);
+                                               (unsigned char) ((dw_Status >> 5) & 1);
 
                    /******************************************************/
                                        /* Test if extern gate used for clock or for signal B */
@@ -1582,10 +1582,10 @@ INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
                                        }       // if (dw_Status & 0x600)
                                        else {
                                                *pb_InputMode =
-                                                       (BYTE) ((dw_Status >> 6)
+                                                       (unsigned char) ((dw_Status >> 6)
                                                        & 1);
                                                *pb_ExternGate =
-                                                       (BYTE) ((dw_Status >> 7)
+                                                       (unsigned char) ((dw_Status >> 7)
                                                        & 1);
                                        }       // if (dw_Status & 0x600)
 
@@ -1643,11 +1643,11 @@ INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_ReadTorCounterValue                   |
-|                               (BYTE_     b_BoardHandle,                    |
-|                                BYTE_     b_ModulNbr,                       |
-|                               BYTE_     b_TorCounter,                     |
+|                               (unsigned char_     b_BoardHandle,                    |
+|                                unsigned char_     b_ModulNbr,                       |
+|                               unsigned char_     b_TorCounter,                     |
 |                                UINT_    ui_TimeOut,                        |
-|                                PBYTE_   pb_TorCounterStatus,               |
+|                                unsigned char *_   pb_TorCounterStatus,               |
 |                                PULONG_ pul_TorCounterValue)                |
 +----------------------------------------------------------------------------+
 | Task         case APCI1710_TOR_GETPROGRESSSTATUS: Return the tor counter
@@ -1660,15 +1660,15 @@ INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
 |                    (pul_TorCounterValue) after a conting cycle stop       |
 |                     from selected tor counter module (b_ModulNbr).         |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle  : Handle of board APCI-1710       |
-|                     BYTE_ b_ModulNbr     : Selected module number (0 to 3) |
-|                     BYTE_ b_TorCounter   : Tor counter selection (0 or 1).
+| Input Parameters  : unsigned char_ b_BoardHandle  : Handle of board APCI-1710       |
+|                     unsigned char_ b_ModulNbr     : Selected module number (0 to 3) |
+|                     unsigned char_ b_TorCounter   : Tor counter selection (0 or 1).
        b_ModulNbr    = CR_AREF(insn->chanspec);
-       b_ReadType    = (BYTE) data[0];
-       b_TorCounter  = (BYTE) data[1];
+       b_ReadType    = (unsigned char) data[0];
+       b_TorCounter  = (unsigned char) data[1];
        ui_TimeOut        = (UINT) data[2]; |
 +----------------------------------------------------------------------------+
-| Output Parameters : PBYTE_  pb_TorCounterStatus : Return the tor counter   |
+| Output Parameters : unsigned char *_  pb_TorCounterStatus : Return the tor counter   |
 |                                                    status.                 |
 |                                               0 : Conting cycle not started|
 |                                                   Software gate not set.   |
@@ -1684,7 +1684,7 @@ INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
 |                                                 "i_APCI1710_InitTorCounter"|
 |                                              4 : Timeeout occur           |
 |                     PULONG  pul_TorCounterValue  : Tor counter value.
-       pb_TorCounterStatus=(PBYTE) &data[0];
+       pb_TorCounterStatus=(unsigned char *) &data[0];
        pul_TorCounterValue=(PULONG) &data[1];    |
 +----------------------------------------------------------------------------+
 | Return Value      :  0: No error                                           |
@@ -1707,19 +1707,19 @@ INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device
        DWORD dw_Status;
        DWORD dw_TimeOut = 0;
 
-       BYTE b_ModulNbr;
-       BYTE b_TorCounter;
-       BYTE b_ReadType;
+       unsigned char b_ModulNbr;
+       unsigned char b_TorCounter;
+       unsigned char b_ReadType;
        UINT ui_TimeOut;
-       PBYTE pb_TorCounterStatus;
+       unsigned char * pb_TorCounterStatus;
        PULONG pul_TorCounterValue;
 
        i_ReturnValue = insn->n;
        b_ModulNbr = CR_AREF(insn->chanspec);
-       b_ReadType = (BYTE) data[0];
-       b_TorCounter = (BYTE) data[1];
+       b_ReadType = (unsigned char) data[0];
+       b_TorCounter = (unsigned char) data[1];
        ui_TimeOut = (UINT) data[2];
-       pb_TorCounterStatus = (PBYTE) & data[0];
+       pb_TorCounterStatus = (unsigned char *) & data[0];
        pul_TorCounterValue = (PULONG) & data[1];
 
        /**************************/
index 68b1d26..eb1551d 100644 (file)
@@ -63,12 +63,12 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_InitTTLIODirection                    |
-|                               (BYTE_    b_BoardHandle,                     |
-|                               BYTE_    b_ModulNbr,                        |
-|                               BYTE_    b_PortAMode,                       |
-|                               BYTE_    b_PortBMode,                       |
-|                               BYTE_    b_PortCMode,                       |
-|                               BYTE_    b_PortDMode)                       |
+|                               (unsigned char_    b_BoardHandle,                     |
+|                               unsigned char_    b_ModulNbr,                        |
+|                               unsigned char_    b_PortAMode,                       |
+|                               unsigned char_    b_PortBMode,                       |
+|                               unsigned char_    b_PortCMode,                       |
+|                               unsigned char_    b_PortDMode)                       |
 +----------------------------------------------------------------------------+
 | Task           APCI1710_TTL_INIT (using defaults)   : Configure the TTL I/O operating mode from selected     |
 |                     module  (b_ModulNbr). You must calling this function be|
@@ -76,15 +76,15 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
                                 APCI1710_TTL_INITDIRECTION(user inputs for direction)
 
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle         : Handle of board APCI-1710|
-|                     BYTE_ b_ModulNbr            : Module number to         |
+| Input Parameters  : unsigned char_ b_BoardHandle         : Handle of board APCI-1710|
+|                     unsigned char_ b_ModulNbr            : Module number to         |
 |                                                   configure (0 to 3)
-               b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-               b_InitType = (BYTE) data[0];
-               b_PortAMode     = (BYTE) data[1];
-               b_PortBMode = (BYTE) data[2];
-               b_PortCMode = (BYTE) data[3];
-               b_PortDMode     = (BYTE) data[4];|
+               b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+               b_InitType = (unsigned char) data[0];
+               b_PortAMode     = (unsigned char) data[1];
+               b_PortBMode = (unsigned char) data[2];
+               b_PortCMode = (unsigned char) data[3];
+               b_PortDMode     = (unsigned char) data[4];|
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -104,15 +104,15 @@ INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device * dev, struct comedi_sub
        struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = 0;
-       BYTE b_ModulNbr;
-       BYTE b_InitType;
-       BYTE b_PortAMode;
-       BYTE b_PortBMode;
-       BYTE b_PortCMode;
-       BYTE b_PortDMode;
-
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
-       b_InitType = (BYTE) data[0];
+       unsigned char b_ModulNbr;
+       unsigned char b_InitType;
+       unsigned char b_PortAMode;
+       unsigned char b_PortBMode;
+       unsigned char b_PortCMode;
+       unsigned char b_PortDMode;
+
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
+       b_InitType = (unsigned char) data[0];
        i_ReturnValue = insn->n;
 
        /**************************/
@@ -172,10 +172,10 @@ INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device * dev, struct comedi_sub
 
                        case APCI1710_TTL_INITDIRECTION:
 
-                               b_PortAMode = (BYTE) data[1];
-                               b_PortBMode = (BYTE) data[2];
-                               b_PortCMode = (BYTE) data[3];
-                               b_PortDMode = (BYTE) data[4];
+                               b_PortAMode = (unsigned char) data[1];
+                               b_PortBMode = (unsigned char) data[2];
+                               b_PortCMode = (unsigned char) data[3];
+                               b_PortDMode = (unsigned char) data[4];
 
              /********************/
                                /* Test the version */
@@ -352,11 +352,11 @@ INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device * dev, struct comedi_sub
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_   i_APCI1710_ReadTTLIOChannelValue               |
-|                                       (BYTE_     b_BoardHandle,            |
-|                                        BYTE_     b_ModulNbr,               |
-|                                        BYTE_     b_SelectedPort,           |
-|                                        BYTE_     b_InputChannel,           |
-|                                        PBYTE_   pb_ChannelStatus)          |
+|                                       (unsigned char_     b_BoardHandle,            |
+|                                        unsigned char_     b_ModulNbr,               |
+|                                        unsigned char_     b_SelectedPort,           |
+|                                        unsigned char_     b_InputChannel,           |
+|                                        unsigned char *_   pb_ChannelStatus)          |
 +----------------------------------------------------------------------------+
 | Task              : Read the status from selected TTL digital input        |
 |                     (b_InputChannel)
@@ -366,32 +366,32 @@ INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device * dev, struct comedi_sub
 +----------------------------------------------------------------------------+
 
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle         : Handle of board APCI-1710|
-|                     BYTE_ b_ModulNbr            : Module number to         |
+| Input Parameters  : unsigned char_ b_BoardHandle         : Handle of board APCI-1710|
+|                     unsigned char_ b_ModulNbr            : Module number to         |
 |                                                   configure (0 to 7)       |
-|                     BYTE_ b_SelectedPort,       : Selection from TTL I/O   |
+|                     unsigned char_ b_SelectedPort,       : Selection from TTL I/O   |
 |                                                   port (0 to 2)            |
 |                                                      0 : Port A selection  |
 |                                                      1 : Port B selection  |
 |                                                      2 : Port C selection  |
 |                                                      3 : Port D selection  |
-|                     BYTE_ b_InputChannel        : Selection from digital   |
+|                     unsigned char_ b_InputChannel        : Selection from digital   |
 |                                                   input ( 0 to 2)
 APCI1710_TTL_READCHANNEL
        b_ModulNbr        = CR_AREF(insn->chanspec);
        b_SelectedPort= CR_RANGE(insn->chanspec);
        b_InputChannel= CR_CHAN(insn->chanspec);
-       b_ReadType        = (BYTE) data[0];
+       b_ReadType        = (unsigned char) data[0];
 
  APCI1710_TTL_READPORT|
        b_ModulNbr        = CR_AREF(insn->chanspec);
        b_SelectedPort= CR_RANGE(insn->chanspec);
-       b_ReadType        = (BYTE) data[0];
+       b_ReadType        = (unsigned char) data[0];
 
 +----------------------------------------------------------------------------+
 | Output Parameters : data[0]
 
-       PBYTE_  pb_ChannelStatus    : Digital input channel    |
+       unsigned char *_  pb_ChannelStatus    : Digital input channel    |
 |                                                   status                   |
 |                                                   0 : Channle is not active|
 |                                                   1 : Channle is active    |
@@ -411,15 +411,15 @@ INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subde
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusReg;
-       BYTE b_ModulNbr;
-       BYTE b_SelectedPort;
-       BYTE b_InputChannel;
-       BYTE b_ReadType;
-       PBYTE pb_ChannelStatus;
-       PBYTE pb_PortValue;
+       unsigned char b_ModulNbr;
+       unsigned char b_SelectedPort;
+       unsigned char b_InputChannel;
+       unsigned char b_ReadType;
+       unsigned char * pb_ChannelStatus;
+       unsigned char * pb_PortValue;
 
        i_ReturnValue = insn->n;
-       b_ReadType = (BYTE) data[0];
+       b_ReadType = (unsigned char) data[0];
        b_ModulNbr = CR_AREF(insn->chanspec);
        b_SelectedPort = CR_RANGE(insn->chanspec);
        b_InputChannel = CR_CHAN(insn->chanspec);
@@ -439,7 +439,7 @@ INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subde
                        switch (b_ReadType) {
 
                        case APCI1710_TTL_READCHANNEL:
-                               pb_ChannelStatus = (PBYTE) & data[0];
+                               pb_ChannelStatus = (unsigned char *) & data[0];
              /********************************/
                                /* Test the TTL I/O port number */
              /********************************/
@@ -493,7 +493,7 @@ INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subde
 
                                                                *pb_ChannelStatus
                                                                        =
-                                                                       (BYTE) (
+                                                                       (unsigned char) (
                                                                        (dw_StatusReg
                                                                                >>
                                                                                (8 * b_SelectedPort)) >> b_InputChannel) & 1;
@@ -533,7 +533,7 @@ INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subde
                                break;
 
                        case APCI1710_TTL_READPORT:
-                               pb_PortValue = (PBYTE) & data[0];
+                               pb_PortValue = (unsigned char *) & data[0];
                          /********************************/
                                /* Test the TTL I/O port number */
                          /********************************/
@@ -578,7 +578,7 @@ INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subde
                                                                (64 * b_ModulNbr));
 
                                                        *pb_PortValue =
-                                                               (BYTE) (
+                                                               (unsigned char) (
                                                                (dw_StatusReg >>
                                                                        (8 * b_SelectedPort)) & 0xFF);
                                                } else {
@@ -640,8 +640,8 @@ INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subde
 |                     (port A, port B and port C) from selected TTL          |
 |                    module (b_ModulNbr)                                    |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle         : Handle of board APCI-1710|
-|                     BYTE_ b_ModulNbr            : Module number to         |
+| Input Parameters  : unsigned char_ b_BoardHandle         : Handle of board APCI-1710|
+|                     unsigned char_ b_ModulNbr            : Module number to         |
 |                                                   configure (0 to 3)       |
 +----------------------------------------------------------------------------+
 | Output Parameters : PULONG_  pul_PortValue      : Digital TTL inputs port  |
@@ -660,10 +660,10 @@ INT i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusReg;
-       BYTE b_ModulNbr;
+       unsigned char b_ModulNbr;
        PULONG pul_PortValue;
 
-       b_ModulNbr = (BYTE) CR_AREF(insn->chanspec);
+       b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
        i_ReturnValue = insn->n;
        pul_PortValue = (PULONG) & data[0];
 
@@ -789,9 +789,9 @@ INT i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
 /*
 +----------------------------------------------------------------------------+
 | Function Name     : _INT_ i_APCI1710_SetTTLIOChlOn                         |
-|                               (BYTE_           b_BoardHandle,              |
-|                                BYTE_           b_ModulNbr,                 |
-|                                BYTE_           b_OutputChannel)
+|                               (unsigned char_           b_BoardHandle,              |
+|                                unsigned char_           b_ModulNbr,                 |
+|                                unsigned char_           b_OutputChannel)
 INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,struct comedi_subdevice *s,
        struct comedi_insn *insn,unsigned int *data)           |
 +----------------------------------------------------------------------------+
@@ -799,9 +799,9 @@ INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,struct comedi
 |                     parameter b_Channel. Setting an output means setting   |
 |                     an ouput high.                                         |
 +----------------------------------------------------------------------------+
-| Input Parameters  : BYTE_ b_BoardHandle   : Handle of board APCI-1710      |
-|                     BYTE_ b_ModulNbr      : Selected module number (0 to 3)|
-|                     BYTE_ b_OutputChannel : Selection from digital output  |
+| Input Parameters  : unsigned char_ b_BoardHandle   : Handle of board APCI-1710      |
+|                     unsigned char_ b_ModulNbr      : Selected module number (0 to 3)|
+|                     unsigned char_ b_OutputChannel : Selection from digital output  |
 |                                             channel (0 or 1)               |
 |                                                0      : PD0                |
 |                                                1      : PD1                |
@@ -830,8 +830,8 @@ INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device * dev,
 {
        INT i_ReturnValue = 0;
        DWORD dw_StatusReg = 0;
-       BYTE b_ModulNbr;
-       BYTE b_OutputChannel;
+       unsigned char b_ModulNbr;
+       unsigned char b_OutputChannel;
        UINT ui_State;
 
        i_ReturnValue = insn->n;
index b0907ec..007ae8c 100644 (file)
@@ -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;
index 19df5c1..afe4126 100644 (file)
@@ -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];
index a8a1bb2..5cab638 100644 (file)
@@ -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;
 }
 
index 3f8929c..f2578bb 100644 (file)
@@ -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;
index a6b504c..54d2359 100644 (file)
@@ -850,22 +850,22 @@ INT i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
       /***********************************/
                /* Get the software trigger status */
       /***********************************/
-               data[1] = (BYTE) ((ul_Command1 >> 1) & 1);
+               data[1] = (unsigned char) ((ul_Command1 >> 1) & 1);
 
       /***********************************/
                /* Get the hardware trigger status */
       /***********************************/
-               data[2] = (BYTE) ((ul_Command1 >> 2) & 1);
+               data[2] = (unsigned char) ((ul_Command1 >> 2) & 1);
 
       /*********************************/
                /* Get the software clear status */
       /*********************************/
-               data[3] = (BYTE) ((ul_Command1 >> 3) & 1);
+               data[3] = (unsigned char) ((ul_Command1 >> 3) & 1);
 
       /***************************/
                /* Get the overflow status */
       /***************************/
-               data[4] = (BYTE) ((ul_Command1 >> 0) & 1);
+               data[4] = (unsigned char) ((ul_Command1 >> 0) & 1);
        }                       // else  if  (devpriv->b_TimerSelectMode==ADDIDATA_COUNTER)
        else if ((devpriv->b_TimerSelectMode != ADDIDATA_TIMER)
                && (devpriv->b_TimerSelectMode != ADDIDATA_WATCHDOG)
index 906d635..c9249ea 100644 (file)
@@ -69,11 +69,11 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 |                for you call any other function witch access of TTL.        |
 |                APCI16XX_TTL_INITDIRECTION(user inputs for direction)       |
 +----------------------------------------------------------------------------+
-| Input Parameters  : b_InitType    = (BYTE) data[0];                        |
-|                     b_Port0Mode   = (BYTE) data[1];                        |
-|                     b_Port1Mode   = (BYTE) data[2];                        |
-|                     b_Port2Mode   = (BYTE) data[3];                        |
-|                     b_Port3Mode   = (BYTE) data[4];                        |
+| Input Parameters  : b_InitType    = (unsigned char) data[0];                        |
+|                     b_Port0Mode   = (unsigned char) data[1];                        |
+|                     b_Port1Mode   = (unsigned char) data[2];                        |
+|                     b_Port2Mode   = (unsigned char) data[3];                        |
+|                     b_Port3Mode   = (unsigned char) data[4];                        |
 |                     ........                                               |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
@@ -94,10 +94,10 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_Command = 0;
-       BYTE b_Cpt = 0;
-       BYTE b_NumberOfPort =
-               (BYTE) (devpriv->ps_BoardInfo->i_NbrTTLChannel / 8);
+       unsigned char b_Command = 0;
+       unsigned char b_Cpt = 0;
+       unsigned char b_NumberOfPort =
+               (unsigned char) (devpriv->ps_BoardInfo->i_NbrTTLChannel / 8);
 
        /************************/
        /* Test the buffer size */
@@ -108,7 +108,7 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
                /* Get the command */
                /* **************** */
 
-               b_Command = (BYTE) data[0];
+               b_Command = (unsigned char) data[0];
 
           /********************/
                /* Test the command */
@@ -122,7 +122,7 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
              /***************************************/
 
                        if ((b_Command == APCI16XX_TTL_INITDIRECTION)
-                               && ((BYTE) (insn->n - 1) != b_NumberOfPort)) {
+                               && ((unsigned char) (insn->n - 1) != b_NumberOfPort)) {
                 /*******************/
                                /* Data size error */
                 /*******************/
@@ -132,7 +132,7 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
                        }
 
                        if ((b_Command == APCI16XX_TTL_OUTPUTMEMORY)
-                               && ((BYTE) (insn->n) != 2)) {
+                               && ((unsigned char) (insn->n) != 2)) {
                 /*******************/
                                /* Data size error */
                 /*******************/
@@ -266,11 +266,11 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
 |              APCI16XX_TTL_READCHANNEL                                      |
 |                    b_SelectedPort= CR_RANGE(insn->chanspec);               |
 |                    b_InputChannel= CR_CHAN(insn->chanspec);                |
-|                    b_ReadType          = (BYTE) data[0];                          |
+|                    b_ReadType          = (unsigned char) data[0];                          |
 |                                                                            |
 |              APCI16XX_TTL_READPORT                                         |
 |                    b_SelectedPort= CR_RANGE(insn->chanspec);               |
-|                    b_ReadType          = (BYTE) data[0];                          |
+|                    b_ReadType          = (unsigned char) data[0];                          |
 +----------------------------------------------------------------------------+
 | Output Parameters : data[0]    0 : Channle is not active                   |
 |                                1 : Channle is active                       |
@@ -287,12 +287,12 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_Command = 0;
-       BYTE b_NumberOfPort =
-               (BYTE) (devpriv->ps_BoardInfo->i_NbrTTLChannel / 8);
-       BYTE b_SelectedPort = CR_RANGE(insn->chanspec);
-       BYTE b_InputChannel = CR_CHAN(insn->chanspec);
-       BYTE *pb_Status;
+       unsigned char b_Command = 0;
+       unsigned char b_NumberOfPort =
+               (unsigned char) (devpriv->ps_BoardInfo->i_NbrTTLChannel / 8);
+       unsigned char b_SelectedPort = CR_RANGE(insn->chanspec);
+       unsigned char b_InputChannel = CR_CHAN(insn->chanspec);
+       unsigned char *pb_Status;
        DWORD dw_Status;
 
        /************************/
@@ -304,7 +304,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
                /* Get the command */
                /* **************** */
 
-               b_Command = (BYTE) data[0];
+               b_Command = (unsigned char) data[0];
 
           /********************/
                /* Test the command */
@@ -380,7 +380,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
        /**************************/
 
        if (i_ReturnValue >= 0) {
-               pb_Status = (PBYTE) & data[0];
+               pb_Status = (unsigned char *) & data[0];
 
           /*******************************/
                /* Get the digital inpu status */
@@ -394,7 +394,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
                /* Save the port value */
           /***********************/
 
-               *pb_Status = (BYTE) dw_Status;
+               *pb_Status = (unsigned char) dw_Status;
 
           /***************************************/
                /* Test if read channel status command */
@@ -433,10 +433,10 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
 int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
-       BYTE b_Command = (BYTE) CR_AREF(insn->chanspec);
+       unsigned char b_Command = (unsigned char) CR_AREF(insn->chanspec);
        INT i_ReturnValue = insn->n;
-       BYTE b_Cpt = 0;
-       BYTE b_NumberOfPort = 0;
+       unsigned char b_Cpt = 0;
+       unsigned char b_NumberOfPort = 0;
        unsigned int *pls_ReadData = data;
 
        /********************/
@@ -450,7 +450,7 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
           /**********************************/
 
                b_NumberOfPort =
-                       (BYTE) (devpriv->ps_BoardInfo->i_NbrTTLChannel / 32);
+                       (unsigned char) (devpriv->ps_BoardInfo->i_NbrTTLChannel / 32);
                if ((b_NumberOfPort * 32) <
                        devpriv->ps_BoardInfo->i_NbrTTLChannel) {
                        b_NumberOfPort = b_NumberOfPort + 1;
@@ -551,11 +551,11 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
 |              APCI16XX_TTL_WRITECHANNEL_ON | APCI16XX_TTL_WRITECHANNEL_OFF  |
 |                    b_SelectedPort = CR_RANGE(insn->chanspec);              |
 |                    b_OutputChannel= CR_CHAN(insn->chanspec);               |
-|                    b_Command      = (BYTE) data[0];                        |
+|                    b_Command      = (unsigned char) data[0];                        |
 |                                                                            |
 |              APCI16XX_TTL_WRITEPORT_ON | APCI16XX_TTL_WRITEPORT_OFF        |
 |                    b_SelectedPort = CR_RANGE(insn->chanspec);              |
-|                    b_Command      = (BYTE) data[0];                        |
+|                    b_Command      = (unsigned char) data[0];                        |
 +----------------------------------------------------------------------------+
 | Output Parameters : data[0] : TTL output port 0 to 3 data                  |
 |                     data[1] : TTL output port 4 to 7 data                  |
@@ -574,11 +574,11 @@ int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_Command = 0;
-       BYTE b_NumberOfPort =
-               (BYTE) (devpriv->ps_BoardInfo->i_NbrTTLChannel / 8);
-       BYTE b_SelectedPort = CR_RANGE(insn->chanspec);
-       BYTE b_OutputChannel = CR_CHAN(insn->chanspec);
+       unsigned char b_Command = 0;
+       unsigned char b_NumberOfPort =
+               (unsigned char) (devpriv->ps_BoardInfo->i_NbrTTLChannel / 8);
+       unsigned char b_SelectedPort = CR_RANGE(insn->chanspec);
+       unsigned char b_OutputChannel = CR_CHAN(insn->chanspec);
        DWORD dw_Status = 0;
 
        /************************/
@@ -590,7 +590,7 @@ int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device * dev,
                /* Get the command */
                /* **************** */
 
-               b_Command = (BYTE) data[0];
+               b_Command = (unsigned char) data[0];
 
           /********************/
                /* Test the command */
index 68eb8df..c1509ef 100644 (file)
@@ -149,7 +149,7 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device * dev, struct comedi_sub
        struct comedi_insn * insn, unsigned int * data)
 {
        USHORT us_ConvertTiming, us_TmpValue, i;
-       BYTE b_Tmp;
+       unsigned char b_Tmp;
 
        // fix convertion time to 10 us
        if (!devpriv->ui_EocEosConversionTime) {
@@ -710,7 +710,7 @@ int i_APCI3120_CommandAnalogInput(struct comedi_device * dev, struct comedi_subd
 int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device * dev,
        struct comedi_subdevice * s)
 {
-       BYTE b_Tmp;
+       unsigned char b_Tmp;
        UINT ui_Tmp, ui_DelayTiming = 0, ui_TimerValue1 = 0, dmalen0 =
                0, dmalen1 = 0, ui_TimerValue2 =
                0, ui_TimerValue0, ui_ConvertTiming;
@@ -1426,7 +1426,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
 
        unsigned int int_amcc, ui_Check, i;
        USHORT us_TmpValue;
-       BYTE b_DummyRead;
+       unsigned char b_DummyRead;
 
        struct comedi_subdevice *s = dev->subdevices + 0;
        ui_Check = 1;
@@ -1974,16 +1974,16 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevi
 
        UINT ui_Timervalue2;
        USHORT us_TmpValue;
-       BYTE b_Tmp;
+       unsigned char b_Tmp;
 
        if (!data[1])
                comedi_error(dev, "config:No timer constant !");
 
-       devpriv->b_Timer2Interrupt = (BYTE) data[2];    // save info whether to enable or disable interrupt
+       devpriv->b_Timer2Interrupt = (unsigned char) data[2];   // save info whether to enable or disable interrupt
 
        ui_Timervalue2 = data[1] / 1000;        // convert nano seconds  to u seconds
 
-       //this_board->i_hwdrv_InsnConfigTimer(dev, ui_Timervalue2,(BYTE)data[0]);
+       //this_board->i_hwdrv_InsnConfigTimer(dev, ui_Timervalue2,(unsigned char)data[0]);
        us_TmpValue = (USHORT) inw(devpriv->iobase + APCI3120_RD_STATUS);
 
        //EL250804: Testing if board APCI3120 have the new Quartz or if it is an APCI3001
@@ -2125,7 +2125,7 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, struct comedi_subdevic
 
        UINT ui_Timervalue2 = 0;
        USHORT us_TmpValue;
-       BYTE b_Tmp;
+       unsigned char b_Tmp;
 
        if ((devpriv->b_Timer2Mode != APCI3120_WATCHDOG)
                && (devpriv->b_Timer2Mode != APCI3120_TIMER)) {
@@ -2308,7 +2308,7 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, struct comedi_subdevic
 int i_APCI3120_InsnReadTimer(struct comedi_device * dev, struct comedi_subdevice * s,
        struct comedi_insn * insn, unsigned int * data)
 {
-       BYTE b_Tmp;
+       unsigned char b_Tmp;
        USHORT us_TmpValue, us_TmpValue_2, us_StatusValue;
 
        if ((devpriv->b_Timer2Mode != APCI3120_WATCHDOG)
index 59d5d87..03031bb 100644 (file)
@@ -166,10 +166,10 @@ static const struct comedi_lrange range_apci3120_ao = { 2, {
 #define MAX_ANALOGINPUT_CHANNELS    32
 
 typedef struct {
-       BYTE b_Type;            /* EOC or EOS */
-       BYTE b_InterruptFlag;   /* Interrupt use or not                    */
+       unsigned char b_Type;           /* EOC or EOS */
+       unsigned char b_InterruptFlag;  /* Interrupt use or not                    */
        UINT ui_ConvertTiming;  /* Selection of the convertion time        */
-       BYTE b_NbrOfChannel;    /* Number of channel to read               */
+       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                    */
 
@@ -214,7 +214,7 @@ int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev, struct comedi_sub
                                    struct comedi_insn *insn, unsigned int *data);
 
 //DO
-//int i_APCI3120_WriteDigitalOutput(struct comedi_device *dev, BYTE data);
+//int i_APCI3120_WriteDigitalOutput(struct comedi_device *dev, unsigned char data);
 int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device *dev,
                                       struct comedi_subdevice *s, struct comedi_insn *insn,
                                       unsigned int *data);
index 1ff66be..d44837c 100644 (file)
@@ -118,11 +118,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;
index a6f57f5..d93fff3 100644 (file)
@@ -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
index b7268e4..6914637 100644 (file)
@@ -87,8 +87,8 @@ int i_APCI3XXX_TestConversionStarted(struct comedi_device * dev)
 +----------------------------------------------------------------------------+
 | Task           Converting mode and convert time selection                  |
 +----------------------------------------------------------------------------+
-| Input Parameters  : b_SingleDiff  = (BYTE)  data[1];                       |
-|                     b_TimeBase    = (BYTE)  data[2]; (0: ns, 1:micros 2:ms)|
+| Input Parameters  : b_SingleDiff  = (unsigned char)  data[1];                       |
+|                     b_TimeBase    = (unsigned char)  data[2]; (0: ns, 1:micros 2:ms)|
 |                    dw_ReloadValue = (DWORD) data[3];                       |
 |                     ........                                               |
 +----------------------------------------------------------------------------+
@@ -109,8 +109,8 @@ int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_TimeBase = 0;
-       BYTE b_SingleDiff = 0;
+       unsigned char b_TimeBase = 0;
+       unsigned char b_SingleDiff = 0;
        DWORD dw_ReloadValue = 0;
        DWORD dw_TestReloadValue = 0;
 
@@ -123,13 +123,13 @@ int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device * dev,
                /* Get the Singel/Diff flag */
           /****************************/
 
-               b_SingleDiff = (BYTE) data[1];
+               b_SingleDiff = (unsigned char) data[1];
 
           /****************************/
                /* Get the time base unitiy */
           /****************************/
 
-               b_TimeBase = (BYTE) data[2];
+               b_TimeBase = (unsigned char) data[2];
 
           /*************************************/
                /* Get the convert time reload value */
@@ -281,8 +281,8 @@ int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device * dev,
 +----------------------------------------------------------------------------+
 | Task           Converting mode and convert time selection                  |
 +----------------------------------------------------------------------------+
-| Input Parameters  : b_ConvertMode = (BYTE)  data[0];                       |
-|                     b_TimeBase    = (BYTE)  data[1]; (0: ns, 1:micros 2:ms)|
+| Input Parameters  : b_ConvertMode = (unsigned char)  data[0];                       |
+|                     b_TimeBase    = (unsigned char)  data[1]; (0: ns, 1:micros 2:ms)|
 |                    dw_ReloadValue = (DWORD) data[2];                       |
 |                     ........                                               |
 +----------------------------------------------------------------------------+
@@ -305,7 +305,7 @@ int i_APCI3XXX_InsnConfigAnalogInput(struct comedi_device * dev,
        /************************/
 
        if (insn->n >= 1) {
-               switch ((BYTE) data[0]) {
+               switch ((unsigned char) data[0]) {
                case APCI3XXX_CONFIGURATION:
                        i_ReturnValue =
                                i_APCI3XXX_AnalogInputConfigOperatingMode(dev,
@@ -359,12 +359,12 @@ int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_Configuration = (BYTE) CR_RANGE(insn->chanspec);
-       BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
+       unsigned char b_Configuration = (unsigned char) CR_RANGE(insn->chanspec);
+       unsigned char b_Channel = (unsigned char) CR_CHAN(insn->chanspec);
        DWORD dw_Temp = 0;
        DWORD dw_Configuration = 0;
        DWORD dw_AcquisitionCpt = 0;
-       BYTE b_Interrupt = 0;
+       unsigned char b_Interrupt = 0;
 
        /*************************************/
        /* Test if operating mode configured */
@@ -607,7 +607,7 @@ int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device * dev,
 void v_APCI3XXX_Interrupt(int irq, void *d)
 {
        struct comedi_device *dev = d;
-       BYTE b_CopyCpt = 0;
+       unsigned char b_CopyCpt = 0;
        DWORD dw_Status = 0;
 
        /***************************/
@@ -687,8 +687,8 @@ void v_APCI3XXX_Interrupt(int irq, void *d)
 int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
-       BYTE b_Range = (BYTE) CR_RANGE(insn->chanspec);
-       BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
+       unsigned char b_Range = (unsigned char) CR_RANGE(insn->chanspec);
+       unsigned char b_Channel = (unsigned char) CR_CHAN(insn->chanspec);
        DWORD dw_Status = 0;
        INT i_ReturnValue = insn->n;
 
@@ -778,8 +778,8 @@ int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device * dev,
 |                for you call any other function witch access of TTL.        |
 |                APCI3XXX_TTL_INIT_DIRECTION_PORT2(user inputs for direction)|
 +----------------------------------------------------------------------------+
-| Input Parameters  : b_InitType    = (BYTE) data[0];                        |
-|                     b_Port2Mode   = (BYTE) data[1];                        |
+| Input Parameters  : b_InitType    = (unsigned char) data[0];                        |
+|                     b_Port2Mode   = (unsigned char) data[1];                        |
 +----------------------------------------------------------------------------+
 | Output Parameters : -                                                      |
 +----------------------------------------------------------------------------+
@@ -795,7 +795,7 @@ int i_APCI3XXX_InsnConfigInitTTLIO(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_Command = 0;
+       unsigned char b_Command = 0;
 
        /************************/
        /* Test the buffer size */
@@ -806,7 +806,7 @@ int i_APCI3XXX_InsnConfigInitTTLIO(struct comedi_device * dev,
                /* Get the command */
                /* **************** */
 
-               b_Command = (BYTE) data[0];
+               b_Command = (unsigned char) data[0];
 
           /********************/
                /* Test the command */
@@ -923,7 +923,7 @@ int i_APCI3XXX_InsnBitsTTLIO(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_ChannelCpt = 0;
+       unsigned char b_ChannelCpt = 0;
        DWORD dw_ChannelMask = 0;
        DWORD dw_BitMask = 0;
        DWORD dw_Status = 0;
@@ -1077,7 +1077,7 @@ int i_APCI3XXX_InsnBitsTTLIO(struct comedi_device * dev,
 int i_APCI3XXX_InsnReadTTLIO(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
-       BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
+       unsigned char b_Channel = (unsigned char) CR_CHAN(insn->chanspec);
        INT i_ReturnValue = insn->n;
        unsigned int *pls_ReadData = data;
 
@@ -1191,8 +1191,8 @@ int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
-       BYTE b_State = 0;
+       unsigned char b_Channel = (unsigned char) CR_CHAN(insn->chanspec);
+       unsigned char b_State = 0;
        DWORD dw_Status = 0;
 
        /************************/
@@ -1200,7 +1200,7 @@ int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device * dev,
        /************************/
 
        if (insn->n >= 1) {
-               b_State = (BYTE) data[0];
+               b_State = (unsigned char) data[0];
 
           /***********************/
                /* Test if read port 0 */
@@ -1302,7 +1302,7 @@ int i_APCI3XXX_InsnReadDigitalInput(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
+       unsigned char b_Channel = (unsigned char) CR_CHAN(insn->chanspec);
        DWORD dw_Temp = 0;
 
        /***************************/
@@ -1413,7 +1413,7 @@ int i_APCI3XXX_InsnBitsDigitalOutput(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_ChannelCpt = 0;
+       unsigned char b_ChannelCpt = 0;
        DWORD dw_ChannelMask = 0;
        DWORD dw_BitMask = 0;
        DWORD dw_Status = 0;
@@ -1509,8 +1509,8 @@ int i_APCI3XXX_InsnWriteDigitalOutput(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_Channel = CR_CHAN(insn->chanspec);
-       BYTE b_State = 0;
+       unsigned char b_Channel = CR_CHAN(insn->chanspec);
+       unsigned char b_State = 0;
        DWORD dw_Status = 0;
 
        /************************/
@@ -1527,7 +1527,7 @@ int i_APCI3XXX_InsnWriteDigitalOutput(struct comedi_device * dev,
                        /* Get the command */
              /*******************/
 
-                       b_State = (BYTE) data[0];
+                       b_State = (unsigned char) data[0];
 
              /********************************/
                        /* Read the digital output port */
@@ -1584,7 +1584,7 @@ int i_APCI3XXX_InsnReadDigitalOutput(struct comedi_device * dev,
        struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
 {
        INT i_ReturnValue = insn->n;
-       BYTE b_Channel = CR_CHAN(insn->chanspec);
+       unsigned char b_Channel = CR_CHAN(insn->chanspec);
        DWORD dw_Status = 0;
 
        /************************/