aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-15 12:40:37 -0700
committerJosh Blum <josh@joshknows.com>2010-08-15 12:40:37 -0700
commit2e978d8835b8f954b7c34c42138b64d3a5767f81 (patch)
tree22a6c6c94afa59697249fbc641cf398fe6c0b110 /host/lib/transport
parenta8a4d6c0c81cdb7d7577b9e696a18580717d0324 (diff)
downloaduhd-2e978d8835b8f954b7c34c42138b64d3a5767f81.tar.gz
uhd-2e978d8835b8f954b7c34c42138b64d3a5767f81.tar.bz2
uhd-2e978d8835b8f954b7c34c42138b64d3a5767f81.zip
usrp1: compiling off next branch
made usb checking changes implemented named_prop_t::extract change copied the remainder of the codec pga gain control
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/CMakeLists.txt1
-rw-r--r--host/lib/transport/libusb1_control.cpp14
2 files changed, 8 insertions, 7 deletions
diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt
index d6e1ff7ba..627d2d806 100644
--- a/host/lib/transport/CMakeLists.txt
+++ b/host/lib/transport/CMakeLists.txt
@@ -30,6 +30,7 @@ IF(LIBUSB_FOUND)
${CMAKE_SOURCE_DIR}/lib/transport/libusb1_control.cpp
${CMAKE_SOURCE_DIR}/lib/transport/libusb1_zero_copy.cpp
)
+ SET(HAVE_USB_SUPPORT TRUE)
ENDIF(LIBUSB_FOUND)
########################################################################
diff --git a/host/lib/transport/libusb1_control.cpp b/host/lib/transport/libusb1_control.cpp
index 2903d943d..c2f7060e8 100644
--- a/host/lib/transport/libusb1_control.cpp
+++ b/host/lib/transport/libusb1_control.cpp
@@ -16,10 +16,10 @@
//
#include <uhd/types/usb_descriptor.hpp>
-#include <uhd/utils/exception.hpp>
#include <uhd/transport/usb_control.hpp>
#include <libusb-1.0/libusb.h>
#include <boost/asio.hpp>
+#include <stdexcept>
#include <iostream>
using namespace uhd::transport;
@@ -61,15 +61,15 @@ libusb_control_impl::libusb_control_impl(uhd::usb_descriptor_t descriptor)
: _descriptor(descriptor), _ctx(NULL), _dev_handle(NULL)
{
if (libusb_init(&_ctx) < 0)
- UHD_THROW_SITE_INFO("USB: failed to initialize libusb");
+ throw std::runtime_error("USB: failed to initialize libusb");
libusb_set_debug(_ctx, libusb_debug_level);
if (!open_device())
- UHD_THROW_SITE_INFO("USB: failed to open device");
+ throw std::runtime_error("USB: failed to open device");
if (!open_interface())
- UHD_THROW_SITE_INFO("USB: failed to open device interface");
+ throw std::runtime_error("USB: failed to open device interface");
}
@@ -85,7 +85,7 @@ uhd::usb_descriptor_t libusb_control_impl::create_descriptor(libusb_device *dev)
libusb_device_descriptor desc;
if (libusb_get_device_descriptor(dev, &desc) < 0)
- UHD_THROW_SITE_INFO("USB: failed to get device descriptor");
+ throw std::runtime_error("USB: failed to get device descriptor");
uhd::usb_descriptor_t descriptor;
@@ -217,12 +217,12 @@ uhd::usb_descriptors_t usb_control::get_device_list()
uhd::usb_descriptors_t descriptors;
if (libusb_init(NULL) < 0)
- UHD_THROW_SITE_INFO("USB: failed to initialize libusb");
+ throw std::runtime_error("USB: failed to initialize libusb");
ssize_t cnt = libusb_get_device_list(NULL, &list);
if (cnt < 0)
- UHD_THROW_SITE_INFO("USB: failed to get device list");
+ throw std::runtime_error("USB: failed to get device list");
ssize_t i = 0;
for (i = 0; i < cnt; i++) {