1 /*
2  * Copyright (c) 1988 University of Utah.
3  * Copyright (c) 1992 The Regents of the University of California.
4  * All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * the Systems Programming Group of the University of Utah Computer
8  * Science Department, Ralph Campbell, Sony Corp. and Kazumasa
9  * Utashiro of Software Research Associates, Inc.
10  *
11  * %sccs.include.redist.c%
12  *
13  * from: Utah $Hdr: clockreg.h 1.14 91/01/18$
14  *
15  *	@(#)clockreg.h	7.1 (Berkeley) 06/04/92
16  */
17 
18 #define	SECMIN	((unsigned)60)			/* seconds per minute */
19 #define	SECHOUR	((unsigned)(60*SECMIN))		/* seconds per hour */
20 #define	SECDAY	((unsigned)(24*SECHOUR))	/* seconds per day */
21 #define	SECYR	((unsigned)(365*SECDAY))	/* seconds per common year */
22 
23 #define	YRREF		1970
24 #define	LEAPYEAR(year)	(((year) % 4) == 0)
25 
26 /*
27  * Definitions for real time clock
28  */
29 struct chiptime {
30 	u_char	sec;		/* current seconds */
31 	u_char	min;		/* current minutes */
32 	u_char	hour;		/* current hours */
33 	u_char	dayw;		/* day of the week */
34 	u_char	day;		/* day of the month */
35 	u_char	mon;		/* month */
36 	u_char	year;		/* year */
37 };
38 
39 #if defined(CPU_SINGLE) && !defined(news700)
40 
41 #define MK48T02
42 
43 #define SET_CLOCK       0x80
44 #define READ_CLOCK      0x40
45 
46 #endif /* CPU_SINGLE && !news700 */
47