EOW
This commit is contained in:
@@ -68,8 +68,6 @@ if (uart0 < 0)
|
||||
perror("unable to open uart ");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return uart0; /* WTF ??? */
|
||||
|
||||
// CONFIGURE THE UART
|
||||
// The flags defined in /usr/include/termios.h -
|
||||
@@ -92,10 +90,10 @@ baudbits = baudrate2const(baudrate);
|
||||
fprintf(stderr, "%d -> 0x%04x\n", baudrate, baudbits);
|
||||
#endif
|
||||
|
||||
memset(&options, 0, sizeof(options));
|
||||
memset(&options, 0, sizeof(options));
|
||||
|
||||
tcgetattr(uart0, &options);
|
||||
options.c_cflag = baudbits | CS8 | CLOCAL | CREAD; //<Set baud rate
|
||||
options.c_cflag = baudbits | CS8 | CLOCAL | CREAD;
|
||||
options.c_iflag = IGNPAR;
|
||||
options.c_oflag = 0;
|
||||
options.c_lflag = 0;
|
||||
|
||||
Reference in New Issue
Block a user