RTEMS 6.1-rc6
Loading...
Searching...
No Matches
rtcRegs.h
1/* Blackfin RTC Registers
2 *
3 * Copyright (c) 2008 Kallisti Labs, Los Gatos, CA, USA
4 * written by Allan Hessenflow <allanh@kallisti.com>
5 *
6 * The license and distribution terms for this file may be
7 * found in the file LICENSE in this distribution or at
8 * http://www.rtems.org/license/LICENSE.
9 */
10
11#ifndef _rtcRegs_h_
12#define _rtcRegs_h_
13
14/* register addresses */
15
16#define RTC_STAT (RTC_BASE_ADDRESS + 0x0000)
17#define RTC_ICTL (RTC_BASE_ADDRESS + 0x0004)
18#define RTC_ISTAT (RTC_BASE_ADDRESS + 0x0008)
19#define RTC_SWCNT (RTC_BASE_ADDRESS + 0x000c)
20#define RTC_ALARM (RTC_BASE_ADDRESS + 0x0010)
21#define RTC_PREN (RTC_BASE_ADDRESS + 0x0014)
22
23
24/* register fields */
25
26#define RTC_STAT_DAYS_MASK 0xfffe0000
27#define RTC_STAT_DAYS_SHIFT 17
28#define RTC_STAT_HOURS_MASK 0x0001f000
29#define RTC_STAT_HOURS_SHIFT 12
30#define RTC_STAT_MINUTES_MASK 0x00000fc0
31#define RTC_STAT_MINUTES_SHIFT 6
32#define RTC_STAT_SECONDS_MASK 0x0000003f
33#define RTC_STAT_SECONDS_SHIFT 0
34
35#define RTC_ICTL_WCIE 0x8000
36#define RTC_ICTL_DAIE 0x0040
37#define RTC_ICTL_24HIE 0x0020
38#define RTC_ICTL_HIE 0x0010
39#define RTC_ICTL_MIE 0x0008
40#define RTC_ICTL_SIE 0x0004
41#define RTC_ICTL_AIE 0x0002
42#define RTC_ICTL_SWIE 0x0001
43
44#define RTC_ISTAT_WC 0x8000
45#define RTC_ISTAT_WP 0x4000
46#define RTC_ISTAT_DAEF 0x0040
47#define RTC_ISTAT_24HE 0x0020
48#define RTC_ISTAT_HEF 0x0010
49#define RTC_ISTAT_MEF 0x0008
50#define RTC_ISTAT_SEF 0x0004
51#define RTC_ISTAT_AEF 0x0002
52#define RTC_ISTAT_SWEF 0x0001
53
54#define RTC_ALARM_DAYS_MASK 0xfff70000
55#define RTC_ALARM_DAYS_SHIFT 17
56#define RTC_ALARM_HOURS_MASK 0x0001f000
57#define RTC_ALARM_HOURS_SHIFT 12
58#define RTC_ALARM_MINUTES_MASK 0x00000fc0
59#define RTC_ALARM_MINUTES_SHIFT 10
60#define RTC_ALARM_SECONDS_MASK 0x0000003f
61#define RTC_ALARM_SECONDS_SHIFT 0
62
63#define RTC_PREN_PREN 0x0001
64
65#endif /* _rtcRegs_h_ */