From 1fe3c1370d668afd68b9c3b6d0e9480bf3700a7e Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Tue, 24 May 2016 15:42:15 -0400 Subject: Move htonl to hal_internal.h --- xdr.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'xdr.c') diff --git a/xdr.c b/xdr.c index fa12311..6266d99 100644 --- a/xdr.c +++ b/xdr.c @@ -36,26 +36,8 @@ #include #include /* memcpy, memset */ -#ifndef STM32F4XX -#include /* htonl/ntohl */ -#else -/* htonl is not available in arm-none-eabi headers or libc */ -#ifdef __ARMEL__ /* little endian */ -static inline uint32_t htonl(uint32_t w) -{ - return - ((w & 0x000000ff) << 24) + - ((w & 0x0000ff00) << 8) + - ((w & 0x00ff0000) >> 8) + - ((w & 0xff000000) >> 24); -} -#else -#define htonl(x) (x) -#endif -#define ntohl htonl -#endif - #include "hal.h" +#include "hal_internal.h" #include "xdr_internal.h" /* encode/decode_int. This covers int, unsigned int, enum, and bool types, -- cgit v1.2.3