home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / ASYNLIB2.ZIP / ASYNC.H < prev    next >
C/C++ Source or Header  |  1980-03-19  |  1KB  |  49 lines

  1. #ifndef    _ASYNC_H_
  2. #define    _ASYNC_H_
  3.  
  4. int        AsyncInit( int Port);
  5. void        AsyncStop( void),
  6.         AsyncClear( void),
  7.         AsyncOut( int c),
  8.         AsyncHand( int handshake),
  9.         AsyncSet( int Baud, int Control);
  10. int        AsyncIn( void),
  11.         AsyncInStat( void),
  12.         AsyncOutStat( void);
  13. unsigned    AsyncStat( void);
  14.  
  15. #define    COM1        0
  16. #define    COM2        1
  17. #define    COM3        2
  18. #define    COM4        3
  19.  
  20. /* Defines for Com Port Paramaters, the second paramater to AsyncSet() */
  21. #define BITS_8          0x03
  22. #define BITS_7          0x02
  23. #define STOP_1          0x00
  24. #define STOP_2          0x04
  25. #define EVEN_PARITY     0x18
  26. #define ODD_PARITY      0x08
  27. #define NO_PARITY       0x00
  28.  
  29. /* Defines for AsyncHand() */
  30. #define    DTR        0x01
  31. #define    RTS        0x02
  32. #define    USER        0x04
  33. #define    LOOPBACK    0x10
  34.  
  35. /* Defines for AsyncStat() */
  36. #define    D_CTS    0x0100
  37. #define    D_DSR    0x0200
  38. #define    D_RI        0x0400
  39. #define    D_DCD    0x0800
  40. #define    CTS        0x1000
  41. #define    DSR        0x2000
  42. #define    RI        0x4000
  43. #define    DCD        0x8000
  44. #define    PARITY    0x0004
  45. #define    THREMPTY    0x0020
  46. #define    BREAKDET    0x1000
  47.  
  48. #endif
  49.