aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-08-31 16:45:49 -0700
committerNick Foster <nick@nerdnetworks.org>2010-08-31 16:45:49 -0700
commit0616872e35ac6429c19c2495bf4e378551bdd60e (patch)
tree6116f992f4f6d1f8d701aca6bf1526a85d8bda89 /host/include
parentb96088b692a5c44974919ee36e253b6ea8c51972 (diff)
parent9a3217cbbeb39d677a439fe0982a7ac4d7f251c2 (diff)
downloaduhd-0616872e35ac6429c19c2495bf4e378551bdd60e.tar.gz
uhd-0616872e35ac6429c19c2495bf4e378551bdd60e.tar.bz2
uhd-0616872e35ac6429c19c2495bf4e378551bdd60e.zip
Merge branch 'usrp1' of ettus.sourcerepo.com:ettus/uhdpriv into usrp1
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/transport/CMakeLists.txt1
-rw-r--r--host/include/uhd/transport/convert_types.hpp37
-rw-r--r--host/include/uhd/transport/convert_types.ipp43
-rw-r--r--host/include/uhd/usrp/subdev_spec.hpp9
4 files changed, 81 insertions, 9 deletions
diff --git a/host/include/uhd/transport/CMakeLists.txt b/host/include/uhd/transport/CMakeLists.txt
index 0f1cbf2a2..2c84c0724 100644
--- a/host/include/uhd/transport/CMakeLists.txt
+++ b/host/include/uhd/transport/CMakeLists.txt
@@ -22,6 +22,7 @@ INSTALL(FILES
bounded_buffer.hpp
bounded_buffer.ipp
convert_types.hpp
+ convert_types.ipp
if_addrs.hpp
udp_simple.hpp
udp_zero_copy.hpp
diff --git a/host/include/uhd/transport/convert_types.hpp b/host/include/uhd/transport/convert_types.hpp
index a4d999240..dc7fa6c1a 100644
--- a/host/include/uhd/transport/convert_types.hpp
+++ b/host/include/uhd/transport/convert_types.hpp
@@ -21,6 +21,7 @@
#include <uhd/config.hpp>
#include <uhd/types/io_type.hpp>
#include <uhd/types/otw_type.hpp>
+#include <vector>
namespace uhd{ namespace transport{
@@ -40,6 +41,23 @@ UHD_API void convert_io_type_to_otw_type(
);
/*!
+ * Convert IO samples to OWT samples + interleave.
+ *
+ * \param io_buffs buffers containing samples
+ * \param io_type the type of these samples
+ * \param otw_buff memory to write converted samples
+ * \param otw_type the type of these samples
+ * \param nsamps_per_io_buff samples per io_buff
+ */
+UHD_API void convert_io_type_to_otw_type(
+ const std::vector<const void *> &io_buffs,
+ const io_type_t &io_type,
+ void *otw_buff,
+ const otw_type_t &otw_type,
+ size_t nsamps_per_io_buff
+);
+
+/*!
* Convert OTW samples to IO samples.
*
* \param otw_buff memory containing samples
@@ -54,6 +72,25 @@ UHD_API void convert_otw_type_to_io_type(
size_t num_samps
);
+/*!
+ * Convert OTW samples to IO samples + de-interleave.
+ *
+ * \param otw_buff memory containing samples
+ * \param otw_type the type of these samples
+ * \param io_buffs buffers to write converted samples
+ * \param io_type the type of these samples
+ * \param nsamps_per_io_buff samples per io_buff
+ */
+UHD_API void convert_otw_type_to_io_type(
+ const void *otw_buff,
+ const otw_type_t &otw_type,
+ std::vector<void *> &io_buffs,
+ const io_type_t &io_type,
+ size_t nsamps_per_io_buff
+);
+
}} //namespace
+#include <uhd/transport/convert_types.ipp>
+
#endif /* INCLUDED_UHD_TRANSPORT_CONVERT_TYPES_HPP */
diff --git a/host/include/uhd/transport/convert_types.ipp b/host/include/uhd/transport/convert_types.ipp
new file mode 100644
index 000000000..914ca6f17
--- /dev/null
+++ b/host/include/uhd/transport/convert_types.ipp
@@ -0,0 +1,43 @@
+//
+// Copyright 2010 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
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
+#ifndef INCLUDED_UHD_TRANSPORT_CONVERT_TYPES_IPP
+#define INCLUDED_UHD_TRANSPORT_CONVERT_TYPES_IPP
+
+UHD_INLINE void uhd::transport::convert_io_type_to_otw_type(
+ const void *io_buff, const io_type_t &io_type,
+ void *otw_buff, const otw_type_t &otw_type,
+ size_t num_samps
+){
+ std::vector<const void *> buffs(1, io_buff);
+ return uhd::transport::convert_io_type_to_otw_type(
+ buffs, io_type, otw_buff, otw_type, num_samps
+ );
+}
+
+UHD_INLINE void uhd::transport::convert_otw_type_to_io_type(
+ const void *otw_buff, const otw_type_t &otw_type,
+ void *io_buff, const io_type_t &io_type,
+ size_t num_samps
+){
+ std::vector<void *> buffs(1, io_buff);
+ return uhd::transport::convert_otw_type_to_io_type(
+ otw_buff, otw_type, buffs, io_type, num_samps
+ );
+}
+
+#endif /* INCLUDED_UHD_TRANSPORT_CONVERT_TYPES_IPP */
diff --git a/host/include/uhd/usrp/subdev_spec.hpp b/host/include/uhd/usrp/subdev_spec.hpp
index 56aa0df20..2f32509b9 100644
--- a/host/include/uhd/usrp/subdev_spec.hpp
+++ b/host/include/uhd/usrp/subdev_spec.hpp
@@ -56,17 +56,8 @@ namespace uhd{ namespace usrp{
*
* The subdevice specification can be represented as a markup-string.
* The markup-string is a whitespace separated list of dboard:subdev pairs.
- * The "dboard:" part is optional on boards with only one daughterboard slot.
* The first pair represents the subdevice for channel zero,
* the second pair represents the subdevice for channel one, and so on.
- *
- * Examples:
- * - Use subdevice AB on daughterboard A (USRP1): "A:AB"
- * - Use subdevice A on daughterboard A for channel zero and subdevice A on daughterboard B for channel one (USRP1): "A:A B:A"
- * - Use subdevice AB (USRP2): "AB" or ":AB"
- *
- * An empty subdevice specification can be used to automatically
- * select the first subdevice on the first present daughterboard.
*/
class UHD_API subdev_spec_t : public std::vector<subdev_spec_pair_t>{
public: