comparison target-utils/include/rtc.h @ 0:e7502631a0f9

initial import from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 11 Jun 2016 00:13:35 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e7502631a0f9
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 */