From 7a3ba3b44cff7f7c404096238b9a24224e7d1a22 Mon Sep 17 00:00:00 2001 From: phyto Date: Wed, 15 May 2019 10:10:26 +0200 Subject: [PATCH] was cfmakeraw the good fix ? --- serial/serial.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/serial/serial.c b/serial/serial.c index f33a29f..edf44c3 100644 --- a/serial/serial.c +++ b/serial/serial.c @@ -95,12 +95,14 @@ memset(&options, 0, sizeof(options)); tcgetattr(uart0, &options); options.c_cflag = baudbits | CS8 | CLOCAL | CREAD; options.c_iflag = IGNPAR; -options.c_oflag = 0; +options.c_oflag = IGNPAR; options.c_lflag = 0; +cfmakeraw(&options); /* XXX */ + options.c_cc[VMIN] = 1; /* ask for blocking read */ -tcflush(uart0, TCIFLUSH); +tcflush(uart0, TCIOFLUSH); tcsetattr(uart0, TCSANOW, &options); tcflush(uart0, TCIFLUSH); /* do it again, sam */