summaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-04 19:29:39 -0800
committerJosh Blum <josh@joshknows.com>2011-01-04 19:29:39 -0800
commit466bb0a7c25a2a4d252582f812edc83ba6facbfe (patch)
tree9caf30fe76b0d394284f031ea25ba6941c6102f2 /host/lib/transport
parent91790751b614b86393dd7963f1a4476d0e60ed4a (diff)
downloaduhd-466bb0a7c25a2a4d252582f812edc83ba6facbfe.tar.gz
uhd-466bb0a7c25a2a4d252582f812edc83ba6facbfe.tar.bz2
uhd-466bb0a7c25a2a4d252582f812edc83ba6facbfe.zip
uhd: switched the unit test to the new convert API, implemented in vrt pkt handler
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/CMakeLists.txt2
-rw-r--r--host/lib/transport/vrt_packet_handler.hpp12
2 files changed, 8 insertions, 6 deletions
diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt
index 0d6226e4c..a929897dc 100644
--- a/host/lib/transport/CMakeLists.txt
+++ b/host/lib/transport/CMakeLists.txt
@@ -23,7 +23,7 @@
# Setup libusb
########################################################################
MESSAGE(STATUS "")
-FIND_PACKAGE(USB1 REQUIRED)
+FIND_PACKAGE(USB1)
LIBUHD_REGISTER_COMPONENT("USB" ENABLE_USB ON "ENABLE_LIBUHD;LIBUSB_FOUND" OFF)
diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp
index 278bcfeaa..dc29d1ae5 100644
--- a/host/lib/transport/vrt_packet_handler.hpp
+++ b/host/lib/transport/vrt_packet_handler.hpp
@@ -26,7 +26,7 @@
#include <uhd/types/otw_type.hpp>
#include <uhd/types/metadata.hpp>
#include <uhd/transport/vrt_if_packet.hpp>
-#include <uhd/transport/convert_types.hpp>
+#include <uhd/convert.hpp>
#include <uhd/transport/zero_copy.hpp>
#include <boost/function.hpp>
#include <stdexcept>
@@ -198,8 +198,9 @@ template <typename T> UHD_INLINE T get_context_code(
}
//copy-convert the samples from the recv buffer
- uhd::transport::convert_otw_type_to_io_type(
- state.copy_buffs[i], otw_type, io_buffs, io_type, nsamps_to_copy_per_io_buff
+ uhd::convert::input_type otw_buffs(1, state.copy_buffs[i]);
+ uhd::convert::otw_type_to_io_type(
+ io_type, otw_type, otw_buffs, io_buffs, nsamps_to_copy_per_io_buff
);
//update the rx copy buffer to reflect the bytes copied
@@ -337,8 +338,9 @@ template <typename T> UHD_INLINE T get_context_code(
otw_mem += if_packet_info.num_header_words32;
//copy-convert the samples into the send buffer
- uhd::transport::convert_io_type_to_otw_type(
- io_buffs, io_type, otw_mem, otw_type, num_samps
+ uhd::convert::output_type otw_buffs(1, otw_mem);
+ uhd::convert::io_type_to_otw_type(
+ io_type, otw_type, io_buffs, otw_buffs, num_samps
);
//commit the samples to the zero-copy interface