summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-09-28 23:21:44 +0100
committerJosh Blum <josh@joshknows.com>2011-09-28 23:21:44 +0100
commit9a3ba185a12fe1ff57391fe0a180ee658fa95775 (patch)
tree9d1850650cd74dea4062ac100e2f7de5ab4a4e03 /host/lib/usrp
parent1e6136ad70acc33122d4498b86cb8fc39cc2dcb9 (diff)
downloaduhd-9a3ba185a12fe1ff57391fe0a180ee658fa95775.tar.gz
uhd-9a3ba185a12fe1ff57391fe0a180ee658fa95775.tar.bz2
uhd-9a3ba185a12fe1ff57391fe0a180ee658fa95775.zip
e100: gps talking -> termios magic foo
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/e100/e100_ctrl.cpp16
1 files 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;
}