summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/transport/usb_control.hpp4
-rw-r--r--host/include/uhd/transport/usb_device_handle.hpp6
-rw-r--r--host/include/uhd/transport/usb_zero_copy.hpp24
-rw-r--r--host/include/uhd/transport/zero_copy.hpp11
-rw-r--r--host/include/uhd/usrp/dboard_iface.hpp9
5 files changed, 34 insertions, 20 deletions
diff --git a/host/include/uhd/transport/usb_control.hpp b/host/include/uhd/transport/usb_control.hpp
index 6137ecf84..f9829c3ec 100644
--- a/host/include/uhd/transport/usb_control.hpp
+++ b/host/include/uhd/transport/usb_control.hpp
@@ -50,9 +50,9 @@ public:
* \param index 2-byte (wIndex)
* \param buff buffer to hold send or receive data
* \param length 2-byte (wLength)
- * \return number of bytes submitted
+ * \return number of bytes submitted or error code
*/
- virtual size_t submit(boost::uint8_t request_type,
+ virtual ssize_t submit(boost::uint8_t request_type,
boost::uint8_t request,
boost::uint16_t value,
boost::uint16_t index,
diff --git a/host/include/uhd/transport/usb_device_handle.hpp b/host/include/uhd/transport/usb_device_handle.hpp
index 735a3acbe..9bb7db9c4 100644
--- a/host/include/uhd/transport/usb_device_handle.hpp
+++ b/host/include/uhd/transport/usb_device_handle.hpp
@@ -61,12 +61,6 @@ public:
virtual boost::uint16_t get_product_id() const = 0;
/*!
- * Return the device's USB address
- * \return a Product ID
- */
- virtual boost::uint16_t get_device_addr() const = 0;
-
- /*!
* Return a vector of USB devices on this host
* \return a vector of USB device handles that match vid and pid
*/
diff --git a/host/include/uhd/transport/usb_zero_copy.hpp b/host/include/uhd/transport/usb_zero_copy.hpp
index 75232c22a..61bf380ba 100644
--- a/host/include/uhd/transport/usb_zero_copy.hpp
+++ b/host/include/uhd/transport/usb_zero_copy.hpp
@@ -45,16 +45,22 @@ public:
* The underlying implementation may be platform specific.
*
* \param handle a device handle that uniquely identifying the device
- * \param rx_endpoint an integer specifiying an IN endpoint number
- * \param tx_endpoint an integer specifiying an OUT endpoint number
- * \param buff_size total number of bytes of buffer space to allocate
- * \param block_size number of bytes allocated for each I/O transaction
+ * \param recv_endpoint an integer specifiying an IN endpoint number
+ * \param send_endpoint an integer specifiying an OUT endpoint number
+ * \param recv_xfer_size the number of bytes for each receive transfer
+ * \param recv_num_xfers the number of simultaneous receive transfers
+ * \param send_xfer_size the number of bytes for each send transfer
+ * \param send_num_xfers the number of simultaneous send transfers
*/
- static sptr make(usb_device_handle::sptr handle,
- unsigned int rx_endpoint,
- unsigned int tx_endpoint,
- size_t buff_size = 0,
- size_t block_size = 0);
+ static sptr make(
+ usb_device_handle::sptr handle,
+ unsigned int recv_endpoint,
+ unsigned int send_endpoint,
+ size_t recv_xfer_size = 0,
+ size_t recv_num_xfers = 0,
+ size_t send_xfer_size = 0,
+ size_t send_num_xfers = 0
+ );
};
}} //namespace
diff --git a/host/include/uhd/transport/zero_copy.hpp b/host/include/uhd/transport/zero_copy.hpp
index 513291b63..8ecafd3fb 100644
--- a/host/include/uhd/transport/zero_copy.hpp
+++ b/host/include/uhd/transport/zero_copy.hpp
@@ -122,9 +122,10 @@ namespace uhd{ namespace transport{
/*!
* Get a new receive buffer from this transport object.
+ * \param timeout_ms the timeout to get the buffer in ms
* \return a managed buffer, or null sptr on timeout/error
*/
- virtual managed_recv_buffer::sptr get_recv_buff(void) = 0;
+ virtual managed_recv_buffer::sptr get_recv_buff(size_t timeout_ms) = 0;
/*!
* Get the maximum number of receive frames:
@@ -171,16 +172,19 @@ namespace uhd{ namespace transport{
/*!
* Get a new receive buffer from this transport object.
+ * \param timeout_ms the timeout to get the buffer in ms
+ * \return a managed buffer, or null sptr on timeout/error
*/
- managed_recv_buffer::sptr get_recv_buff(void);
+ managed_recv_buffer::sptr get_recv_buff(size_t timeout_ms);
private:
/*!
* Perform a private copying recv.
* \param buff the buffer to write data into
+ * \param timeout_ms the timeout to get the buffer in ms
* \return the number of bytes written to buff, 0 for timeout, negative for error
*/
- virtual ssize_t recv(const boost::asio::mutable_buffer &buff) = 0;
+ virtual ssize_t recv(const boost::asio::mutable_buffer &buff, size_t timeout_ms) = 0;
UHD_PIMPL_DECL(impl) _impl;
};
@@ -204,6 +208,7 @@ namespace uhd{ namespace transport{
/*!
* Get a new send buffer from this transport object.
+ * \return a managed buffer, or null sptr on timeout/error
*/
managed_send_buffer::sptr get_send_buff(void);
diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp
index c7db244f2..c430ecd3f 100644
--- a/host/include/uhd/usrp/dboard_iface.hpp
+++ b/host/include/uhd/usrp/dboard_iface.hpp
@@ -242,6 +242,15 @@ public:
* \param enb true for enabled
*/
virtual void set_clock_enabled(unit_t unit, bool enb) = 0;
+
+ /*!
+ * Get the rate of the codec.
+ * For rx, this is the rate the ADC feeds the DSP.
+ * For tx, this is the rate the DSP feeds the DAC.
+ * \param unit which unit rx or tx
+ * \return the codec rate in Hz
+ */
+ virtual double get_codec_rate(unit_t unit) = 0;
};
}} //namespace