if (setup) {
bzero(&serparams, sizeof(serparams));
-
- serparams.c_cflag=baud | CLOCAL | CS8 | CREAD;
+
+ cfsetspeed(&serparams, baud);
+ serparams.c_cflag |= CLOCAL | CS8 | CREAD;
if (tcflush(filedes, TCIFLUSH)) {
fprintf(stderr,"%s: ",device);
void mainloop(int port1, int port2, int silent, int alpha, long usec_threshold, char *name1, char *name2, char *format)
{
unsigned char c1, c2;
- int last;
int rc;
fd_set rfds;
fd_set efds;
/* need the largest fd for the select call */
biggestfd=port1 > port2 ? port1 : port2;
biggestfd++;
- last=0;
while (!quit) {
/* reset the select set */