home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / C / HSRC_100 / ASYNC.H < prev    next >
C/C++ Source or Header  |  1993-01-11  |  4KB  |  124 lines

  1. /*=============================================================================
  2.  
  3.                               HydraCom Version 1.00
  4.  
  5.                          A sample implementation of the
  6.                    HYDRA Bi-Directional File Transfer Protocol
  7.  
  8.                              HydraCom was written by
  9.                    Arjen G. Lentz, LENTZ SOFTWARE-DEVELOPMENT
  10.                   COPYRIGHT (C) 1991-1993; ALL RIGHTS RESERVED
  11.  
  12.                        The HYDRA protocol was designed by
  13.                  Arjen G. Lentz, LENTZ SOFTWARE-DEVELOPMENT and
  14.                              Joaquim H. Homrighausen
  15.                   COPYRIGHT (C) 1991-1993; ALL RIGHTS RESERVED
  16.  
  17.  
  18.   Revision history:
  19.   06 Sep 1991 - (AGL) First tryout
  20.   .. ... .... - Internal development
  21.   11 Jan 1993 - HydraCom version 1.00, Hydra revision 001 (01 Dec 1992)
  22.  
  23.  
  24.   For complete details of the Hydra and HydraCom licensing restrictions,
  25.   please refer to the license agreements which are published in their entirety
  26.   in HYDRACOM.C and LICENSE.DOC, and also contained in the documentation file
  27.   HYDRACOM.DOC
  28.  
  29.   Use of this file is subject to the restrictions contained in the Hydra and
  30.   HydraCom licensing agreements. If you do not find the text of this agreement
  31.   in any of the aforementioned files, or if you do not have these files, you
  32.   should immediately contact LENTZ SOFTWARE-DEVELOPMENT and/or Joaquim
  33.   Homrighausen at one of the addresses listed below. In no event should you
  34.   proceed to use this file without having accepted the terms of the Hydra and
  35.   HydraCom licensing agreements, or such other agreement as you are able to
  36.   reach with LENTZ SOFTWARE-DEVELOMENT and Joaquim Homrighausen.
  37.  
  38.  
  39.   Hydra protocol design and HydraCom driver:         Hydra protocol design:
  40.   Arjen G. Lentz                                     Joaquim H. Homrighausen
  41.   LENTZ SOFTWARE-DEVELOPMENT                         389, route d'Arlon
  42.   Langegracht 7B                                     L-8011 Strassen
  43.   3811 BT  Amersfoort                                Luxembourg
  44.   The Netherlands
  45.   FidoNet 2:283/512, AINEX-BBS +31-33-633916         FidoNet 2:270/17
  46.   arjen_lentz@f512.n283.z2.fidonet.org               joho@ae.lu
  47.  
  48.   Please feel free to contact us at any time to share your comments about our
  49.   software and/or licensing policies.
  50.  
  51. =============================================================================*/
  52.  
  53. #ifndef _ASYNC_H_
  54. #define _ASYNC_H_
  55.  
  56. /* HJW Changes for Topspeed to force C type stackframe. To make the
  57.    program faster we should use the JPI calling conventions, but that
  58.    means a lot of work to change the async.asm file. Maybe later. This
  59.    is as fast as the original
  60. */
  61.  
  62.  
  63. #ifdef _JPI_
  64.   #pragma save
  65.   #pragma call(c_conv => on)
  66. #endif
  67.  
  68. int             AsyncInit( int Port);
  69. void            AsyncStop( void),
  70.                 AsyncDump( void),
  71.                 AsyncPurge( void),
  72.                 AsyncOut( int c),
  73.                 AsyncHand( int handshake),
  74.                 AsyncSet( word Baud, int Control);
  75. int             AsyncIn( void),
  76.                 AsyncInStat( void),
  77.                 AsyncOutStat( void);
  78. unsigned        AsyncStat( void);
  79.                 AsyncCTS( int enable);
  80.                 AsyncFifo( void);
  81.  
  82. /* HJW reset Topspeed to use the JPI calling conventions */
  83.  
  84. #ifdef _JPI_
  85.   #pragma restore
  86. #endif
  87.  
  88. #define COM1            0
  89. #define COM2            1
  90. #define COM3            2
  91. #define COM4            3
  92.  
  93. /* Defines for Com Port Paramaters, the second paramater to AsyncSet() */
  94. #define BITS_8          0x03
  95. #define BITS_7          0x02
  96. #define STOP_1          0x00
  97. #define STOP_2          0x04
  98. #define EVEN_PARITY     0x18
  99. #define ODD_PARITY      0x08
  100. #define NO_PARITY       0x00
  101.  
  102. /* Defines for AsyncHand() */
  103. #define DTR             0x01
  104. #define RTS             0x02
  105. #define USER            0x04
  106. #define LOOPBACK        0x10
  107.  
  108. /* Defines for AsyncStat() */
  109. #define D_CTS   0x0100
  110. #define D_DSR   0x0200
  111. #define D_RI            0x0400
  112. #define D_DCD   0x0800
  113. #define CTS             0x1000
  114. #define DSR             0x2000
  115. #define RI              0x4000
  116. #define DCD             0x8000
  117. #define PARITY  0x0004
  118. #define THREMPTY        0x0020
  119. #define BREAKDET        0x1000
  120.  
  121. #endif
  122.  
  123. /* end of async.h */
  124.