1 /* Coldfire C Header File
\r
2 * Copyright Freescale Semiconductor Inc
\r
3 * All rights reserved.
\r
5 * 2008/05/23 Revision: 0.95
\r
7 * (c) Copyright UNIS, a.s. 1997-2008
\r
12 * http : www.processorexpert.com
\r
13 * mail : info@processorexpert.com
\r
16 #ifndef __MCF52221_RTC_H__
\r
17 #define __MCF52221_RTC_H__
\r
20 /*********************************************************************
\r
22 * Real-Time Clock (RTC)
\r
24 *********************************************************************/
\r
26 /* Register read/write macros */
\r
27 #define MCF_RTC_HOURMIN (*(vuint32*)(0x400003C0))
\r
28 #define MCF_RTC_SECONDS (*(vuint32*)(0x400003C4))
\r
29 #define MCF_RTC_ALRM_HM (*(vuint32*)(0x400003C8))
\r
30 #define MCF_RTC_ALRM_SEC (*(vuint32*)(0x400003CC))
\r
31 #define MCF_RTC_RTCCTL (*(vuint32*)(0x400003D0))
\r
32 #define MCF_RTC_RTCISR (*(vuint32*)(0x400003D4))
\r
33 #define MCF_RTC_RTCIENR (*(vuint32*)(0x400003D8))
\r
34 #define MCF_RTC_STPWCH (*(vuint32*)(0x400003DC))
\r
35 #define MCF_RTC_DAYS (*(vuint32*)(0x400003E0))
\r
36 #define MCF_RTC_ALRM_DAY (*(vuint32*)(0x400003E4))
\r
39 /* Bit definitions and macros for MCF_RTC_HOURMIN */
\r
40 #define MCF_RTC_HOURMIN_MINUTES(x) (((x)&0x3F)<<0)
\r
41 #define MCF_RTC_HOURMIN_HOURS(x) (((x)&0x1F)<<0x8)
\r
43 /* Bit definitions and macros for MCF_RTC_SECONDS */
\r
44 #define MCF_RTC_SECONDS_SECONDS(x) (((x)&0x3F)<<0)
\r
46 /* Bit definitions and macros for MCF_RTC_ALRM_HM */
\r
47 #define MCF_RTC_ALRM_HM_MINUTES(x) (((x)&0x3F)<<0)
\r
48 #define MCF_RTC_ALRM_HM_HOURS(x) (((x)&0x1F)<<0x8)
\r
50 /* Bit definitions and macros for MCF_RTC_ALRM_SEC */
\r
51 #define MCF_RTC_ALRM_SEC_SECONDS(x) (((x)&0x3F)<<0)
\r
53 /* Bit definitions and macros for MCF_RTC_RTCCTL */
\r
54 #define MCF_RTC_RTCCTL_SWR (0x1)
\r
55 #define MCF_RTC_RTCCTL_EN (0x80)
\r
57 /* Bit definitions and macros for MCF_RTC_RTCISR */
\r
58 #define MCF_RTC_RTCISR_SW (0x1)
\r
59 #define MCF_RTC_RTCISR_MIN (0x2)
\r
60 #define MCF_RTC_RTCISR_ALM (0x4)
\r
61 #define MCF_RTC_RTCISR_DAY (0x8)
\r
62 #define MCF_RTC_RTCISR_1HZ (0x10)
\r
63 #define MCF_RTC_RTCISR_HR (0x20)
\r
65 /* Bit definitions and macros for MCF_RTC_RTCIENR */
\r
66 #define MCF_RTC_RTCIENR_SW (0x1)
\r
67 #define MCF_RTC_RTCIENR_MIN (0x2)
\r
68 #define MCF_RTC_RTCIENR_ALM (0x4)
\r
69 #define MCF_RTC_RTCIENR_DAY (0x8)
\r
70 #define MCF_RTC_RTCIENR_1HZ (0x10)
\r
71 #define MCF_RTC_RTCIENR_HR (0x20)
\r
73 /* Bit definitions and macros for MCF_RTC_STPWCH */
\r
74 #define MCF_RTC_STPWCH_CNT(x) (((x)&0x3F)<<0)
\r
76 /* Bit definitions and macros for MCF_RTC_DAYS */
\r
77 #define MCF_RTC_DAYS_DAYS(x) (((x)&0xFFFF)<<0)
\r
79 /* Bit definitions and macros for MCF_RTC_ALRM_DAY */
\r
80 #define MCF_RTC_ALRM_DAY_DAYSAL(x) (((x)&0xFFFF)<<0)
\r
83 #endif /* __MCF52221_RTC_H__ */
\r