Lines Matching defs:up

101 	palisade_start,		/* start up driver */
270 struct palisade_unit *up;
308 up = (struct palisade_unit *) emalloc(sizeof(struct palisade_unit));
310 memset((char *)up, 0, sizeof(struct palisade_unit));
312 up->type = CLK_TYPE(peer);
313 switch (up->type) {
340 free(up);
354 free(up);
361 pp->unitptr = (caddr_t)up;
370 up->leap_status = 0;
371 up->unit = (short) unit;
372 up->rpt_status = TSIP_PARSED_EMPTY;
373 up->rpt_cnt = 0;
375 if (up->type == CLK_THUNDERBOLT)
377 if (up->type == CLK_ACUTIME)
393 struct palisade_unit *up;
396 up = (struct palisade_unit *)pp->unitptr;
398 free(up);
444 struct palisade_unit *up;
448 up = (struct palisade_unit *)pp->unitptr;
456 if ((up->type != CLK_THUNDERBOLT) & (up->type != CLK_ACUTIME)){
457 if ((up->rpt_buf[0] == (char) 0x41) ||
458 (up->rpt_buf[0] == (char) 0x46) ||
459 (up->rpt_buf[0] == (char) 0x54) ||
460 (up->rpt_buf[0] == (char) 0x4B) ||
461 (up->rpt_buf[0] == (char) 0x6D)) {
475 if ((u_char) up->rpt_buf[0] == (u_char) 0x8f) {
490 if (up->polled <= 0)
493 if (up->rpt_cnt != LENCODE_8F0B) /* check length */
505 up->unit, lat,lon,alt);
507 up->unit);
545 up->unit, mb(0) & 0xff, event, pp->hour, pp->minute,
552 if (up->leap_status) {
553 up->leap_status = 0;
563 if (up->rpt_cnt != LENCODE_NTP) /* check length */
566 up->leap_status = mb(19);
568 if (up->polled <= 0)
581 up->polled = -1;
586 if (up->leap_status & PALISADE_LEAP_PENDING) {
587 if (up->leap_status & PALISADE_UTC_TIME)
592 else if (up->leap_status)
604 up->polled = -1;
621 up->unit, mb(0) & 0xff, event, pp->hour, pp->minute,
629 if (up->polled <= 0)
632 if (up->rpt_cnt != LENCODE_8FAC)/* check length */
643 up->unit, lat,lon,alt);
644 printf("TSIP_decode: unit %d\n", up->unit);
655 up->unit, mb(0) & 0xff, pp->leap);
694 if (up->rpt_cnt != LENCODE_8FAB) /* check length */
697 if (up->polled <= 0)
716 up->polled = -1;
764 printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%06ld %02d/%02d/%04d ",up->unit, mb(0) & 0xff, event, pp->hour, pp->minute, pp->second, pp->nsec, mb(14), mb(13), pp->year);
775 else if (up->rpt_buf[0] == (u_char)0x42) {
779 else if (up->rpt_buf[0] == (u_char)0x43) {
783 else if ((up->rpt_buf[0] == PACKET_41) & (up->type == CLK_THUNDERBOLT)){
787 else if ((up->rpt_buf[0] == PACKET_41A) & (up->type == CLK_ACUTIME)) {
797 else if ((up->rpt_buf[0] == PACKET_46) & (up->type == CLK_ACUTIME)) {
832 up->polled = -1;
851 else if (up->rpt_buf[0] == 0x54)
854 else if (up->rpt_buf[0] == PACKET_6D) {
875 up->polled = -1;
878 up->unit, up->rpt_buf[0] & 0xff, mb(0) & 0xff,
879 event, up->rpt_cnt);
893 struct palisade_unit *up;
900 up = (struct palisade_unit *)pp->unitptr;
904 if (up->polled <= 0)
907 up->polled = 0; /* Poll reply received */
913 up->unit, pp->year, pp->day, pp->hour, pp->minute,
932 up->unit);
942 up->unit, prettydate(&pp->lastrec));
959 struct palisade_unit *up;
963 up = (struct palisade_unit *)pp->unitptr;
966 if (up->polled > 0) /* last reply never arrived or error */
969 up->polled = 2; /* synchronous packet + 1 event */
981 if(up->type == CLK_PRAECIS) {
1030 struct palisade_unit *up;
1038 up = (struct palisade_unit *)pp->unitptr;
1040 if(up->type == CLK_PRAECIS) {
1053 switch (up->rpt_status) {
1061 up->rpt_status = TSIP_PARSED_EMPTY;
1065 up->rpt_status = TSIP_PARSED_DATA;
1067 up->rpt_buf[0] = *c;
1074 up->rpt_status = TSIP_PARSED_DLE_2;
1076 mb(up->rpt_cnt++) = *c;
1081 up->rpt_status = TSIP_PARSED_DATA;
1082 mb(up->rpt_cnt++) =
1086 up->rpt_status = TSIP_PARSED_FULL;
1089 up->rpt_status = TSIP_PARSED_DLE_1;
1090 up->rpt_buf[0] = *c;
1098 up->rpt_status = TSIP_PARSED_EMPTY;
1100 up->rpt_status = TSIP_PARSED_DLE_1;
1106 if (up->rpt_status == TSIP_PARSED_DLE_1) {
1107 up->rpt_cnt = 0;
1112 else if (up->rpt_status == TSIP_PARSED_EMPTY)
1113 up->rpt_cnt = 0;
1115 else if (up->rpt_cnt > BMAX)
1116 up->rpt_status =TSIP_PARSED_EMPTY;
1118 if (up->rpt_status == TSIP_PARSED_FULL)
1137 struct palisade_unit *up;
1139 up = (struct palisade_unit *) pp->unitptr;
1145 printf("Palisade HW_poll: unit %d: GET %s\n", up->unit, strerror(errno));
1148 up->unit);
1155 if (up->type == CLK_ACUTIME)
1161 printf("Palisade HW_poll: unit %d: SET \n", up->unit);
1165 up->unit);
1177 printf("Palisade HW_poll: unit %d: UNSET \n", up->unit);
1181 up->unit);