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