was cfmakeraw the good fix ?

This commit is contained in:
phyto 2019-05-15 10:10:26 +02:00
parent aedaf6c6bb
commit 7a3ba3b44c

View File

@ -95,12 +95,14 @@ memset(&options, 0, sizeof(options));
tcgetattr(uart0, &options); tcgetattr(uart0, &options);
options.c_cflag = baudbits | CS8 | CLOCAL | CREAD; options.c_cflag = baudbits | CS8 | CLOCAL | CREAD;
options.c_iflag = IGNPAR; options.c_iflag = IGNPAR;
options.c_oflag = 0; options.c_oflag = IGNPAR;
options.c_lflag = 0; options.c_lflag = 0;
cfmakeraw(&options); /* XXX */
options.c_cc[VMIN] = 1; /* ask for blocking read */ options.c_cc[VMIN] = 1; /* ask for blocking read */
tcflush(uart0, TCIFLUSH); tcflush(uart0, TCIOFLUSH);
tcsetattr(uart0, TCSANOW, &options); tcsetattr(uart0, TCSANOW, &options);
tcflush(uart0, TCIFLUSH); /* do it again, sam */ tcflush(uart0, TCIFLUSH); /* do it again, sam */