]> begriffs open source - cmsis-freertos/blob - Demo/ColdFire_MCF52221_CodeWarrior/headers/MCF52221_RTC.h
Update cmsis_os2.c
[cmsis-freertos] / Demo / ColdFire_MCF52221_CodeWarrior / headers / MCF52221_RTC.h
1 /* Coldfire C Header File
2  * Copyright Freescale Semiconductor Inc
3  * All rights reserved.
4  *
5  * 2008/05/23 Revision: 0.95
6  *
7  * (c) Copyright UNIS, a.s. 1997-2008
8  * UNIS, a.s.
9  * Jundrovska 33
10  * 624 00 Brno
11  * Czech Republic
12  * http      : www.processorexpert.com
13  * mail      : info@processorexpert.com
14  */
15
16 #ifndef __MCF52221_RTC_H__
17 #define __MCF52221_RTC_H__
18
19
20 /*********************************************************************
21 *
22 * Real-Time Clock (RTC)
23 *
24 *********************************************************************/
25
26 /* Register read/write macros */
27 #define MCF_RTC_HOURMIN                      (*(vuint32*)(0x400003C0))
28 #define MCF_RTC_SECONDS                      (*(vuint32*)(0x400003C4))
29 #define MCF_RTC_ALRM_HM                      (*(vuint32*)(0x400003C8))
30 #define MCF_RTC_ALRM_SEC                     (*(vuint32*)(0x400003CC))
31 #define MCF_RTC_RTCCTL                       (*(vuint32*)(0x400003D0))
32 #define MCF_RTC_RTCISR                       (*(vuint32*)(0x400003D4))
33 #define MCF_RTC_RTCIENR                      (*(vuint32*)(0x400003D8))
34 #define MCF_RTC_STPWCH                       (*(vuint32*)(0x400003DC))
35 #define MCF_RTC_DAYS                         (*(vuint32*)(0x400003E0))
36 #define MCF_RTC_ALRM_DAY                     (*(vuint32*)(0x400003E4))
37
38
39 /* Bit definitions and macros for MCF_RTC_HOURMIN */
40 #define MCF_RTC_HOURMIN_MINUTES(x)           (((x)&0x3F)<<0)
41 #define MCF_RTC_HOURMIN_HOURS(x)             (((x)&0x1F)<<0x8)
42
43 /* Bit definitions and macros for MCF_RTC_SECONDS */
44 #define MCF_RTC_SECONDS_SECONDS(x)           (((x)&0x3F)<<0)
45
46 /* Bit definitions and macros for MCF_RTC_ALRM_HM */
47 #define MCF_RTC_ALRM_HM_MINUTES(x)           (((x)&0x3F)<<0)
48 #define MCF_RTC_ALRM_HM_HOURS(x)             (((x)&0x1F)<<0x8)
49
50 /* Bit definitions and macros for MCF_RTC_ALRM_SEC */
51 #define MCF_RTC_ALRM_SEC_SECONDS(x)          (((x)&0x3F)<<0)
52
53 /* Bit definitions and macros for MCF_RTC_RTCCTL */
54 #define MCF_RTC_RTCCTL_SWR                   (0x1)
55 #define MCF_RTC_RTCCTL_EN                    (0x80)
56
57 /* Bit definitions and macros for MCF_RTC_RTCISR */
58 #define MCF_RTC_RTCISR_SW                    (0x1)
59 #define MCF_RTC_RTCISR_MIN                   (0x2)
60 #define MCF_RTC_RTCISR_ALM                   (0x4)
61 #define MCF_RTC_RTCISR_DAY                   (0x8)
62 #define MCF_RTC_RTCISR_1HZ                   (0x10)
63 #define MCF_RTC_RTCISR_HR                    (0x20)
64
65 /* Bit definitions and macros for MCF_RTC_RTCIENR */
66 #define MCF_RTC_RTCIENR_SW                   (0x1)
67 #define MCF_RTC_RTCIENR_MIN                  (0x2)
68 #define MCF_RTC_RTCIENR_ALM                  (0x4)
69 #define MCF_RTC_RTCIENR_DAY                  (0x8)
70 #define MCF_RTC_RTCIENR_1HZ                  (0x10)
71 #define MCF_RTC_RTCIENR_HR                   (0x20)
72
73 /* Bit definitions and macros for MCF_RTC_STPWCH */
74 #define MCF_RTC_STPWCH_CNT(x)                (((x)&0x3F)<<0)
75
76 /* Bit definitions and macros for MCF_RTC_DAYS */
77 #define MCF_RTC_DAYS_DAYS(x)                 (((x)&0xFFFF)<<0)
78
79 /* Bit definitions and macros for MCF_RTC_ALRM_DAY */
80 #define MCF_RTC_ALRM_DAY_DAYSAL(x)           (((x)&0xFFFF)<<0)
81
82
83 #endif /* __MCF52221_RTC_H__ */