]> git.sur5r.net Git - freertos/blob - Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/MCF5223x/MCF52235_RTC.h
Start to re-arrange files to include FreeRTOS+ in main download.
[freertos] / Demo / ColdFire_MCF52233_Eclipse / RTOSDemo / MCF5223x / MCF52235_RTC.h
1 /* Coldfire C Header File\r
2  * Copyright Freescale Semiconductor Inc\r
3  * All rights reserved.\r
4  *\r
5  * 2007/03/19 Revision: 0.91\r
6  */\r
7 \r
8 #ifndef __MCF52235_RTC_H__\r
9 #define __MCF52235_RTC_H__\r
10 \r
11 \r
12 /*********************************************************************\r
13 *\r
14 * Real-Time Clock (RTC)\r
15 *\r
16 *********************************************************************/\r
17 \r
18 /* Register read/write macros */\r
19 #define MCF_RTC_HOURMIN                      (*(vuint32*)(&__IPSBAR[0x3C0]))\r
20 #define MCF_RTC_SECONDS                      (*(vuint32*)(&__IPSBAR[0x3C4]))\r
21 #define MCF_RTC_ALRM_HM                      (*(vuint32*)(&__IPSBAR[0x3C8]))\r
22 #define MCF_RTC_ALRM_SEC                     (*(vuint32*)(&__IPSBAR[0x3CC]))\r
23 #define MCF_RTC_RTCCTL                       (*(vuint32*)(&__IPSBAR[0x3D0]))\r
24 #define MCF_RTC_RTCISR                       (*(vuint32*)(&__IPSBAR[0x3D4]))\r
25 #define MCF_RTC_RTCIENR                      (*(vuint32*)(&__IPSBAR[0x3D8]))\r
26 #define MCF_RTC_STPWCH                       (*(vuint32*)(&__IPSBAR[0x3DC]))\r
27 #define MCF_RTC_DAYS                         (*(vuint32*)(&__IPSBAR[0x3E0]))\r
28 #define MCF_RTC_ALRM_DAY                     (*(vuint32*)(&__IPSBAR[0x3E4]))\r
29 \r
30 \r
31 /* Bit definitions and macros for MCF_RTC_HOURMIN */\r
32 #define MCF_RTC_HOURMIN_MINUTES(x)           (((x)&0x3F)<<0)\r
33 #define MCF_RTC_HOURMIN_HOURS(x)             (((x)&0x1F)<<0x8)\r
34 \r
35 /* Bit definitions and macros for MCF_RTC_SECONDS */\r
36 #define MCF_RTC_SECONDS_SECONDS(x)           (((x)&0x3F)<<0)\r
37 \r
38 /* Bit definitions and macros for MCF_RTC_ALRM_HM */\r
39 #define MCF_RTC_ALRM_HM_MINUTES(x)           (((x)&0x3F)<<0)\r
40 #define MCF_RTC_ALRM_HM_HOURS(x)             (((x)&0x1F)<<0x8)\r
41 \r
42 /* Bit definitions and macros for MCF_RTC_ALRM_SEC */\r
43 #define MCF_RTC_ALRM_SEC_SECONDS(x)          (((x)&0x3F)<<0)\r
44 \r
45 /* Bit definitions and macros for MCF_RTC_RTCCTL */\r
46 #define MCF_RTC_RTCCTL_SWR                   (0x1)\r
47 #define MCF_RTC_RTCCTL_EN                    (0x80)\r
48 \r
49 /* Bit definitions and macros for MCF_RTC_RTCISR */\r
50 #define MCF_RTC_RTCISR_SW                    (0x1)\r
51 #define MCF_RTC_RTCISR_MIN                   (0x2)\r
52 #define MCF_RTC_RTCISR_ALM                   (0x4)\r
53 #define MCF_RTC_RTCISR_DAY                   (0x8)\r
54 #define MCF_RTC_RTCISR_1HZ                   (0x10)\r
55 #define MCF_RTC_RTCISR_HR                    (0x20)\r
56 \r
57 /* Bit definitions and macros for MCF_RTC_RTCIENR */\r
58 #define MCF_RTC_RTCIENR_SW                   (0x1)\r
59 #define MCF_RTC_RTCIENR_MIN                  (0x2)\r
60 #define MCF_RTC_RTCIENR_ALM                  (0x4)\r
61 #define MCF_RTC_RTCIENR_DAY                  (0x8)\r
62 #define MCF_RTC_RTCIENR_1HZ                  (0x10)\r
63 #define MCF_RTC_RTCIENR_HR                   (0x20)\r
64 \r
65 /* Bit definitions and macros for MCF_RTC_STPWCH */\r
66 #define MCF_RTC_STPWCH_CNT(x)                (((x)&0x3F)<<0)\r
67 \r
68 /* Bit definitions and macros for MCF_RTC_DAYS */\r
69 #define MCF_RTC_DAYS_DAYS(x)                 (((x)&0xFFFF)<<0)\r
70 \r
71 /* Bit definitions and macros for MCF_RTC_ALRM_DAY */\r
72 #define MCF_RTC_ALRM_DAY_DAYSAL(x)           (((x)&0xFFFF)<<0)\r
73 \r
74 \r
75 #endif /* __MCF52235_RTC_H__ */\r