From 1fab7e9d477aa98e489400c25a08358952c69c90 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 12 Feb 2012 14:51:03 -0800 Subject: usrp1: big endian compile fix, conversion should cast to unsigned The htonx only takes unsigned integers, cast the int16 to uint16. --- host/lib/convert/gen_convert_general.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/lib/convert/gen_convert_general.py b/host/lib/convert/gen_convert_general.py index b8d64aa4b..46a0c8185 100644 --- a/host/lib/convert/gen_convert_general.py +++ b/host/lib/convert/gen_convert_general.py @@ -103,8 +103,8 @@ DECLARE_CONVERTER($(cpu_type), $(width), sc16_item16_usrp1, 1, PRIORITY_GENERAL) for (size_t i = 0, j = 0; i < nsamps; i++){ #for $w in range($width) - output[j++] = $(to_wire)(boost::int16_t(input$(w)[i].real()$(do_scale))); - output[j++] = $(to_wire)(boost::int16_t(input$(w)[i].imag()$(do_scale))); + output[j++] = $(to_wire)(boost::uint16_t(boost::int16_t(input$(w)[i].real()$(do_scale)))); + output[j++] = $(to_wire)(boost::uint16_t(boost::int16_t(input$(w)[i].imag()$(do_scale)))); #end for } } -- cgit v1.2.3