home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / lsdoor09.zip / FOS.H < prev    next >
C/C++ Source or Header  |  1996-03-23  |  1KB  |  51 lines

  1. #ifndef __FOSSIL_HEADER_FILE__
  2. #define __FOSSIL_HEADER_FILE__
  3.  
  4. #include "Comm.h"
  5. #include "Util.h"
  6.  
  7. global ASYNC Com;
  8.  
  9.  
  10. int init_comm( int comport, long baud, int irq, int base, short inbuffr,
  11.   short outbuffr, int fifo, int mode, int flow );
  12.      // Mode = (0) AutoDetect (1) Fossil (2) Internal
  13.      // Fifo = (0) AutoDetect (1) 16550 (2) 8250
  14.      // Flow = (0) None (1) Cts/Rts (2) Xon/Xoff (3) Both
  15.  
  16. short put_serial( unsigned char wr );
  17. int  get_serial( void );
  18. inline int  in_ready( void ){ return async_rxcnt( &Com ); }
  19.  
  20. inline char carrier( void ){ return async_carrier( &Com ); }
  21. void set_dtr( int dtr );
  22. void set_baud( unsigned long newbaud );
  23. void set_flow( int flowmode );  // = (0) None (1) CTS/RTS (2) XON/XOFF
  24.                 //   (3) CTS/RTS and XON/XOFF
  25.  
  26. void purge_in( void );
  27.  
  28. void close_fossil( void );
  29.  
  30. void disable_port( void );   // Temporarily disables port (for spawning)
  31. void enable_port( void );    // Re-enables a port after disable_port().
  32.  
  33. void scramble_exit( void );  // Call exit() leaving DTR high...
  34.  
  35. void reset_port( void );
  36.  
  37. inline char okey_hangup(){   // Returns 1 when all transmit buffers are clear
  38. //  return (async_txfree(&Com) && !async_txcnt(&Com));
  39.   return !async_txcnt(&Com);
  40. }
  41.  
  42. global int foss_active;  // READ Only variable, set by init_comm()
  43.              // (0) Internal Comm and (1) Fossil
  44.  
  45.  
  46. #endif
  47.  
  48.  
  49.  
  50.  
  51.