[Git][NTPsec/ntpsec][master] 2 commits: NMEA: Support baud rates faster than 115200
Richard Laager
gitlab at mg.gitlab.com
Sat Dec 7 04:40:44 UTC 2019
Richard Laager pushed to branch master at NTPsec / ntpsec
Commits:
4eb5b45c by Richard Laager at 2019-12-07T04:29:36Z
NMEA: Support baud rates faster than 115200
I'm not sure if hardware exists that supports all of these speeds, but
these are all of the speeds available on my Linux system. Hardware
(both serial and NMEA) exists that supports up to 460800.
Fixes #626
- - - - -
feab268d by Richard Laager at 2019-12-07T04:29:36Z
Add a space in front of "bps"
This makes all mentions of "bps" consistent.
- - - - -
6 changed files:
- docs/driver_arbiter.adoc
- docs/driver_hpgps.adoc
- docs/driver_nmea.adoc
- docs/ntpsec.adoc
- ntpd/refclock_jjy.c
- ntpd/refclock_nmea.c
Changes:
=====================================
docs/driver_arbiter.adoc
=====================================
@@ -7,7 +7,7 @@ include::html.include[]
Name: arbiter
Reference ID: GPS
Driver ID: GPS_ARBITER
-Serial Port: /dev/gps__u__; 9600bps 8N1
+Serial Port: /dev/gps__u__; 9600 bps 8N1
Features: tty_clk
== Deprecation warning
=====================================
docs/driver_hpgps.adoc
=====================================
@@ -7,7 +7,7 @@ include::html.include[]
Name: hpgps
Reference ID: GPS
Driver ID: GPS_HP
-Serial Port: /dev/hpgps__u__; 9600bps 8N1, 19200bps 7N2 for the HP Z3801A
+Serial Port: /dev/hpgps__u__; 9600 bps 8N1, 19200 bps 7N2 for the HP Z3801A
== Warning
=====================================
docs/driver_nmea.adoc
=====================================
@@ -6,7 +6,7 @@ include::html.include[]
["verse",subs="normal"]
Name: nmea
Reference ID: GPS
-Serial Port: /dev/gps__u__; 4800-115200bps, 8N1
+Serial Port: /dev/gps__u__; 4800 bps or faster, 8N1
Serial Port: /dev/gpspps__u__; for PPS
Features: +tty_clk+
=====================================
docs/ntpsec.adoc
=====================================
@@ -296,7 +296,7 @@ to the security-critical core.
* The default bitrate of the NMEA driver has been changed to 9600 to
match the default speed of almost all modern GPSes. The code can be
built in a strict NTP Classic compatibility mode that restores the
- old 4800bps default.
+ old 4800 bps default.
* Most refclock drivers now support configuration options to override the
default device path, the default PPS device path (if any) and the
=====================================
ntpd/refclock_jjy.c
=====================================
@@ -4099,7 +4099,7 @@ modem_init_resp00 ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
break ;
case 4 :
- /* +MS = Protocol V22B:1200,2400bps V.22bis) */
+ /* +MS = Protocol V22B:1200,2400 bps V.22bis) */
pCmd = "AT+MS=V22B\r\n" ;
break ;
=====================================
ntpd/refclock_nmea.c
=====================================
@@ -391,6 +391,85 @@ nmea_start(
baudrate = B115200;
baudtext = "115200";
break;
+#endif
+ /* Speeds faster than 115200 are only available via the baud option. */
+#ifdef B230400
+ case 230400:
+ baudrate = B230400;
+ baudtext = "230400";
+ break;
+#endif
+#ifdef B460800
+ case 460800:
+ baudrate = B460800;
+ baudtext = "460800";
+ break;
+#endif
+#ifdef B500000
+ case 500000:
+ baudrate = B500000;
+ baudtext = "500000";
+ break;
+#endif
+#ifdef B576000
+ case 576000:
+ baudrate = B576000;
+ baudtext = "576000";
+ break;
+#endif
+#ifdef B921600
+ case 921600:
+ baudrate = B921600;
+ baudtext = "921600";
+ break;
+#endif
+#ifdef B1000000
+ case 1000000:
+ baudrate = B1000000;
+ baudtext = "1000000";
+ break;
+#endif
+#ifdef B1152000
+ case 1152000:
+ baudrate = B1152000;
+ baudtext = "1152000";
+ break;
+#endif
+#ifdef B1500000
+ case 1500000:
+ baudrate = B1500000;
+ baudtext = "1500000";
+ break;
+#endif
+#ifdef B2000000
+ case 2000000:
+ baudrate = B2000000;
+ baudtext = "2000000";
+ break;
+#endif
+#ifdef B2500000
+ case 2500000:
+ baudrate = B2500000;
+ baudtext = "2500000";
+ break;
+#endif
+#ifdef B3000000
+ case 3000000:
+ baudrate = B3000000;
+ baudtext = "3000000";
+ break;
+#endif
+#ifdef B3500000
+ case 3500000:
+ baudrate = B3500000;
+ baudtext = "3500000";
+ break;
+#endif
+#ifdef B4000000
+ case 4000000:
+ baudrate = B4000000;
+ baudtext = "4000000";
+ break;
#endif
default:
baudrate = SPEED232;
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/3fcdb75085b256077802cdf5c08d903fed1df7ab...feab268d1adb1ba4016ed393cb4fa3b901618b10
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/3fcdb75085b256077802cdf5c08d903fed1df7ab...feab268d1adb1ba4016ed393cb4fa3b901618b10
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20191207/05907d52/attachment-0001.htm>
More information about the vc
mailing list