From 9a3ba185a12fe1ff57391fe0a180ee658fa95775 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 28 Sep 2011 23:21:44 +0100 Subject: e100: gps talking -> termios magic foo --- host/lib/usrp/e100/e100_ctrl.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/host/lib/usrp/e100/e100_ctrl.cpp b/host/lib/usrp/e100/e100_ctrl.cpp index 18eefb023..eb529c9c1 100644 --- a/host/lib/usrp/e100/e100_ctrl.cpp +++ b/host/lib/usrp/e100/e100_ctrl.cpp @@ -192,16 +192,14 @@ public: termios tio; std::memset(&tio,0,sizeof(tio)); tio.c_iflag = IGNCR; //Ignore CR - tio.c_oflag = ONLCR; //Map NL to CR-NL on output - tio.c_cflag=CS8|CREAD|CLOCAL; // 8n1, see termios.h for more information - tio.c_lflag=0; - tio.c_cc[VMIN]=1; - tio.c_cc[VTIME]=5; + tio.c_oflag = OPOST | ONLCR; //Map NL to CR-NL on output + tio.c_cflag = CS8 | CREAD | CLOCAL; // 8n1 + tio.c_lflag = 0; - cfsetospeed(&tio,B115200); // 115200 baud - cfsetispeed(&tio,B115200); // 115200 baud + cfsetospeed(&tio, B115200); // 115200 baud + cfsetispeed(&tio, B115200); // 115200 baud - tcsetattr(_node_fd,TCSANOW,&tio); + tcsetattr(_node_fd, TCSANOW, &tio); } void write_uart(const std::string &buf){ @@ -226,7 +224,7 @@ public: } //didnt get a character, check the timeout - if (boost::get_system_time() > exit_time){ + else if (boost::get_system_time() > exit_time){ break; } -- cgit v1.2.3