Lines Matching +full:start +full:- +full:up
4 * - clock driver for hopf 6039 PCI board (GPS or DCF77)
11 * the PCI-board driver for your system first.
17 * the kernel module for the PCI-bus board. The driver sources
18 * belongs to the delivery equipment of the PCI-board.
24 * Device Driver for the PCI-bus board. The driver belongs to the
25 * delivery equipment of the PCI-board.
28 * Start 21.03.2000 Revision: 01.20
63 #define PRECISION (-10) /* precision assumed (1 ms) */
103 hopfpci_start, /* start up driver */
113 * hopfpci_start - attach to hopf PCI board 6039
122 struct hopfclock_unit *up; in hopfpci_start() local
127 up = emalloc_zero(sizeof(*up)); in hopfpci_start()
135 msyslog(LOG_ERR, "Start: %s unit: %d failed!", DEVICE, unit); in hopfpci_start()
136 free(up); in hopfpci_start()
141 pp = peer->procptr; in hopfpci_start()
142 pp->io.clock_recv = noentry; in hopfpci_start()
143 pp->io.srcclock = peer; in hopfpci_start()
144 pp->io.datalen = 0; in hopfpci_start()
145 pp->io.fd = INVALID_SOCKET; in hopfpci_start()
146 pp->unitptr = up; in hopfpci_start()
148 get_systime(&pp->lastrec); in hopfpci_start()
153 memcpy((char *)&pp->refid, REFID, 4); in hopfpci_start()
154 peer->precision = PRECISION; in hopfpci_start()
155 pp->clockdesc = DESCRIPTION; in hopfpci_start()
156 up->leap_status = 0; in hopfpci_start()
157 up->unit = (short) unit; in hopfpci_start()
163 * hopfpci_shutdown - shut down the clock
177 if (NULL != peer->procptr->unitptr) in hopfpci_shutdown()
178 free(peer->procptr->unitptr); in hopfpci_shutdown()
183 * hopfpci_poll - called by the transmit procedure
194 pp = peer->procptr; in hopfpci_poll()
203 pp->polls++; in hopfpci_poll()
205 pp->day = ymd2yd(m_time.wYear,m_time.wMonth,m_time.wDay); in hopfpci_poll()
206 pp->hour = m_time.wHour; in hopfpci_poll()
207 pp->minute = m_time.wMinute; in hopfpci_poll()
208 pp->second = m_time.wSecond; in hopfpci_poll()
209 pp->nsec = m_time.wMilliseconds * 1000000; in hopfpci_poll()
211 pp->leap = LEAP_ADDSECOND; in hopfpci_poll()
213 pp->leap = LEAP_NOWARNING; in hopfpci_poll()
215 snprintf(pp->a_lastcode, sizeof(pp->a_lastcode), in hopfpci_poll()
217 m_time.wStatus, pp->hour, pp->minute, pp->second, in hopfpci_poll()
218 pp->nsec / 1000000, m_time.wDay, m_time.wMonth, in hopfpci_poll()
220 pp->lencode = (u_short)strlen(pp->a_lastcode); in hopfpci_poll()
222 get_systime(&pp->lastrec); in hopfpci_poll()
229 pp->leap = LEAP_NOTINSYNC; in hopfpci_poll()
239 if ((pp->sloppyclockflag & CLK_FLAG1) == 0) { in hopfpci_poll()
241 pp->leap = LEAP_NOTINSYNC; in hopfpci_poll()
250 pp->lastref = pp->lastrec; in hopfpci_poll()
252 record_clock_stats(&peer->srcadr, pp->a_lastcode); in hopfpci_poll()