summaryrefslogtreecommitdiff
path: root/drivers.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2006-10-26 15:55:43 +0000
committerEric S. Raymond <esr@thyrsus.com>2006-10-26 15:55:43 +0000
commitd74df4d29521580f858e81f62a805798ca009d95 (patch)
tree8e49b87a1843f2a6b3ddcbca99480efffa1fa5ea /drivers.c
parente8662124d6e16f064968a6223a1be1c41e79a0ba (diff)
downloadgpsd-d74df4d29521580f858e81f62a805798ca009d95.tar.gz
Add a new capability to the generic driver structure: wakeup...
...a function to be called just after the autobaud hunt sets the line speed each time. Use this to get rid of the internal baud hunt loop in the True North driver; instead, the ID query and rate-setting strings will be sent by the wakeup hook. Note: this patch is untested. I'm pretty certain it will work, but somebody needs to try it on live hardware.
Diffstat (limited to 'drivers.c')
-rw-r--r--drivers.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers.c b/drivers.c
index 0f66dd9c..573a4222 100644
--- a/drivers.c
+++ b/drivers.c
@@ -128,6 +128,7 @@ static struct gps_type_t nmea = {
.typename = "Generic NMEA", /* full name of type */
.trigger = NULL, /* it's the default */
.channels = 12, /* consumer-grade GPS */
+ .wakeup = NULL, /* no wakeup to be done before hunt */
.probe = NULL, /* no probe */
.initializer = nmea_initializer, /* probe for special types */
.get_packet = packet_get, /* use generic packet getter */
@@ -176,6 +177,7 @@ static struct gps_type_t garmin = {
.typename = "Garmin Serial", /* full name of type */
.trigger = "$PGRMC", /* Garmin private */
.channels = 12, /* not used by this driver */
+ .wakeup = NULL, /* no wakeup to be done before hunt */
.probe = NULL, /* no probe */
.initializer = garmin_nmea_initializer,/* probe for special types */
.get_packet = packet_get, /* use generic packet getter */
@@ -200,6 +202,7 @@ static struct gps_type_t fv18 = {
.typename = "San Jose Navigation FV18", /* full name of type */
.trigger = FV18_PROBE, /* FV18s should echo the probe */
.channels = 12, /* not used by this driver */
+ .wakeup = NULL, /* no wakeup to be done before hunt */
.probe = NULL, /* mo probe */
.initializer = NULL, /* to be sent unconditionally */
.get_packet = packet_get, /* how to get a packet */
@@ -266,6 +269,7 @@ static struct gps_type_t sirf_nmea = {
.trigger = NULL, /* let the binary driver have it */
#endif /* SIRF_ENABLE */
.channels = 12, /* not used by the NMEA parser */
+ .wakeup = NULL, /* no wakeup to be done before hunt */
.probe = NULL, /* no probe */
.initializer = sirf_initializer, /* turn off debugging messages */
.get_packet = packet_get, /* how to get a packet */
@@ -308,6 +312,7 @@ static struct gps_type_t tripmate = {
.typename = "Delorme TripMate", /* full name of type */
.trigger ="ASTRAL", /* tells us to switch */
.channels = 12, /* consumer-grade GPS */
+ .wakeup = NULL, /* no wakeup before hunt */
.probe = NULL, /* no probe */
.initializer = tripmate_initializer, /* send unconfitionally */
.get_packet = packet_get, /* how to get a packet */
@@ -357,6 +362,7 @@ static struct gps_type_t earthmate = {
.typename = "Delorme EarthMate (pre-2003, Zodiac chipset)",
.trigger = "EARTHA", /* Earthmate trigger string */
.channels = 12, /* not used by NMEA parser */
+ .wakeup = NULL, /* no wakeup to be done before hunt */
.probe = NULL, /* no probe */
.initializer = earthmate_initializer, /* switch us to Zodiac mode */
.get_packet = packet_get, /* how to get a packet */
@@ -481,6 +487,7 @@ static struct gps_type_t itrax = {
.typename = "iTrax", /* full name of type */
.trigger = "$PFST,OK", /* tells us to switch to Itrax */
.channels = 12, /* consumer-grade GPS */
+ .wakeup = NULL, /* no wakeup to be done before hunt */
.probe = NULL, /* no probe */
.initializer = itrax_initializer, /* initialize */
.get_packet = packet_get, /* how to get a packet */
@@ -517,6 +524,7 @@ static struct gps_type_t rtcm104 = {
.typename = "RTCM104", /* full name of type */
.trigger = NULL, /* no recognition string */
.channels = 0, /* not used */
+ .wakeup = NULL, /* no wakeup to be done before hunt */
.probe = NULL, /* no probe */
.initializer = NULL, /* no initializer */
.get_packet = packet_get, /* how to get a packet */