summaryrefslogtreecommitdiff
path: root/driver_zodiac.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-05-19 21:58:13 -0400
committerEric S. Raymond <esr@thyrsus.com>2012-05-19 21:58:13 -0400
commit73c7221b9bbd7ca9616eecef5c99f1f76eac0c04 (patch)
tree84f8480ce9af5b1b4822893d4464189523f2d6e3 /driver_zodiac.c
parent192c485475f54223cd8071055772ade7bcb326f6 (diff)
downloadgpsd-73c7221b9bbd7ca9616eecef5c99f1f76eac0c04.tar.gz
Remove now-unneeded inclusion.
Diffstat (limited to 'driver_zodiac.c')
-rw-r--r--driver_zodiac.c11
1 files changed, 10 insertions, 1 deletions
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