From 73c7221b9bbd7ca9616eecef5c99f1f76eac0c04 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 19 May 2012 21:58:13 -0400 Subject: Remove now-unneeded inclusion. --- driver_zodiac.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'driver_zodiac.c') diff --git a/driver_zodiac.c b/driver_zodiac.c index cbc4cee2..48faa803 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -18,7 +18,16 @@ #endif /* S_SPLINT_S */ #include "gpsd.h" -#include "bits.h" + +/* Zodiac protocol description uses 1-origin indexing by little-endian word */ +#define get16z(buf, n) ( (buf[2*(n)-2]) \ + | (buf[2*(n)-1] << 8)) +#define get32z(buf, n) ( (buf[2*(n)-2]) \ + | (buf[2*(n)-1] << 8) \ + | (buf[2*(n)+0] << 16) \ + | (buf[2*(n)+1] << 24)) +#define getstringz(to, from, s, e) \ + (void)memcpy(to, from+2*(s)-2, 2*((e)-(s)+1)) #ifdef ZODIAC_ENABLE struct header -- cgit v1.2.1