aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_iface.cpp
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-08-12 18:15:27 -0700
committerNick Foster <nick@nerdnetworks.org>2010-08-12 18:15:27 -0700
commit3fe2744e7aef9f6989b161be3af63a24392ed18a (patch)
tree72154dc1069c8319ab394427a768cbbbd57209d1 /host/lib/usrp/usrp2/usrp2_iface.cpp
parent6be2b64ce86f4bb9f36bae8758d7de2ddbabe2b1 (diff)
downloaduhd-3fe2744e7aef9f6989b161be3af63a24392ed18a.tar.gz
uhd-3fe2744e7aef9f6989b161be3af63a24392ed18a.tar.bz2
uhd-3fe2744e7aef9f6989b161be3af63a24392ed18a.zip
Host-side fixes for GPS UART.
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_iface.cpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index aa16865c1..04b3b1e74 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -49,7 +49,7 @@ public:
**********************************************************************/
usrp2_iface_impl(udp_simple::sptr ctrl_transport){
_ctrl_transport = ctrl_transport;
-
+/*
//check the fpga compatibility number
const boost::uint32_t fpga_compat_num = this->peek32(this->regs.compat_num_rb);
if (fpga_compat_num != USRP2_FPGA_COMPAT_NUM){
@@ -58,6 +58,7 @@ public:
"The fpga build is not compatible with the host code build."
) % int(USRP2_FPGA_COMPAT_NUM) % fpga_compat_num));
}
+*/
}
~usrp2_iface_impl(void){
@@ -174,7 +175,7 @@ public:
/***********************************************************************
* UART
**********************************************************************/
- void write_uart(boost::uint8_t dev, const byte_vector_t &buf){
+ void write_uart(boost::uint8_t dev, const std::string &buf){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_HEY_WRITE_THIS_UART_FOR_ME_BRO);
@@ -192,7 +193,7 @@ public:
UHD_ASSERT_THROW(ntohl(in_data.id) == USRP2_CTRL_ID_MAN_I_TOTALLY_WROTE_THAT_UART_DUDE);
}
- byte_vector_t read_uart(boost::uint8_t dev, size_t num_bytes){
+ std::string read_uart(boost::uint8_t dev, size_t num_bytes){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_SO_LIKE_CAN_YOU_READ_THIS_UART_BRO);
@@ -205,10 +206,9 @@ public:
//send and recv
usrp2_ctrl_data_t in_data = this->ctrl_send_and_recv(out_data);
UHD_ASSERT_THROW(ntohl(in_data.id) == USRP2_CTRL_ID_I_HELLA_READ_THAT_UART_DUDE);
- //UHD_ASSERT_THROW(in_data.data.uart_args.bytes = num_bytes);
//copy out the data
- byte_vector_t result(num_bytes);
+ std::string result;
std::copy(in_data.data.uart_args.data, in_data.data.uart_args.data + num_bytes, result.begin());
return result;
}