Modify serial drivers to use cfmakeraw where applicable. Affects CFontz*,
CwLnx, EyeboxOne, MtxOrb, hd44780-lis, and serialPOS.
This commit is contained in:
@@ -408,9 +408,8 @@ MtxOrb_init (Driver *drvthis)
|
||||
|
||||
tcgetattr(p->fd, &portset);
|
||||
|
||||
// THIS ALL COMMENTED OUT BECAUSE WE NEED TO SET TIMEOUTS
|
||||
/* We use RAW mode */
|
||||
#ifdef HAVE_CFMAKERAW_NOT
|
||||
#ifdef HAVE_CFMAKERAW
|
||||
/* The easy way */
|
||||
cfmakeraw(&portset);
|
||||
#else
|
||||
@@ -421,16 +420,21 @@ MtxOrb_init (Driver *drvthis)
|
||||
portset.c_lflag &= ~( ECHO | ECHONL | ICANON | ISIG | IEXTEN );
|
||||
portset.c_cflag &= ~( CSIZE | PARENB | CRTSCTS );
|
||||
portset.c_cflag |= CS8 | CREAD | CLOCAL;
|
||||
#endif
|
||||
/* Set timeouts */
|
||||
portset.c_cc[VMIN] = 1;
|
||||
portset.c_cc[VTIME] = 3;
|
||||
#endif
|
||||
|
||||
/* Set port speed */
|
||||
cfsetospeed(&portset, speed);
|
||||
cfsetispeed(&portset, B0);
|
||||
|
||||
/* Do it... */
|
||||
tcsetattr(p->fd, TCSANOW, &portset);
|
||||
if (tcsetattr(p->fd, TCSANOW, &portset) == -1) {
|
||||
report(RPT_ERR, "%s: failed to configure port (%s)", drvthis->name, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* Make sure the frame buffer is there... */
|
||||
p->framebuf = (unsigned char *) calloc(p->width * p->height, 1);
|
||||
|
||||
Reference in New Issue
Block a user