xref: /freebsd/contrib/ntp/include/gps.h (revision b9f654b163bce26de79705e77b872427c9f2afa1)
1 /****************************************************************************/
2 /*      gps.h                                                            */
3 /*      TrueTime GPS-VME and VME-SG                                     */
4 /*      VME controller hardware commands and parameters.                */
5 /*      created 010694 res                                              */
6 /*      History:        revised for 747i 3/94                           */
7 /****************************************************************************/
8 
9 
10 #define GPS_VME "/dev/vme2"    /* the device file for the GPS board */
11                                /* change it to whatever yours is */
12 #define PRIO    120               /* set the realtime priority */
13 #define NREGS 7                   /* number of registers we will use */
14 
15 #define GFRZ1   0x0020          /* freeze cmd addr gen reg. 1 */
16 #define GREG1A  0x0021  /* Gen reg. 1 Word A (units microsec to 0.001 sec) */
17 #define GREG1B  0x0040  /* Gen reg. 1 Word B (units 0.01 sec to tens sec ) */
18 #define GREG1C  0x0041  /* Gen reg  1 Word C (units mins and hours) */
19 #define GREG1D  0x0042  /* Gen reg. 1 Word D (units days and status) */
20 #define GREG1E  0x0043  /* Gen reg. 1 Word E (units Years ) */
21 #define GUFRZ1  0x0022  /* unfreeze cmd addr gen reg 1 */
22 
23 #define MASKDAY 0x0FFF  /* mask for units days */
24 #define MASKHI  0xFF00
25 #define MASKLO  0x00FF
26 /* Use the following ASCII hex values: N(0x004e),S(0x0053),E(0x0045),
27         W(0x0057), +(0x002B), - (0x002D)   */
28 
29 #define LAT1    0x0048  /* Lat (degrees) */
30 #define LAT2    0x0049  /* Lat (min, sec) */
31 #define LAT3    0x004A  /* Lat (N/S, tenths sec) */
32 #define LON1    0x004B  /* Lon (degrees) */
33 #define LON2    0x004C  /* Lon (min, sec) */
34 #define LON3    0x004D  /* Lon (E/W, tenths sec) */
35 #define ELV1    0x004E  /* Elev. (sign, 10,000 and 1000 ) */
36 #define ELV2    0x004F  /* Elev. (100, 10s, units, and .1) */
37 
38 #define CFREG1  0x0050  /* config. register 1 */
39 #define CFREG2  0x00A0  /* config. register 2 */
40 #define PMODE   0x00A4  /* Position mode */
41 #define LOCAL   0x0051  /* Local hours offset */
42 #define RATE    0x0054  /* Pulse rate output select */
43 #define DAC     0x0055  /* OSC Control (DAC) select */
44 
45 #define PUMS    0x0056  /* Gen. preset register unit millisec */
46 #define PMS     0x0057  /* Gen. preset register units hundreds and tens ms */
47 #define PSEC    0x0058  /* Gen. preset register units tens and unit seconds */
48 #define PMIN    0x0059  /* Gen. preset register units tens and unit minutes */
49 #define PHRS    0x005A  /* Gen. preset register units tens and unit hours */
50 #define PDYS1   0x005B  /* Gen. preset register units tens and unit days */
51 #define PDYS2   0x005C  /* Gen. preset register units hundreds days */
52 #define PYRS1   0x005D  /* Gen. preset register units tens and unit years */
53 #define PYRS2   0x005E  /* Gen. preset reg. units thousands and hundreds yrs */
54