]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1510] Add modes 20/21 for driver 8 to support RAWDCF @ 75 baud.
authorMartin Burnicki <burnicki@ntp.org>
Fri, 10 Dec 2010 11:47:54 +0000 (12:47 +0100)
committerMartin Burnicki <burnicki@ntp.org>
Fri, 10 Dec 2010 11:47:54 +0000 (12:47 +0100)
bk: 4d02136a9JKico4jTHWw771wp9sqoQ

html/drivers/driver8.html
ntpd/refclock_parse.c

index fc12f3307d437222a581515478acc9c933f00fa1..b4c34f3756eed6b0f1ce3768dd89dd761d1a6cb3 100644 (file)
                                <p><b><tt>Gude Analog- und Digitalsystem GmbH 'Expert mouseCLOCK USB v2.0'</tt></b><br>
                                <br></p>
 
+                       <li><b><tt>server 127.127.8.0-3 mode 20</tt></b>
+                               <p><b><tt>RAWDCF receiver similar to mode 14, but operating @ 75 baud (DTR=high/RTS=low)</tt></b><br>
+                               </p>
+                               <p>Driving the DCF clocks at 75 baud may help to get them to work with a bunch of common USB serial converters, that do 75 but cannot do 50 baud at all, e.g. those based on Prolific PL2303.
+                               <br></p>
+
+                       <li><b><tt>server 127.127.8.0-3 mode 21</tt></b>
+                               <p><b><tt>RAWDCF receiver similar to mode 16, but operating @ 75 baud (DTR=low/RTS=high) </tt></b><br>
+                               </p>
+                               <p>See comment from mode 20 clock.
+                               <br></p>
+
                </ul>
                <p>Actual data formats and setup requirements of the various clocks can be found in <a href="../parsedata.html">NTP PARSE clock data formats</a>.</p>
                <h4>Operation</h4>
index 24d27f9b1a105cd4b8704e79a665aca59c39daa5..52e4f73092e28b169243c72a8dabd7bfdeaf0caf 100644 (file)
@@ -679,6 +679,7 @@ static poll_info_t wsdcf_pollinfo = { WS_POLLRATE, WS_POLLCMD, WS_CMDSIZE };
  */
 static int     rawdcf_init_1   (struct parseunit *);
 #define RAWDCFDTRSET_DESCRIPTION       "RAW DCF77 CODE (DTR SET/RTS CLR)"
+#define RAWDCFDTRSET75_DESCRIPTION     "RAW DCF77 CODE (DTR SET/RTS CLR @ 75 baud)"
 #define RAWDCFDTRSET_INIT              rawdcf_init_1
 
 /*
@@ -687,6 +688,7 @@ static      int     rawdcf_init_1   (struct parseunit *);
  */
 static int     rawdcf_init_2   (struct parseunit *);
 #define RAWDCFDTRCLRRTSSET_DESCRIPTION "RAW DCF77 CODE (DTR CLR/RTS SET)"
+#define RAWDCFDTRCLRRTSSET75_DESCRIPTION "RAW DCF77 CODE (DTR CLR/RTS SET @ 75 baud)"
 #define RAWDCFDTRCLRRTSSET_INIT        rawdcf_init_2
 
 /*
@@ -1351,6 +1353,53 @@ static struct parse_clockinfo
                RAWDCF_SAMPLES,
                RAWDCF_KEEP
        },
+       {                               /* mode 20, like mode 14 but driven by 75 baud */
+               RAWDCF_FLAGS,
+               NO_POLL,
+               RAWDCFDTRSET_INIT,
+               NO_EVENT,
+               NO_END,
+               NO_MESSAGE,
+               NO_LCLDATA,
+               RAWDCF_ROOTDELAY,
+               RAWDCF_BASEDELAY,
+               DCF_A_ID,
+               RAWDCFDTRSET75_DESCRIPTION,
+               RAWDCF_FORMAT,
+               DCF_TYPE,
+               RAWDCF_MAXUNSYNC,
+               B75,
+               RAWDCF_CFLAG,
+               RAWDCF_IFLAG,
+               RAWDCF_OFLAG,
+               RAWDCF_LFLAG,
+               RAWDCF_SAMPLES,
+               RAWDCF_KEEP
+       },
+       {                               /* mode 21, like mode 16 but driven by 75 baud
+                                        - RAWDCF RTS set, DTR clr */
+               RAWDCF_FLAGS,
+               NO_POLL,
+               RAWDCFDTRCLRRTSSET_INIT,
+               NO_EVENT,
+               NO_END,
+               NO_MESSAGE,
+               NO_LCLDATA,
+               RAWDCF_ROOTDELAY,
+               RAWDCF_BASEDELAY,
+               DCF_A_ID,
+               RAWDCFDTRCLRRTSSET75_DESCRIPTION,
+               RAWDCF_FORMAT,
+               DCF_TYPE,
+               RAWDCF_MAXUNSYNC,
+               B75,
+               RAWDCF_CFLAG,
+               RAWDCF_IFLAG,
+               RAWDCF_OFLAG,
+               RAWDCF_LFLAG,
+               RAWDCF_SAMPLES,
+               RAWDCF_KEEP
+       },
 };
 
 static int ncltypes = sizeof(parse_clockinfo) / sizeof(struct parse_clockinfo);