home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxasync2.zip / COMSFUNC.H < prev    next >
Text File  |  1994-12-26  |  24KB  |  436 lines

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /*  MODULE         COMSFUNC.H                                                */
  4. /*                                                                           */
  5. /*  VERSION        Version 2.0 - 26th Dec 1994                               */
  6. /*                                                                           */
  7. /*  COPYRIGHT      Copyright (c) 1993, 1994 by Crucial Applications          */
  8. /*                             All rights reserved.                          */
  9. /*                                                                           */
  10. /*  DESCRIPTION    Header file for COMSFUNC.C Serial Communications Functions*/
  11. /*                                                                           */
  12. /*****************************************************************************/
  13.  
  14. #ifndef COMSFUNC_H_INCLUDED
  15. #define COMSFUNC_H_INCLUDED
  16.  
  17. /*********************************************************************/
  18. /* General definitions                                               */
  19. /*********************************************************************/
  20.  
  21. #define  MAX_SLEEP            10       /* maximum time wait/read poll*/
  22.  
  23. #define  RC_ASYNC_TIMED_OUT   -1       /* Function timed out         */
  24. #define  RC_ASYNC_NO_SIGNAL   -2       /* Function lost signal ie.DCD*/
  25. #define  RC_ASYNC_NO_INPUT    -3       /* Function didn't detect data*/
  26.  
  27. /*********************************************************************/
  28. /* Required ASYNC definitions.                                       */
  29. /*                                                                   */
  30. /* NOTE: Items which are commented out are those that ARE defined in */
  31. /*       the BSEDEV.h include file supplied with OS/2 2.x Toolkit.   */
  32. /*********************************************************************/
  33.  
  34. /*********************************************************************/
  35. /* General Device Control                                            */
  36. /*********************************************************************/
  37.  
  38. //#define IOCTL_GENERAL                0x000B
  39.  
  40. //#define DEV_FLUSHINPUT               0x0001
  41. //#define DEV_FLUSHOUTPUT              0x0002
  42.  
  43. /*********************************************************************/
  44. /* DEV_FLUSHINPUT, DEV_FLUSHOUTPUT                                   */
  45. /*********************************************************************/
  46.  
  47. // Uses a single BYTE no struct required.
  48.  
  49. #define DEVFLUSHPRM_SIZE               1                               /* not defined in BSEDEV.h */
  50. #define DEVFLUSHDAT_SIZE               1                               /* not defined in BSEDEV.h */
  51.  
  52. /* bCommandInfo ------------------------------------------ 7654 3210 */
  53. #define   GENERAL_CMDINFO_NONE         0x00             /* .... .... *//* not defined in BSEDEV.h */
  54.  
  55. /*********************************************************************/
  56. /* Async Device Control                                              */
  57. /*********************************************************************/
  58.  
  59. //#define IOCTL_ASYNC                  0x0001
  60.  
  61. //#define ASYNC_SETBAUDRATE            0x0041
  62. //#define ASYNC_SETLINECTRL            0x0042
  63. #define   ASYNC_SETEXTDRATE            0x0043                          /* not defined in BSEDEV.h */
  64. //#define ASYNC_TRANSMITIMM            0x0044
  65. //#define ASYNC_SETBREAKOFF            0x0045
  66. //#define ASYNC_SETMODEMCTRL           0x0046
  67. //#define ASYNC_STOPTRANSMIT           0x0047
  68. //#define ASYNC_STARTTRANSMIT          0x0048
  69. //#define ASYNC_SETBREAKON             0x004B
  70. //#define ASYNC_SETDCBINFO             0x0053
  71. #define   ASYNC_SETENHPARM             0x0054                          /* not defined in BSEDEV.h */
  72. //#define ASYNC_GETBAUDRATE            0x0061
  73. //#define ASYNC_GETLINECTRL            0x0062
  74. #define   ASYNC_GETEXTDRATE            0x0063                          /* not defined in BSEDEV.h */
  75. //#define ASYNC_GETCOMMSTATUS          0x0064
  76. //#define ASYNC_GETLINESTATUS          0x0065
  77. //#define ASYNC_GETMODEMOUTPUT         0x0066
  78. //#define ASYNC_GETMODEMINPUT          0x0067
  79. //#define ASYNC_GETINQUECOUNT          0x0068
  80. //#define ASYNC_GETOUTQUECOUNT         0x0069
  81. //#define ASYNC_GETCOMMERROR           0x006D
  82. //#define ASYNC_GETCOMMEVENT           0x0072
  83. //#define ASYNC_GETDCBINFO             0x0073
  84. #define   ASYNC_GETENHPARM             0x0074                          /* not defined in BSEDEV.h */
  85.  
  86. /*********************************************************************/
  87. /* ASYNC_GETCOMMERROR, ASYNC_SETBREAKOFF, ASYNC_SETBREAKON,          */
  88. /* ASYNC_SETMODEMCTRL                                                */
  89. /*********************************************************************/
  90.  
  91. // Returns COMERR a single WORD (16bit==USHORT) no struct required.
  92.  
  93. typedef USHORT    COMERR;
  94.  
  95. #define COMERROR_SIZE                  2                               /* not defined in BSEDEV.h */
  96.  
  97. /* --------------------------------------------- FEDC BA98 7654 3210 */
  98. //#define RX_QUE_OVERRUN               0x0001 /* .... .... .... ...1 */
  99. //#define RX_HARDWARE_OVERRUN          0x0002 /* .... .... .... ..1. */
  100. //#define PARITY_ERROR                 0x0004 /* .... .... .... .1.. */
  101. //#define FRAMING_ERROR                0x0008 /* .... .... .... 1... */
  102.  
  103. /*********************************************************************/
  104. /* ASYNC_GETBAUDRATE, ASYNC_SETBAUDRATE                              */
  105. /*********************************************************************/
  106.  
  107. // Uses a single WORD (16bit==USHORT) no struct required.
  108.  
  109. #define GETBAUDRATE_SIZE               2                               /* not defined in BSEDEV.h */
  110. #define SETBAUDRATE_SIZE               2                               /* not defined in BSEDEV.h */
  111.  
  112. /*********************************************************************/
  113. /* ASYNC_GETLINECTRL, ASYNC_SETLINECTRL                              */
  114. /*********************************************************************/
  115.  
  116. //#pragma pack(1)                      /* pack on 1 byte boundary    */
  117.  
  118. //typedef struct _LINECONTROL          /* lnctl */
  119. //        {
  120. //        BYTE bDataBits;              /* BYTE  */
  121. //        BYTE bParity;                /* BYTE  */
  122. //        BYTE bStopBits;              /* BYTE  */
  123. //        BYTE fTransBreak;            /* BYTE  */
  124. //        } LINECONTROL;
  125. //typedef LINECONTROL *PLINECONTROL;
  126.  
  127. #define GETLINECONTROL_SIZE            4                               /* not defined in BSEDEV.h */
  128. #define SETLINECONTROL_SIZE            3                               /* not defined in BSEDEV.h */
  129.  
  130. #define DATA_BITS_5                    0x05                            /* not defined in BSEDEV.h */
  131. #define DATA_BITS_6                    0x06                            /* not defined in BSEDEV.h */
  132. #define DATA_BITS_7                    0x07                            /* not defined in BSEDEV.h */
  133. #define DATA_BITS_8                    0x08                            /* not defined in BSEDEV.h */
  134.  
  135. #define PARITY_NONE                    0x00                            /* not defined in BSEDEV.h */
  136. #define PARITY_ODD                     0x01                            /* not defined in BSEDEV.h */
  137. #define PARITY_EVEN                    0x02                            /* not defined in BSEDEV.h */
  138. #define PARITY_MARK                    0x03                            /* not defined in BSEDEV.h */
  139. #define PARITY_SPACE                   0x04                            /* not defined in BSEDEV.h */
  140.  
  141. #define STOP_BITS_1                    0x00                            /* not defined in BSEDEV.h */
  142. #define STOP_BITS_15                   0x01                            /* not defined in BSEDEV.h */
  143. #define STOP_BITS_2                    0x02                            /* not defined in BSEDEV.h */
  144.  
  145. #define DATA_BITS_5_STR                "5"
  146. #define DATA_BITS_6_STR                "6"
  147. #define DATA_BITS_7_STR                "7"
  148. #define DATA_BITS_8_STR                "8"
  149. #define DATA_BITS_UNKNOWN_STR          "0"
  150.  
  151. #define PARITY_NONE_STR                "N"
  152. #define PARITY_ODD_STR                 "O"
  153. #define PARITY_EVEN_STR                "E"
  154. #define PARITY_MARK_STR                "M"
  155. #define PARITY_SPACE_STR               "S"
  156. #define PARITY_UNKNOWN_STR             "?"
  157.  
  158. #define STOP_BITS_1_STR                "1"
  159. #define STOP_BITS_15_STR               "1.5"
  160. #define STOP_BITS_2_STR                "2"
  161. #define STOP_BITS_UNKNOWN_STR          "0"
  162.  
  163. /*********************************************************************/
  164. /* ASYNC_GETEXTDRATE, ASYNC_SETEXTDRATE                              */
  165. /*********************************************************************/
  166.  
  167. #pragma pack(1)                        /* pack on 1 byte boundary    */
  168.  
  169. typedef struct _EXTDRATE               /* erate */
  170.         {
  171.         ULONG  ulCurrentBaudRate;      /* DWORD 4-bytes */
  172.         BYTE   bCurrentFraction;       /* BYTE  */
  173.         ULONG  ulMinBaudRate;          /* DWORD */
  174.         BYTE   bMinFraction;           /* BYTE  */
  175.         ULONG  ulMaxBaudRate;          /* DWORD */
  176.         BYTE   bMaxFraction;           /* BYTE  */
  177.         } EXTDRATE;
  178. typedef EXTDRATE *PEXTDRATE;
  179.  
  180. #define GETEXTDRATE_SIZE               15                              /* not defined in BSEDEV.h */
  181. #define SETEXTDRATE_SIZE               5                               /* not defined in BSEDEV.h */
  182.  
  183. /*********************************************************************/
  184. /* ASYNC_TRANSMITIMM                                                 */
  185. /*********************************************************************/
  186.  
  187. // Sends a single BYTE no struct required.
  188.  
  189. #define TRANSMITIMM_SIZE               1                               /* not defined in BSEDEV.h */
  190.  
  191. /*********************************************************************/
  192. /* ASYNC_SETMODEMCTRL                                                */
  193. /*********************************************************************/
  194.  
  195. //#pragma pack(1)                      /* pack on 1 byte boundary    */
  196.  
  197. //typedef struct _MODEMSTATUS          /* mdmst */
  198. //        {
  199. //        BYTE fbModemOn;              /* BYTE  */
  200. //        BYTE fbModemOff;             /* BYTE  */
  201. //        } MODEMSTATUS;
  202. //typedef MODEMSTATUS *PMODEMSTATUS;
  203.  
  204. #define MODEMSTATUS_SIZE               2                               /* not defined in BSEDEV.h */
  205.  
  206. /* MODEMSTATUS.fbModemOn --------------------------------- 7654 3210 */
  207. #define NONE_ON                        0x00             /* .... .... *//* not defined in BSEDEV.h */
  208. //#define DTR_ON                       0x01             /* .... ...1 */
  209. //#define RTS_ON                       0x02             /* .... ..1. */
  210. #define DTR_RTS_ON                     0x03             /* .... ..11 *//* not defined in BSEDEV.h */
  211.  
  212. /* MODEMSTATUS.fbModemOff -------------------------------- 7654 3210 */
  213. #define NONE_OFF                       0xFF             /* 1111 1111 *//* not defined in BSEDEV.h */
  214. //#define DTR_OFF                      0xFE             /* 1111 111. */
  215. //#define RTS_OFF                      0xFD             /* 1111 11.1 */
  216. #define DTR_RTS_OFF                    0xFC             /* 1111 11.. *//* not defined in BSEDEV.h */
  217.  
  218. /*********************************************************************/
  219. /* ASYNC_GETDCBINFO, ASYNC_SETDCBINFO                                */
  220. /*********************************************************************/
  221.  
  222. #pragma pack(1)                        /* pack on 1 byte boundary    */
  223.  
  224. typedef struct _DCBINFO2               /* dcbinf */
  225.         {
  226.         USHORT usWriteTimeout;         /* WORD */
  227.         USHORT usReadTimeout;          /* WORD */
  228.         BYTE   fbCtlHndShake;          /* BYTE */
  229.         BYTE   fbFlowReplace;          /* BYTE */
  230.         BYTE   fbTimeout;              /* BYTE */
  231.         BYTE   bErrorReplacementChar;  /* BYTE */
  232.         BYTE   bBreakReplacementChar;  /* BYTE */
  233.         BYTE   bXONChar;               /* BYTE */
  234.         BYTE   bXOFFChar;              /* BYTE */
  235.         } DCBINFO2;                                                    /* incorrectly defined in BSEDEV.h */
  236. typedef DCBINFO2 *PDCBINFO2;                                           /* incorrectly defined in BSEDEV.h */
  237.  
  238. #define GETDCBINFO_SIZE                11                              /* not defined in BSEDEV.h */
  239. #define SETDCBINFO_SIZE                11                              /* not defined in BSEDEV.h */
  240.  
  241. /* fbCtlHndShake ----------------------------------------- 7654 3210 */
  242. //#define MODE_DTR_CONTROL             0x01             /* .... ...1 */
  243. //#define MODE_DTR_HANDSHAKE           0x02             /* .... ..1. */
  244. //#define MODE_CTS_HANDSHAKE           0x08             /* .... 1... */
  245. //#define MODE_DSR_HANDSHAKE           0x10             /* ...1 .... */
  246. //#define MODE_DCD_HANDSHAKE           0x20             /* ..1. .... */
  247. //#define MODE_DSR_SENSITIVITY         0x40             /* .1.. .... */
  248.  
  249. /* fbFlowReplace ----------------------------------------- 7654 3210 */
  250. //#define MODE_AUTO_TRANSMIT           0x01             /* .... ...1 */
  251. //#define MODE_AUTO_RECEIVE            0x02             /* .... ..1. */
  252. //#define MODE_ERROR_CHAR              0x04             /* .... .1.. */
  253. //#define MODE_NULL_STRIPPING          0x08             /* .... 1... */
  254. //#define MODE_BREAK_CHAR              0x10             /* ...1 .... */
  255. #define   MODE_AUTO_FULL_DUPLEX        0x20             /* ..1. .... *//* not defined in BSEDEV.h */
  256. //#define MODE_RTS_CONTROL             0x40             /* 01.. .... */
  257. //#define MODE_RTS_HANDSHAKE           0x80             /* 10.. .... */
  258. //#define MODE_TRANSMIT_TOGGLE         0xC0             /* 11.. .... */
  259.  
  260. /* fbTimeout --------------------------------------------- 7654 3210 */
  261. //#define MODE_NO_WRITE_TIMEOUT        0x01             /* .... ...1 */
  262. //#define MODE_READ_TIMEOUT            0x02             /* .... .01. */
  263. //#define MODE_WAIT_READ_TIMEOUT       0x04             /* .... .10. */
  264. //#define MODE_NOWAIT_READ_TIMEOUT     0x06             /* .... .11. */
  265. #define   MODE_EXTD_BUFF_DISABLED      0x08             /* ...0 1... *//* not defined in BSEDEV.h */
  266. #define   MODE_EXTD_BUFF_ENABLED       0x10             /* ...1 0... *//* not defined in BSEDEV.h */
  267. #define   MODE_EXTD_BUFF_AUTO          0x18             /* ...1 1... *//* not defined in BSEDEV.h */
  268. //         RX trigger = 1                               /* .00. .... */
  269. #define   MODE_RX_TRIGGER_4            0x20             /* .01. .... *//* not defined in BSEDEV.h */
  270. #define   MODE_RX_TRIGGER_8            0x40             /* .10. .... *//* not defined in BSEDEV.h */
  271. #define   MODE_RX_TRIGGER_14           0x60             /* .11. .... *//* not defined in BSEDEV.h */
  272. //         TX trigger = 1                               /* 0... .... */
  273. #define   MODE_TX_BUFFER_16            0x80             /* 1... .... *//* not defined in BSEDEV.h */
  274.  
  275. /*********************************************************************/
  276. /* ASYNC_GETENHPARM, ASYNC_SETENHPARM                                */
  277. /*********************************************************************/
  278.  
  279. #pragma pack(1)                        /* pack on 1 byte boundary    */
  280.  
  281. typedef struct _ENHPARM                /* eparm */
  282.         {
  283.         BYTE   bEnhancedFlags;         /* BYTE  */
  284.         ULONG  ulReserved;             /* DWORD 4-bytes */
  285.         } ENHPARM;
  286. typedef ENHPARM *PENHPARM;
  287.  
  288. #define GETENHPARM_SIZE                5                               /* not defined in BSEDEV.h */
  289. #define SETENHPARM_SIZE                5                               /* not defined in BSEDEV.h */
  290.  
  291. /* bEnhancedFlags ---------------------------------------- 7654 3210 */
  292. #define   MODE_ENH_SUPPORTED           0x01             /* .... ...1 *//* not defined in BSEDEV.h */
  293. #define   MODE_ENH_ENABLED             0x02             /* .... ..1. *//* not defined in BSEDEV.h */
  294. //        Disable DMA Receive                           /* .... 00.. */
  295. #define   MODE_ENH_RXDMA_ENABLE        0x04             /* .... 01.. *//* not defined in BSEDEV.h */
  296. #define   MODE_ENH_RXDMA_DED_CHAN      0x08             /* .... 10.. *//* not defined in BSEDEV.h */
  297. //        Disable DMA Transmit                          /* ..00 .... */
  298. #define   MODE_ENH_TXDMA_ENABLE        0x10             /* ..01 .... *//* not defined in BSEDEV.h */
  299. #define   MODE_ENH_TXDMA_DED_CHAN      0x20             /* ..10 .... *//* not defined in BSEDEV.h */
  300. #define   MODE_ENH_RX_IN_DMA           0x40             /* .1.. .... *//* not defined in BSEDEV.h */
  301. #define   MODE_ENH_TX_IN_DMA           0x80             /* 1... .... *//* not defined in BSEDEV.h */
  302.  
  303. /*********************************************************************/
  304. /* ASYNC_GETCOMMSTATUS                                               */
  305. /*********************************************************************/
  306.  
  307. // Returns a single BYTE no struct required.
  308.  
  309. #define GETCOMMSTATUS_SIZE             1                               /* not defined in BSEDEV.h */
  310.  
  311. /* ------------------------------------------------------- 7654 3210 */
  312. //#define TX_WAITING_FOR_CTS           0x01             /* .... ...1 */
  313. //#define TX_WAITING_FOR_DSR           0x02             /* .... ..1. */
  314. //#define TX_WAITING_FOR_DCD           0x04             /* .... .1.. */
  315. //#define TX_WAITING_FOR_XON           0x08             /* .... 1... */
  316. //#define TX_WAITING_TO_SEND_XON       0x10             /* ...1 .... */
  317. //#define TX_WAITING_WHILE_BREAK_ON    0x20             /* ..1. .... */
  318. //#define TX_WAITING_TO_SEND_IMM       0x40             /* .1.. .... */
  319. //#define RX_WAITING_FOR_DSR           0x80             /* 1... .... */
  320.  
  321. /*********************************************************************/
  322. /* ASYNC_GETLINESTATUS                                               */
  323. /*********************************************************************/
  324.  
  325. // Returns a single BYTE no struct required.
  326.  
  327. #define GETLINESTATUS_SIZE             1                               /* not defined in BSEDEV.h */
  328.  
  329. /* ------------------------------------------------------- 7654 3210 */
  330. //#define WRITE_REQUEST_QUEUED         0x01             /* .... ...1 */
  331. //#define DATA_IN_TX_QUE               0x02             /* .... ..1. */
  332. //#define HARDWARE_TRANSMITTING        0x04             /* .... .1.. */
  333. //#define CHAR_READY_TO_SEND_IMM       0x08             /* .... 1... */
  334. //#define WAITING_TO_SEND_XON          0x10             /* ...1 .... */
  335. //#define WAITING_TO_SEND_XOFF         0x20             /* ..1. .... */
  336.  
  337. /*********************************************************************/
  338. /* ASYNC_GETMODEMINPUT, ASYNC_GETMODEMOUTPUT                         */
  339. /*********************************************************************/
  340.  
  341. // Returns a single BYTE no struct required.
  342.  
  343. #define GETMODEMIO_SIZE                1                               /* not defined in BSEDEV.h */
  344.  
  345. /* ASYNC_GETMODEMINPUT ----------------------------------- 7654 3210 */
  346. //#define CTS_ON                       0x10             /* ...1 .... */
  347. //#define DSR_ON                       0x20             /* ..1. .... */
  348. //#define RI_ON                        0x40             /* .1.. .... */
  349. //#define DCD_ON                       0x80             /* 1... .... */
  350.  
  351. /* ASYNC_GETMODEMOUTPUT ---------------------------------- 7654 3210 */
  352. //#define DTR_ON                       0x01             /* .... ...1 */
  353. //#define RTS_ON                       0x02             /* .... ..1. */
  354.  
  355. /*********************************************************************/
  356. /* ASYNC_GETINQUECOUNT, ASYNC_GETOUTQUECOUNT                         */
  357. /*********************************************************************/
  358.  
  359. #pragma pack(1)                        /* pack on 1 byte boundary    */
  360.  
  361. typedef struct _IOQUEUE                /* ioque */
  362.         {
  363.         USHORT usQueueCount;           /* WORD 2-bytes */
  364.         USHORT usQueueSize;            /* WORD  */
  365.         } IOQUEUE;
  366. typedef IOQUEUE *PIOQUEUE;
  367.  
  368. #define GETIOQUEUE_SIZE                4                               /* not defined in BSEDEV.h */
  369.  
  370. /*********************************************************************/
  371. /* ASYNC_GETCOMMEVENT                                                */
  372. /*********************************************************************/
  373.  
  374. // Returns a single WORD (16bit==USHORT) no struct required.
  375.  
  376. #define GETCOMMEVENT_SIZE              2                               /* not defined in BSEDEV.h */
  377.  
  378. /* --------------------------------------------- FEDC BA98 7654 3210 */
  379. //#define CHAR_RECEIVED                0x0001 /* .... .... .... ...1 */
  380. #define RX_TIMEOUT_INT                 0x0002 /* .... .... .... ..1. *//* not defined in BSEDEV.h */
  381. //#define LAST_CHAR_SENT               0x0004 /* .... .... .... .1.. */
  382. //#define CTS_CHANGED                  0x0008 /* .... .... .... 1... */
  383. //#define DSR_CHANGED                  0x0010 /* .... .... ...1 .... */
  384. //#define DCD_CHANGED                  0x0020 /* .... .... ..1. .... */
  385. //#define BREAK_DETECTED               0x0040 /* .... .... .1.. .... */
  386. //#define ERROR_OCCURRED               0x0080 /* .... .... 1... .... */
  387. //#define RI_DETECTED                  0x0100 /* .... ...1 .... .... */
  388.  
  389. /*********************************************************************/
  390. /* Prototypes                                                        */
  391. /*********************************************************************/
  392.  
  393. APIRET CallDevice(     HFILE hcomPort, ULONG     ulCategory, ULONG ulFunction, PVOID pParameters, PVOID pDataPacket );
  394. APIRET ActiveSignal(   HFILE hcomPort, BYTE      bSignal );
  395. APIRET FlushInput(     HFILE hcomPort );
  396. APIRET FlushOutput(    HFILE hcomPort );
  397.  
  398. APIRET GetDcbInfo(     HFILE hcomPort, PDCBINFO2 pdcbPortInfo );
  399. APIRET SetDcbInfo(     HFILE hcomPort, PDCBINFO2 pdcbPortInfo );
  400. APIRET GetEnhParm(     HFILE hcomPort, PBYTE     pbEnhancedFlags );
  401. APIRET SetEnhParm(     HFILE hcomPort, BYTE      bEnhancedFlags );
  402. APIRET GetLnCtrl(      HFILE hcomPort, PEXTDRATE perateBaudRate, PLINECONTROL plnctlLineControl );
  403. APIRET SetLnCtrl(      HFILE hcomPort, PEXTDRATE perateBaudRate, PLINECONTROL plnctlLineControl );
  404. APIRET GetComStatus(   HFILE hcomPort, PBYTE     pbComStatus );
  405. APIRET GetTxStatus(    HFILE hcomPort, PBYTE     pbTxStatus );
  406. APIRET GetModemOutput( HFILE hcomPort, PBYTE     pbMdmOutput );
  407. APIRET GetModemInput(  HFILE hcomPort, PBYTE     pbMdmInput );
  408. APIRET SetBreakOff(    HFILE hcomPort );
  409. APIRET SetBreakOn(     HFILE hcomPort );
  410. APIRET TxImmediate(    HFILE hcomPort, BYTE      bAnyByte );
  411. APIRET TxStop(         HFILE hcomPort );
  412. APIRET TxStart(        HFILE hcomPort );
  413. APIRET SetMdmOutput(   HFILE hcomPort, BYTE      bModemOn,   BYTE bModemOff );
  414. APIRET GetRxCount(     HFILE hcomPort, PUSHORT   pusRxCount, PUSHORT pusRxSize );
  415. APIRET GetTxCount(     HFILE hcomPort, PUSHORT   pusTxCount, PUSHORT pusTxSize );
  416. APIRET GetComError(    HFILE hcomPort, PUSHORT   pusComError );
  417. APIRET GetComEvent(    HFILE hcomPort, PUSHORT   pusComEvent );
  418.  
  419. APIRET PrtDcbInfo(     HFILE hcomPort );
  420. APIRET WaitCarrier(    HFILE hcomPort, LONG      lTimeLimit );
  421. APIRET WaitInput(      HFILE hcomPort, LONG      lTimeLimit );
  422. APIRET SendBreak(      HFILE hcomPort, ULONG     ulDuration );
  423.  
  424. APIRET OpenPort(       PSZ pszName,    PHFILE    phcomPort );
  425. APIRET ClosePort(      PHFILE phcomPort );
  426. APIRET WritePort(      HFILE hcomPort, PSZ       pszBuffer, ULONG ulBuffLen, PULONG pulRemains );
  427. APIRET ReadPort(       HFILE hcomPort, PBYTE    pbReadBuff, ULONG ulReadSize, PBYTE pbBuffer, PULONG pulBuffLen, LONG lTimeLimit, PSZ pszNullReplace, PSZ pszLineEnd );
  428.  
  429. /*********************************************************************/
  430.  
  431. #endif
  432.  
  433. /*********************************************************************/
  434. /* END MODULE                                                        */
  435. /*********************************************************************/
  436.