diff options
author | Josh Blum <josh@joshknows.com> | 2012-02-12 14:51:03 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-02-12 14:51:03 -0800 |
commit | 1fab7e9d477aa98e489400c25a08358952c69c90 (patch) | |
tree | 717e983ca9cc6d115f5955873684409209164e9c /host/lib | |
parent | 122b9477c5e3a3f63789aeb1d3d8ae572ef2cec7 (diff) | |
download | uhd-1fab7e9d477aa98e489400c25a08358952c69c90.tar.gz uhd-1fab7e9d477aa98e489400c25a08358952c69c90.tar.bz2 uhd-1fab7e9d477aa98e489400c25a08358952c69c90.zip |
usrp1: big endian compile fix, conversion should cast to unsigned
The htonx only takes unsigned integers, cast the int16 to uint16.
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/convert/gen_convert_general.py | 4 |
1 files 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 } } |