summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-06-08 10:49:40 -0700
committerJosh Blum <josh@joshknows.com>2010-06-08 10:49:40 -0700
commitc0ed726125550a1d7dfdad4fb2cc61cd17ca2d89 (patch)
tree0b96640e59038712a9568392c4d407a6da278ed9 /host
parent0f4eff49c820a8d2ccb38e191604eb86c81b30af (diff)
downloaduhd-c0ed726125550a1d7dfdad4fb2cc61cd17ca2d89.tar.gz
uhd-c0ed726125550a1d7dfdad4fb2cc61cd17ca2d89.tar.bz2
uhd-c0ed726125550a1d7dfdad4fb2cc61cd17ca2d89.zip
fix to ensure 32 bit swap is called on a 64 bit machine
Diffstat (limited to 'host')
-rwxr-xr-xhost/lib/transport/gen_vrt.py11
1 files changed, 5 insertions, 6 deletions
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)(