aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/e100/e100_ctrl.cpp13
-rw-r--r--host/lib/usrp/e100/e100_impl.hpp2
2 files changed, 5 insertions, 10 deletions
diff --git a/host/lib/usrp/e100/e100_ctrl.cpp b/host/lib/usrp/e100/e100_ctrl.cpp
index 028e734e3..18eefb023 100644
--- a/host/lib/usrp/e100/e100_ctrl.cpp
+++ b/host/lib/usrp/e100/e100_ctrl.cpp
@@ -191,8 +191,8 @@ public:
//init the tty settings w/ termios
termios tio;
std::memset(&tio,0,sizeof(tio));
- tio.c_iflag=0;
- tio.c_oflag=0;
+ 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;
@@ -205,13 +205,8 @@ public:
}
void write_uart(const std::string &buf){
- std::string out_str;
- BOOST_FOREACH(const char &ch, buf){
- if (ch == '\n') out_str += "\r\n";
- else out_str += std::string(1, ch);
- }
- const ssize_t ret = ::write(_node_fd, out_str.c_str(), out_str.size());
- if (size_t(ret) != out_str.size()) UHD_LOG << ret;
+ const ssize_t ret = ::write(_node_fd, buf.c_str(), buf.size());
+ if (size_t(ret) != buf.size()) UHD_LOG << ret;
}
std::string read_uart(double timeout){
diff --git a/host/lib/usrp/e100/e100_impl.hpp b/host/lib/usrp/e100/e100_impl.hpp
index 536eba040..4b2ec5ee0 100644
--- a/host/lib/usrp/e100/e100_impl.hpp
+++ b/host/lib/usrp/e100/e100_impl.hpp
@@ -48,7 +48,7 @@ uhd::transport::zero_copy_if::sptr e100_make_mmap_zero_copy(e100_ctrl::sptr ifac
static const double E100_RX_LINK_RATE_BPS = 166e6/3/2*2;
static const double E100_TX_LINK_RATE_BPS = 166e6/3/1*2;
static const std::string E100_I2C_DEV_NODE = "/dev/i2c-3";
-static const std::string E100_UART_DEV_NODE = "/dev/ttyO1";
+static const std::string E100_UART_DEV_NODE = "/dev/ttyO0";
static const boost::uint16_t E100_FPGA_COMPAT_NUM = 0x06;
static const boost::uint32_t E100_RX_SID_BASE = 2;
static const boost::uint32_t E100_TX_ASYNC_SID = 1;