summaryrefslogtreecommitdiff
path: root/garmin.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2006-05-17 19:19:44 +0000
committerGary E. Miller <gem@rellim.com>2006-05-17 19:19:44 +0000
commitcf1456844834ea55d2a2b6fd036c40fd7b7340c0 (patch)
tree3a5767fabc2e57369975473731860b42daf95a9f /garmin.c
parentcf2f9abf9a4587933589c8ab85234981f355cdf3 (diff)
downloadgpsd-cf1456844834ea55d2a2b6fd036c40fd7b7340c0.tar.gz
Change Packet_t to use the standard fixed width types from the C99 inttypes.h
Diffstat (limited to 'garmin.c')
-rw-r--r--garmin.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/garmin.c b/garmin.c
index 465d7651..246328bf 100644
--- a/garmin.c
+++ b/garmin.c
@@ -45,6 +45,7 @@
#include <string.h>
#include <unistd.h>
#include <errno.h>
+#include <inttypes.h>
#if defined (HAVE_SYS_SELECT_H)
#include <sys/select.h>
@@ -163,15 +164,15 @@ typedef struct {
// This is the packet format to/from the Garmin USB
typedef struct {
- unsigned char mPacketType;
- unsigned char mReserved1;
- unsigned short mReserved2;
- unsigned short mPacketId;
- unsigned short mReserved3;
- unsigned long mDataSize;
+ uint8_t mPacketType;
+ uint8_t mReserved1;
+ uint16_t mReserved2;
+ uint16_t mPacketId;
+ uint16_t mReserved3;
+ uint32_t mDataSize;
union {
- char chars[MAX_BUFFER_SIZE];
- unsigned char uchars[MAX_BUFFER_SIZE];
+ int8_t chars[MAX_BUFFER_SIZE];
+ uint8_t uchars[MAX_BUFFER_SIZE];
cpo_pvt_data pvt;
cpo_sat_data sats;
} mData;