home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sd386v50.zip / sd386src.zip / COM.H < prev    next >
Text File  |  1994-11-19  |  7KB  |  111 lines

  1. /*****************************************************************************/
  2. /* DCB parameter structure.                                                  */
  3. /*****************************************************************************/
  4. typedef struct _dcb
  5. {
  6.  USHORT WriteTimeOut;
  7.  USHORT ReadTimeOut;
  8.  
  9.  struct _flags1
  10.  {
  11.   UINT  DTR_Ctrl  :2;         /* bit 0   bit 1                               */
  12.                               /*  0        0   Disable.                      */
  13.                               /*  0        1   Enable.                       */
  14.                               /*  1        0   Input handshaking.            */
  15.                               /*  1        1   Invalid.                      */
  16.                               /*                                             */
  17.   UINT  Reserved1 :1;         /* Reserved(returned as 0).                    */
  18.   UINT  CTS_Enable:1;         /* Enable output handshaking using CTS.        */
  19.   UINT  DSR_Enable:1;         /* Enable output handshaking using DSR.        */
  20.   UINT  DCD_Enable:1;         /* Enable output handshaking using DCD.        */
  21.   UINT  DSR_Sensi :1;         /* Enable input sensitivity using DSR.         */
  22.   UINT  Reserved2 :1;         /* Reserved( returned as 0 ).                  */
  23.  }flags1;                     /*                                             */
  24.                               /*                                             */
  25.  struct _flags2               /*                                             */
  26.  {                            /*                                             */
  27.   UINT  Tx_Auto_Flow_Enable:1;/* Enable Auto xmit Flow Control(XON/XOFF).    */
  28.   UINT  Rx_Auto_Flow_Enable:1;/* Enable Auto rcv  Flow Control(XON/XOFF).    */
  29.   UINT  Error_Replacement  :1;/* Enable error replacement character.         */
  30.   UINT  Null_Stripping     :1;/* Enable null stripping( remove null bytes).  */
  31.   UINT  Break_Replacement  :1;/* Enable break replacement character.         */
  32.   UINT  Rx_Auto_Flow       :1;/* 0 = normal 1 = full duplex.                 */
  33.   UINT  RTS_Ctrl           :2;/* b7 b6                                       */
  34.                               /*  0 0 Disable.                               */
  35.                               /*  0 1 Enable.                                */
  36.                               /*  1 0 Input Handshaking.                     */
  37.                               /*  1 1 Toggling on transmit.                  */
  38.  }flags2;                     /*                                             */
  39.                               /*                                             */
  40.  struct _flags3               /*                                             */
  41.  {                            /*                                             */
  42.   UINT  WriteInfiniteEnable:1;/* Enable Write Infinite Timeout processing.   */
  43.   UINT  ReadTimeOut        :2;/* b2 b3                                       */
  44.                               /*  0 1 Normal Read Timeout processing.        */
  45.                               /*  1 0 Wait-for-something readout timeout.    */
  46.                               /*  1 1 No-wait read timeout processing.       */
  47.                               /*                                             */
  48.   UINT  ExtHdweBuffering   :2;/* b4 b3                                       */
  49.                               /*  0 0 Not supported.                         */
  50.                               /*  0 1 Extended hardware buffering disabled.  */
  51.                               /*  1 0 Extended hardware buffering enabled.   */
  52.                               /*  1 1 Automatic Protocol override.           */
  53.                               /*                                             */
  54.   UINT  RxTriggerLevel     :2;/* b6 b5                                       */
  55.                               /*  0 0 1 character.                           */
  56.                               /*  0 1 4 characters.                          */
  57.                               /*  1 0 8 characters.                          */
  58.                               /*  1 1 14 characters.                         */
  59.                               /*                                             */
  60.   UINT  TxBufferLoadCount  :1;/* b7                                          */
  61.                               /*  0   1  character.                          */
  62.                               /*  1   16 characters.                         */
  63.  }flags3;                     /*                                             */
  64.                               /*                                             */
  65.  UCHAR ErrorReplacement;      /* Returned value.                             */
  66.  UCHAR BreakReplacement;      /* Returned value.                             */
  67.  UCHAR XON_Character;         /* Returned value.                             */
  68.  UCHAR XOFF_Character;        /* Returned value.                             */
  69. }DCB;                         /*                                             */
  70.  
  71. /*****************************************************************************/
  72. /* Line Control "Set" structure. Note that the structure is different        */
  73. /* for the 62H query call.                                                   */
  74. /*****************************************************************************/
  75. typedef struct _linectrl
  76. {
  77.  UCHAR DataBits;
  78.  UCHAR Parity;
  79.  UCHAR StopBits;
  80. }LINECTRL;
  81.  
  82. /*****************************************************************************/
  83. /* Com error structure.                                                      */
  84. /*****************************************************************************/
  85. typedef struct _comerror
  86. {
  87.  UINT RxQueueOverrun :1;    /* Receive Queue overrun.                        */
  88.  UINT RxHdweOverrun  :1;    /* Receive hardware overrun.                     */
  89.  UINT HdweParityError:1;    /* The hardware detected a parity error.         */
  90.  UINT HdweFrameError :1;    /* The hardware detected a framing error.        */
  91.  UINT Undef          :12;   /* Undefined.                                    */
  92. }COMERROR;
  93.  
  94. /*****************************************************************************/
  95. /* Peek receive buffer structure.                                         917*/
  96. /*****************************************************************************/
  97. typedef struct _peekbuf
  98. {
  99.  USHORT NumCharsInBuf;      /* Number of characters in the receive buffer.917*/
  100.  USHORT SizeOfRcvBuf;       /* Size of the receive buffer.                917*/
  101. }PEEKBUF;
  102.  
  103. /*****************************************************************************/
  104. /* Modem Control structure.                                                  */
  105. /*****************************************************************************/
  106. typedef struct _modemctrl
  107. {
  108.  UCHAR OnMask;
  109.  UCHAR OffMask;
  110. }MODEMCTRL;
  111.