Fixed compile errors on FreeBSD related to cfmakeraw and friends on the
serial port side. Also fixed problems with ioperm on the parallel port side. Added --waittime option to the server to specify how long the server should leave a screen up before changing to the next screen.
This commit is contained in:
@@ -11,6 +11,11 @@
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "lcd.h"
|
||||
#include "wirz-sli.h"
|
||||
#include "drv_base.h"
|
||||
@@ -108,11 +113,26 @@ sli_init (lcd_logical_driver * driver, char *args)
|
||||
}
|
||||
//else fprintf(stderr, "sli_init: opened device %s\n", device);
|
||||
tcgetattr (fd, &portset);
|
||||
// This is necessary in Linux, but does not exist in irix.
|
||||
#ifndef IRIX
|
||||
cfmakeraw (&portset);
|
||||
|
||||
// We use RAW mode
|
||||
#ifdef HAVE_CFMAKERAW
|
||||
// The easy way
|
||||
cfmakeraw( &portset );
|
||||
#else
|
||||
// The hard way
|
||||
portset.c_iflag &= ~( IGNBRK | BRKINT | PARMRK | ISTRIP
|
||||
| INLCR | IGNCR | ICRNL | IXON );
|
||||
portset.c_oflag &= ~OPOST;
|
||||
portset.c_lflag &= ~( ECHO | ECHONL | ICANON | ISIG | IEXTEN );
|
||||
portset.c_cflag &= ~( CSIZE | PARENB | CRTSCTS );
|
||||
portset.c_cflag |= CS8 | CREAD | CLOCAL ;
|
||||
#endif
|
||||
|
||||
// Set port speed
|
||||
cfsetospeed (&portset, speed);
|
||||
cfsetispeed (&portset, B0);
|
||||
|
||||
// Do it...
|
||||
tcsetattr (fd, TCSANOW, &portset);
|
||||
|
||||
/* Initialize SLI using autobaud detection, and then turn off cursor
|
||||
|
||||
Reference in New Issue
Block a user