summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-29 13:28:24 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-29 13:28:24 -0500
commita83ecfd712d37442445523ef0d14c04477ac9289 (patch)
tree90d49d1e72b8a02ea8b75334c2fb3f4f5809c809 /serial.c
parentfd427530aa703cf0bb4c2d85fd2f94b2c625e617 (diff)
downloadgpsd-a83ecfd712d37442445523ef0d14c04477ac9289.tar.gz
Create a logic path for each driver to set tty controls.
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/serial.c b/serial.c
index af6b5ec7..e511b324 100644
--- a/serial.c
+++ b/serial.c
@@ -609,6 +609,16 @@ ssize_t gpsd_serial_write(struct gps_device_t * session,
return status;
}
+void gpsd_optimize_io(struct gps_device_t *session,
+ const int minlength, const bool textual)
+/* optimize I/O mode depending on the minimum packet size */
+{
+ gpsd_report(&session->context->errout, LOG_SHOUT,
+ "tty params optimized for min length %d of %s packets\n",
+ minlength, textual ? "textual" : "binary");
+}
+
+
/*
* This constant controls how long the packet sniffer will spend looking
* for a packet leader before it gives up. It *must* be larger than