3 /****************************************************************************/
5 /* hopf Elektronik 6039 PCI radio clock header */
6 /* (c) 1999, 2000 Bernd Altmeier <altmeier@ATLSoft.de> */
7 /* Rev. 1.00 Date 25.03.2000 */
9 /****************************************************************************/
14 #define HOPF_MAXVERSION 8
15 #define HOPF_CNTR_MEM_LEN 0x7f
16 #define HOPF_DATA_MEM_LEN 0x3ff /* this is our memory size */
18 /* macros and definition for 32 to 16 to 8 bit conversion */
20 typedef unsigned long DWORD
;
21 typedef unsigned char BYTE
;
22 typedef unsigned short WORD
;
24 #define LOWORD(l) ((WORD)(l))
25 #define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
26 #define LOBYTE(w) ((BYTE)(w))
27 #define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
29 /* iocntl codes for driver access */
31 #define HOPF_CLOCK_CMD_MASK 0xff000
33 #define HOPF_CLOCK_GET_LOCAL 0x10000
34 #define HOPF_CLOCK_GET_UTC 0x20000
35 #define HOPF_CLOCK_GET_ANTENNA 0x30000
36 #define HOPF_CLOCK_GET_DIFFERENCE 0x40000
37 #define HOPF_CLOCK_GET_VERSION 0x50000
38 #define HOPF_CLOCK_GET_POSITION 0x60000
39 #define HOPF_CLOCK_GET_SATDATA 0x70000
40 #define HOPF_CLOCK_GET_SYSTEMBYTE 0x80000
41 #define HOPF_CLOCK_GET_IRIG 0x90000
43 #define HOPF_CLOCK_SET_DIFFERENCE 0x01000
44 #define HOPF_CLOCK_SET_ANTENNA 0x02000
45 #define HOPF_CLOCK_SET_TIME 0x03000
46 #define HOPF_CLOCK_SET_POSITION 0x04000
47 #define HOPF_CLOCK_SET_SATMODE 0x05000
48 #define HOPF_CLOCK_SET_SYSTEMBYTE 0x06000
49 #define HOPF_CLOCK_SET_RESET 0x07000
50 #define HOPF_CLOCK_SET_IRIG 0x08000
52 /* clock command codes */
54 #define HOPF_CLOCK_HARDRESET 0x00008000
55 #define HOPF_CLOCK_SOFTRESET 0x00004000
59 typedef struct SatStat
{
82 typedef struct GPSPos
{ /* Position */
88 /* clock hardware version */
90 typedef struct ClockVersion
{
91 char cVersion
[255]; /* Hardware Version like " DCF-RECEIVER, VERSION 01.01, DAT: 23.NOV.1999" */
92 char dVersion
[255]; /* Driver Version */
95 /* hopftime what you think */
97 typedef struct HOPFTIME
{
100 unsigned int wDayOfWeek
;
103 unsigned int wMinute
;
104 unsigned int wSecond
;
105 unsigned int wMilliseconds
;
106 unsigned int wStatus
;
109 /* DCF77 antenna alignment */
111 typedef struct DcfAntenne
{
119 typedef struct hopfCard
{
122 unsigned long membase
; /* without mmap */
126 char versionbuf
[1024];
127 char *version
[HOPF_MAXVERSION
];
130 void *mbase
; /* this will be our memory base address */
134 typedef struct cardparams
{
139 unsigned int membase
;
143 #define WRITE_REGISTER 0x00
144 #define READ_REGISTER 0x01
146 #endif /* _hopf6039_H_ */