comparison target-utils/include/rtc.h @ 72:92c1ed6b4b67

pirexplore: RTC read implemented
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 26 Jul 2013 20:32:43 +0000
parents
children
comparison
equal deleted inserted replaced
71:0c1480317c18 72:92c1ed6b4b67
1 /* Calypso RTC registers */
2
3 #ifndef __CALYPSO_RTC_H
4 #define __CALYPSO_RTC_H
5
6 #include "types.h"
7
8 #define RTC_REGS_BASE 0xFFFE1800
9
10 struct rtctime {
11 u8 seconds;
12 u8 minutes;
13 u8 hours;
14 u8 day_of_month;
15 u8 month;
16 u8 year;
17 u8 day_of_week;
18 u8 pad;
19 };
20
21 struct rtcregs {
22 struct rtctime rtc_cur;
23 struct rtctime rtc_alarm;
24 u8 rtc_ctrl_reg;
25 u8 rtc_status_reg;
26 u8 rtc_int_reg;
27 u8 rtc_comp_lsb_reg;
28 u8 rtc_comp_msb_reg;
29 u8 rtc_res_prog_reg;
30 };
31
32 #define RTC_REGS (*(volatile struct rtcregs *) RTC_REGS_BASE)
33
34 #endif /* include guard */