aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2013-07-15 15:57:53 -0700
committerJosh Blum <josh@joshknows.com>2013-07-15 15:57:53 -0700
commit719569ffbbf03ec62e14cb8527b254d77bfdfc43 (patch)
tree9b62f16c6d293d81e3bc0214d29e9aee6d0bcf0b /host/include
parentb1397e1f48d5966238a409ceb44798dc6c22e80b (diff)
downloaduhd-719569ffbbf03ec62e14cb8527b254d77bfdfc43.tar.gz
uhd-719569ffbbf03ec62e14cb8527b254d77bfdfc43.tar.bz2
uhd-719569ffbbf03ec62e14cb8527b254d77bfdfc43.zip
usb: added timeout param and additional queries
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/transport/usb_control.hpp6
-rw-r--r--host/include/uhd/transport/usb_device_handle.hpp18
2 files changed, 19 insertions, 5 deletions
diff --git a/host/include/uhd/transport/usb_control.hpp b/host/include/uhd/transport/usb_control.hpp
index 2af4b3bbe..92b10f339 100644
--- a/host/include/uhd/transport/usb_control.hpp
+++ b/host/include/uhd/transport/usb_control.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010-2013 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
@@ -51,6 +51,7 @@ public:
* \param index 2-byte (wIndex)
* \param buff buffer to hold send or receive data
* \param length 2-byte (wLength)
+ * \param timeout 4-byte (timeout, default is infinite wait)
* \return number of bytes submitted or error code
*/
virtual ssize_t submit(boost::uint8_t request_type,
@@ -58,7 +59,8 @@ public:
boost::uint16_t value,
boost::uint16_t index,
unsigned char *buff,
- boost::uint16_t length) = 0;
+ boost::uint16_t length,
+ boost::int32_t timeout = 0) = 0;
};
}} //namespace
diff --git a/host/include/uhd/transport/usb_device_handle.hpp b/host/include/uhd/transport/usb_device_handle.hpp
index 6f8d868be..2951d7fbb 100644
--- a/host/include/uhd/transport/usb_device_handle.hpp
+++ b/host/include/uhd/transport/usb_device_handle.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010-2013 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
@@ -43,12 +43,24 @@ public:
typedef boost::shared_ptr<usb_device_handle> sptr;
/*!
- * Return the device's serial number
+ * Return the device's serial number
* \return a string describing the device's serial number
*/
virtual std::string get_serial() const = 0;
/*!
+ * Return the device's manufacturer identification string
+ * \return a string describing the device's manufacturer string
+ */
+ virtual std::string get_manufacturer() const = 0;
+
+ /*!
+ * Return the device's product identification string
+ * \return a string describing the device's product string
+ */
+ virtual std::string get_product() const = 0;
+
+ /*!
* Return the device's Vendor ID (usually assigned by the USB-IF)
* \return a Vendor ID
*/
@@ -61,7 +73,7 @@ public:
virtual boost::uint16_t get_product_id() const = 0;
/*!
- * Return a vector of USB devices on this host
+ * Return a vector of USB devices on this host
* \return a vector of USB device handles that match vid and pid
*/
static std::vector<usb_device_handle::sptr> get_device_list(boost::uint16_t vid, boost::uint16_t pid);