summaryrefslogtreecommitdiff
path: root/usrp2/firmware/lib/usrp2_bytesex.h
diff options
context:
space:
mode:
authorJosh Blum2011-10-19 16:53:11 -0700
committerJosh Blum2011-10-19 16:53:11 -0700
commit604ae82b9f31d8b5d7775810ab2fa06b7595bea0 (patch)
treefe4c7ad82dca0d92d90e37c4b68dd729d29a9d66 /usrp2/firmware/lib/usrp2_bytesex.h
parentd8d886d42ef9966e0578f39f180348e908965f7a (diff)
parenteb95f431badf197b249131a3119a92bd5317621b (diff)
downloadgnuradio-604ae82b9f31d8b5d7775810ab2fa06b7595bea0.tar.gz
gnuradio-604ae82b9f31d8b5d7775810ab2fa06b7595bea0.tar.bz2
gnuradio-604ae82b9f31d8b5d7775810ab2fa06b7595bea0.zip
Merge branch 'next' of http://gnuradio.org/git/gnuradio into next
Diffstat (limited to 'usrp2/firmware/lib/usrp2_bytesex.h')
-rw-r--r--usrp2/firmware/lib/usrp2_bytesex.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/usrp2/firmware/lib/usrp2_bytesex.h b/usrp2/firmware/lib/usrp2_bytesex.h
deleted file mode 100644
index 2b74f2a0b..000000000
--- a/usrp2/firmware/lib/usrp2_bytesex.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef INCLUDED_USRP2_BYTESEX_H
-#define INCLUDED_USRP2_BYTESEX_H
-
-// The USRP2 speaks big-endian...
-// Use the standard include files or provide substitutions for
-// htons and friends
-
-#if defined(HAVE_ARPA_INET_H)
-#include <arpa/inet.h>
-#elif defined(HAVE_NETINET_IN_H)
-#include <netinet/in.h>
-#else
-#include <stdint.h>
-
-#ifdef WORDS_BIGENDIAN // nothing to do...
-
-static inline uint32_t htonl(uint32_t x){ return x; }
-static inline uint16_t htons(uint16_t x){ return x; }
-static inline uint32_t ntohl(uint32_t x){ return x; }
-static inline uint16_t ntohs(uint16_t x){ return x; }
-
-#else
-
-#ifdef HAVE_BYTESWAP_H
-#include <byteswap.h>
-#else
-
-static inline uint16_t
-bswap_16 (uint16_t x)
-{
- return ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8));
-}
-
-static inline uint32_t
-bswap_32 (uint32_t x)
-{
- return ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) \
- | (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24));
-}
-#endif
-
-static inline uint32_t htonl(uint32_t x){ return bswap_32(x); }
-static inline uint16_t htons(uint16_t x){ return bswap_16(x); }
-static inline uint32_t ntohl(uint32_t x){ return bswap_32(x); }
-static inline uint16_t ntohs(uint16_t x){ return bswap_16(x); }
-
-#endif
-#endif
-#endif /* INCLUDED_USRP2_BYTESEX_H */