summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-08-04 14:22:37 -0400
committerJosh Blum <josh@joshknows.com>2012-08-04 14:22:37 -0400
commit3f69288e820c91f10927a00d7c7d66dd488492a7 (patch)
treec37425138f19b97bbba57f42bd6f56c786730b35 /host/lib
parent1435a43ff10020746b4ad1c3a8d21058ef36aa31 (diff)
parentd18fc6f0f1fe934cd8684171d966561a36fb134c (diff)
downloaduhd-3f69288e820c91f10927a00d7c7d66dd488492a7.tar.gz
uhd-3f69288e820c91f10927a00d7c7d66dd488492a7.tar.bz2
uhd-3f69288e820c91f10927a00d7c7d66dd488492a7.zip
Merge branch 'master' into next
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/transport/libusb1_zero_copy.cpp19
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp2
2 files changed, 19 insertions, 2 deletions
diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp
index c13384eec..28bff9709 100644
--- a/host/lib/transport/libusb1_zero_copy.cpp
+++ b/host/lib/transport/libusb1_zero_copy.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011 Ettus Research LLC
+// Copyright 2010-2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -177,6 +177,23 @@ public:
_handle->claim_interface(recv_interface);
_handle->claim_interface(send_interface);
+ //flush the buffers out of the recv endpoint
+ //limit the flushing to at most one second
+ for (size_t i = 0; i < 100; i++)
+ {
+ unsigned char buff[512];
+ int transfered = 0;
+ const int status = libusb_bulk_transfer(
+ _handle->get(), // dev_handle
+ (recv_endpoint & 0x7f) | 0x80, // endpoint
+ static_cast<unsigned char *>(buff),
+ sizeof(buff),
+ &transfered, //bytes xfered
+ 10 //timeout ms
+ );
+ if (status == LIBUSB_ERROR_TIMEOUT) break;
+ }
+
//allocate libusb transfer structs and managed receive buffers
for (size_t i = 0; i < get_num_recv_frames(); i++){
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index da894fc9b..348195a6e 100644
--- a/host/lib/usrp/dboard/db_xcvr2450.cpp
+++ b/host/lib/usrp/dboard/db_xcvr2450.cpp
@@ -29,7 +29,7 @@
#define HB_PA_TXIO LB_PA_OFF_TXIO
#define LB_PA_TXIO HB_PA_OFF_TXIO
#define TX_ENB_TXIO TX_EN_TXIO
-#define TX_DIS_TXIO 0
+#define TX_DIS_TXIO (HB_PA_OFF_TXIO | LB_PA_OFF_TXIO)
#define AD9515DIV_3_TXIO AD9515DIV_TXIO
#define AD9515DIV_2_TXIO 0