discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] byteswapping problems in usrp code


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] byteswapping problems in usrp code
Date: Mon, 14 May 2007 08:40:11 -0700
User-agent: Mutt/1.5.9i

On Mon, May 14, 2007 at 10:44:37AM -0400, Greg Troxel wrote:
> gnuradio/trunk/usrp/host/lib/legacy/usrp_bytesex.h includes byteswap.h,
> which appears to be a Linux-specific header file.  I looked briefly, and
> didn't see any POSIX/SUSv3 definitions of these macros.  I just fixed
> this to build on NetBSD, which I suspect also fixes it on several other
> non-Linux systems.
> 
> 
> Also, the code uses 'short int' and 'int', which is nonportable.  It
> should be using the POSIX fixed-width types.

Agreed.

> I wonder if the use of swap is really right - this seems to be about
> host to USRP, but perhaps the USRP is always little endian?  It
> definitely needs more comments if that's what's going on.

The USRP is always little endian.  We didn't want to handle both cases
in the verilog, and at least at this point in history, most of our
hosts are little endian.

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]