diff options
author | Josh Blum <josh@joshknows.com> | 2011-06-14 17:25:22 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-06-14 17:56:54 -0700 |
commit | 5dfc458188538a32f95c05f860587d2c542e14c1 (patch) | |
tree | 6f581982cba117af423b830a2199f300fe846d0d /host/include | |
parent | deae10bc1c85726ed7c206abca37a869c6f77cea (diff) | |
download | uhd-5dfc458188538a32f95c05f860587d2c542e14c1.tar.gz uhd-5dfc458188538a32f95c05f860587d2c542e14c1.tar.bz2 uhd-5dfc458188538a32f95c05f860587d2c542e14c1.zip |
b100: added b100 host (squashed)
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/transport/usb_zero_copy.hpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/host/include/uhd/transport/usb_zero_copy.hpp b/host/include/uhd/transport/usb_zero_copy.hpp index b39171fba..dc344ad8b 100644 --- a/host/include/uhd/transport/usb_zero_copy.hpp +++ b/host/include/uhd/transport/usb_zero_copy.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 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 @@ -49,6 +49,7 @@ public: * \param recv_endpoint an integer specifiying an IN endpoint number * \param send_endpoint an integer specifiying an OUT endpoint number * \param hints optional parameters to pass to the underlying transport + * \return a new zero copy usb object */ static sptr make( usb_device_handle::sptr handle, @@ -56,6 +57,24 @@ public: size_t send_endpoint, const device_addr_t &hints = device_addr_t() ); + + /*! + * Make a wrapper around a zero copy implementation. + * The wrapper performs the following functions: + * - Pad commits to the frame boundary + * - Extract multiple packets on recv + * + * When enable multiple receive packets is set to true, + * the implementation inspects the vita length on transfers, + * and may split a single transfer into multiple managed buffers. + * + * \param usb_zc a usb zero copy interface object + * \param usb_frame_boundary bytes per frame + * \return a new zero copy wrapper object + */ + static sptr make_wrapper( + sptr usb_zc, size_t usb_frame_boundary = 512 + ); }; }} //namespace |