summaryrefslogtreecommitdiff
path: root/driver_sirf.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-03-06 14:55:03 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-03-06 14:55:03 +0000
commit80f9bdade8fd0565eaa885b6683c4a27437a7091 (patch)
tree5f4c3618a4a95ffc821c0a2d86786429fbaf02ef /driver_sirf.c
parentb00632ab81f8532200a69f79fbb9b369ae3302ad (diff)
downloadgpsd-80f9bdade8fd0565eaa885b6683c4a27437a7091.tar.gz
Support --disable-controlsend
Diffstat (limited to 'driver_sirf.c')
-rw-r--r--driver_sirf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/driver_sirf.c b/driver_sirf.c
index 0f8d7522..03ee12eb 100644
--- a/driver_sirf.c
+++ b/driver_sirf.c
@@ -126,6 +126,7 @@ bool sirf_write(int fd, unsigned char *msg) {
return(ok);
}
+#ifdef ALLOW_CONTROLSEND
static ssize_t sirf_control_send(struct gps_device_t *session, char *msg, size_t len) {
/*@ +charint +matchanyintegral -initallelements -mayaliasunique @*/
session->msgbuf[0] = 0xa0;
@@ -141,6 +142,7 @@ static ssize_t sirf_control_send(struct gps_device_t *session, char *msg, size_t
(unsigned char *)session->msgbuf) ? session->msgbuflen : -1;
/*@ -charint -matchanyintegral +initallelements +mayaliasunique @*/
}
+#endif /* ALLOW_CONTROLSEND */
#ifdef ALLOW_RECONFIGURE
static bool sirf_speed(int ttyfd, speed_t speed, char parity, int stopbits)
@@ -981,13 +983,15 @@ const struct gps_type_t sirf_binary =
.packet_type = SIRF_PACKET, /* associated lexer packet type */
.trigger = NULL, /* no trigger */
.channels = SIRF_CHANNELS, /* consumer-grade GPS */
- .control_send = sirf_control_send,/* how to send a control string */
.probe_wakeup = NULL, /* no wakeup to be done before hunt */
.probe_detect = NULL, /* no probe */
.probe_subtype = NULL, /* can't probe more in NMEA mode */
.get_packet = sirf_get, /* be prepared for SiRF or NMEA */
.parse_packet = sirfbin_parse_input,/* parse message packets */
.rtcm_writer = pass_rtcm, /* send RTCM data straight */
+#ifdef ALLOW_CONTROLSEND
+ .control_send = sirf_control_send,/* how to send a control string */
+#endif /* ALLOW_CONTROLSEND */
#ifdef ALLOW_RECONFIGURE
.configurator = sirfbin_configure,/* initialize the device */
.speed_switcher = sirfbin_speed, /* we can change baud rate */