Lines Matching +full:per +full:- +full:device

2  * refclock_atom - clock driver for 1-pps signals
25 * This driver furnishes an interface for pulse-per-second (PPS) signals
33 * within +-0.4 s by another means, such as a radio clock or NTP
37 * may require a one-shot flipflop to lengthen the pulse. The other is
41 * This driver requires the Pulse-per-Second API for Unix-like Operating
42 * Systems, Version 1.0, RFC-2783 (PPSAPI). Implementations are
45 * the API with multiple PPS drivers and multiple handles per driver. If
74 * miscellaneous device driver and OS delays.
79 #define DEVICE "/dev/pps%d" /* device name and unit */
80 #define PRECISION (-20) /* precision assumed (about 1 us) */
110 atom_timer, /* called once per second */
115 * atom_start - initialize data for processing
125 char device[80];
130 pp = peer->procptr;
131 peer->precision = PRECISION;
132 pp->clockdesc = DESCRIPTION;
133 pp->stratum = STRATUM_UNSPEC;
134 memcpy((char *)&pp->refid, REFID, 4);
137 pp->unitptr = up;
140 * Open PPS device. This can be any serial or parallel port and
143 snprintf(device, sizeof(device), DEVICE, unit);
144 up->fddev = tty_open(device, O_RDWR, 0777);
145 if (up->fddev <= 0) {
147 "refclock_atom: %s: %m", device);
154 return (refclock_ppsapi(up->fddev, &up->atom));
159 * atom_shutdown - shut down the clock
170 pp = peer->procptr;
171 up = pp->unitptr;
172 if (up->fddev > 0)
173 close(up->fddev);
178 * atom_timer - called once per second
190 pp = peer->procptr;
191 up = pp->unitptr;
192 if (refclock_pps(peer, &up->atom, pp->sloppyclockflag) <= 0)
195 peer->flags |= FLAG_PPS;
201 if (pp->sloppyclockflag & CLK_FLAG4) {
203 pp->filter[pp->coderecv]);
204 record_clock_stats(&peer->srcadr, tbuf);
210 * atom_poll - called by the transmit procedure
227 pp = peer->procptr;
228 pp->polls++;
229 if (pp->codeproc == pp->coderecv) {
230 peer->flags &= ~FLAG_PPS;
234 pp->lastref = pp->lastrec;