
/*  send_rec.h
    For use with tm.exe Version 4
    Stephen D. Anderson --- October 29, 1995

    Include file for send_rec.c.


    Low level communication function.  On entry waits for any receive
in progress.  Then sends message.  Gets receive reply if any.  Also
gets error byte associated with each received byte.



*/

/*  define speeds.  */
#define NORMAL 0
#define TURBO 1
#define TELECOM 2

/*  change the following line to get different versions.  */
#define SPEED NORMAL

/*  the following times are in seconds.  */
/*  define time to wait for end of receive message before transmit.  */
#if (SPEED == TURBO)
    #define EOM_WAIT 0.0
#elif (SPEED == NORMAL)
    #define EOM_WAIT 0.5
#else
    #define EOM_WAIT 0.5
#endif

/*  define time to wait for next receive character while waiting for
    end of receive message before transmit.  */
#if (SPEED == TURBO)
    #define EOM_CHAR_WAIT 0.0
#elif (SPEED == NORMAL)
    #define EOM_CHAR_WAIT 0.1
#else
    #define EOM_CHAR_WAIT 0.1
#endif

/*  define time to wait for first character when receiving next message.  */
#if (SPEED == TURBO)
    #define START_WAIT 0.1
#elif (SPEED == NORMAL)
    #define START_WAIT 0.25
#else
    #define START_WAIT 0.25
#endif

/*  define time to wait for next character while in receive message.  */
#if (SPEED == TURBO)
    #define IN_MSG_WAIT 0.05
#elif (SPEED == NORMAL)
    #define IN_MSG_WAIT 0.1
#else
    #define IN_MSG_WAIT 0.1
#endif

#define MAX_COUNT 60
#define ERROR_MASK 0x0e /*  parity, over-run, etc. bits in LSR register. */

