Lines Matching +full:board +full:- +full:related

2  * refclock_heath - clock driver for Heath GC-1000
3 * (but no longer the GC-1001 Model II, which apparently never worked)
25 * This driver supports the Heath GC-1000 Most Accurate Clock, with
37 * There were two GC-1000 versions supported by this driver. The original
38 * GC-1000 with RS-232 output first appeared in 1983, but dissapeared
39 * from the market a few years later. The GC-1001 II with RS-232 output
42 * The GC-1000 has a pseudo-bipolar timecode output triggered by a RTS
44 * day. The GC-1001 II has a true bipolar output and a complement of
48 * The GC-1001 II was apparently never tested and, based on a Coverity
49 * scan, apparently never worked [Bug 689]. Related code has been disabled.
51 * GC-1000
54 * external DIPswitches should be set to GMT and 24-hour format.
60 * restrictions require the use of a POSIX-compatible programming
65 * lamp is out. Route the HISPEC signal to the tone decoder board pin
66 * 19, from the display, pin 19. Isolate pin 19 of the decoder board
68 * the CPU on the tone board, and use half an added 7400 to gate the
78 * AM/PM/bb = blank in 24-hour mode
86 * GC-1001 II
99 * T = tenths-of-seconds
136 * D = DST bit (#55) in last-received frame
137 * d = DST bit (#2) in last-received frame
147 * HH = tens-of-hours and hours (packed BCD)
148 * MM = tens-of-minutes and minutes (packed BCD)
149 * SS = tens-of-seconds and seconds (packed BCD)
150 * T = tenths-of-seconds (BCD)
164 #define PRECISION (-4) /* precision assumed (about 100 ms) */
166 #define DESCRIPTION "Heath GC-1000 Most Accurate Clock" /* WRU */
181 * Baud rate table. The GC-1000 supports 1200, 2400 and 4800; the
182 * GC-1001 II supports only 9600.
209 * heath_start - open the devices and initialize data for processing
225 fd = refclock_open(&peer->srcadr, device, speed[peer->ttl & 0x3],
229 pp = peer->procptr;
230 pp->io.clock_recv = heath_receive;
231 pp->io.srcclock = peer;
232 pp->io.datalen = 0;
233 pp->io.fd = fd;
234 if (!io_addclock(&pp->io)) {
236 pp->io.fd = -1;
243 peer->precision = PRECISION;
244 pp->clockdesc = DESCRIPTION;
245 memcpy(&pp->refid, REFID, 4);
251 * heath_shutdown - shut down the clock
261 pp = peer->procptr;
262 if (-1 != pp->io.fd)
263 io_closeclock(&pp->io);
268 * heath_receive - receive data from the serial interface
285 peer = rbufp->recv_peer;
286 pp = peer->procptr;
287 pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX,
295 switch (pp->lencode) {
298 * GC-1000 timecode format: "hh:mm:ss.f AM mm/dd/yy"
299 * GC-1001 II timecode format: "hh:mm:ss.f "
302 if (sscanf(pp->a_lastcode,
303 "%2d:%2d:%2d.%c%5c%2d/%2d/%2d", &pp->hour,
304 &pp->minute, &pp->second, &dsec, a, &month, &day,
305 &pp->year) != 8) {
313 * GC-1001 II timecode format: "hh:mm:ss.f "
316 if (sscanf(pp->a_lastcode, "%2d:%2d:%2d.%c", &pp->hour,
317 &pp->minute, &pp->second, &dsec) != 4) {
331 month = tm_time_p->tm_mon + 1;
332 day = tm_time_p->tm_mday;
362 if (pp->year % 4) {
363 if (day > day1tab[month - 1]) {
367 for (i = 0; i < month - 1; i++)
370 if (day > day2tab[month - 1]) {
374 for (i = 0; i < month - 1; i++)
377 pp->day = day;
383 pp->leap = LEAP_NOTINSYNC;
385 pp->nsec = (dsec - '0') * 100000000;
386 pp->leap = LEAP_NOWARNING;
394 * heath_poll - called by the transmit procedure
413 pp = peer->procptr;
416 * We toggle the RTS modem control lead (GC-1000) and sent a T
417 * (GC-1001 II) to kick a timecode loose from the radio. This
424 * Bug 689: Even though we no longer support the GC-1001 II,
427 if (ioctl(pp->io.fd, TIOCMBIC, (char *)&bits) < 0)
429 get_systime(&pp->lastrec);
432 ioctl(pp->io.fd, TIOCMBIS, (char *)&bits);
433 if (pp->coderecv == pp->codeproc) {
437 pp->lastref = pp->lastrec;
439 record_clock_stats(&peer->srcadr, pp->a_lastcode);
442 printf("heath: timecode %d %s\n", pp->lencode,
443 pp->a_lastcode);
445 pp->polls++;