From c0ed726125550a1d7dfdad4fb2cc61cd17ca2d89 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 8 Jun 2010 10:49:40 -0700 Subject: fix to ensure 32 bit swap is called on a 64 bit machine --- host/lib/transport/gen_vrt.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'host/lib') diff --git a/host/lib/transport/gen_vrt.py b/host/lib/transport/gen_vrt.py index 1417240ab..6cac2ae08 100755 --- a/host/lib/transport/gen_vrt.py +++ b/host/lib/transport/gen_vrt.py @@ -44,8 +44,6 @@ TMPL_TEXT = """ \#define LE_MACRO(x) (x) \#endif -#set $XE_MACRO = "BE_MACRO" - using namespace uhd; using namespace uhd::transport; @@ -130,10 +128,11 @@ void vrt::pack_$(suffix)( if (metadata.end_of_burst) vrt_hdr_flags |= $hex(0x1 << 24); //fill in complete header word - header_buff[0] = $(XE_MACRO)(vrt_hdr_flags | - ((packet_count & 0xf) << 16) | - (num_packet_words32 & 0xffff) - ); + header_buff[0] = $(XE_MACRO)(boost::uint32_t(0 + | vrt_hdr_flags + | ((packet_count & 0xf) << 16) + | (num_packet_words32 & 0xffff) + )); } void vrt::unpack_$(suffix)( -- cgit v1.2.3