
/* This is a test program for the serial.h comm routines. */

#include "serial.h"

main()
{
int the_character;
initSerial(1,2400,NO_PARITY,8,1);  /* Open the port.  */
while (1)
  {
  the_character = port_in();
  if (the_character != -1)
    printf("%c",(char)the_character);
  if (kbhit())
    {
    the_character = getch();
    if (the_character == 27)
      break;
    port_out((char)the_character);
    }
  }
deinitSerial(0);                    /* Close the port. */
return(0);
}

