summaryrefslogtreecommitdiff
path: root/gpsd.h-tail
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-03-06 13:07:43 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-03-06 13:07:43 +0000
commitb00632ab81f8532200a69f79fbb9b369ae3302ad (patch)
treeaaf5556888672e3e30bb9b81b2811c68edad5cd4 /gpsd.h-tail
parentfa63e809a527cbfb13ab8e0fe9a08543e508c261 (diff)
downloadgpsd-b00632ab81f8532200a69f79fbb9b369ae3302ad.tar.gz
Simplify the way ALLOW_RECONFIGURE works.
It now conditions out the speed-switcher, mode-switcher, and rate-switcher methods of the driver structure entirely. This makes it possible to condition out whole functions (rather than small bits that do device writes) almost everywhere. Build tested with ALLOW_RECONFIGURE off. This improvement should make the embedded people happy.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r--gpsd.h-tail11
1 files changed, 5 insertions, 6 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail
index 13095950..d2c047f3 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -179,6 +179,9 @@ struct gps_device_t;
#endif
#endif
+#define MODE_NMEA 0
+#define MODE_BINARY 1
+
struct gps_type_t {
/* GPS method table, describes how to talk to a particular GPS type */
/*@observer@*/char *type_name;
@@ -189,20 +192,16 @@ struct gps_type_t {
/*@null@*/bool (*probe_detect)(struct gps_device_t *session);
/*@null@*/void (*probe_wakeup)(struct gps_device_t *session);
/*@null@*/void (*probe_subtype)(struct gps_device_t *session, unsigned int seq);
-#ifdef ALLOW_RECONFIGURE
- /*@null@*/void (*configurator)(struct gps_device_t *session, unsigned int seq);
-#endif /* ALLOW_RECONFIGURE */
/*@null@*/ssize_t (*get_packet)(struct gps_device_t *session);
/*@null@*/gps_mask_t (*parse_packet)(struct gps_device_t *session);
/*@null@*/ssize_t (*rtcm_writer)(struct gps_device_t *session, char *rtcmbuf, size_t rtcmbytes);
+#ifdef ALLOW_RECONFIGURE
+ /*@null@*/void (*configurator)(struct gps_device_t *session, unsigned int seq);
/*@null@*/bool (*speed_switcher)(struct gps_device_t *session,
speed_t speed, char parity, int stopbits);
/*@null@*/void (*mode_switcher)(struct gps_device_t *session, int mode);
-#define MODE_NMEA 0
-#define MODE_BINARY 1
/*@null@*/bool (*rate_switcher)(struct gps_device_t *session, double rate);
int cycle_chars;
-#ifdef ALLOW_RECONFIGURE
/*@null@*/void (*revert)(struct gps_device_t *session);
#endif /* ALLOW_RECONFIGURE */
/*@null@*/void (*wrapup)(struct gps_device_t *session);