TianoCore EDK2 master
Loading...
Searching...
No Matches
LsRealTimeClock.h
Go to the documentation of this file.
1
10#ifndef LS_REAL_TIME_CLOCK_H_
11#define LS_REAL_TIME_CLOCK_H_
12
13#define TOY_WRITE0_REG 0x24
14#define TOY_WRITE1_REG 0x28
15#define TOY_READ0_REG 0x2c
16#define TOY_READ1_REG 0x30
17#define RTC_CTRL_REG 0x40
18
19/* TOY Enable bits */
20#define RTC_ENABLE_BIT (1UL << 13)
21#define TOY_ENABLE_BIT (1UL << 11)
22#define OSC_ENABLE_BIT (1UL << 8)
23
24/*
25 * shift bits and filed mask
26 */
27#define TOY_MON_MASK 0x3f
28#define TOY_DAY_MASK 0x1f
29#define TOY_HOUR_MASK 0x1f
30#define TOY_MIN_MASK 0x3f
31#define TOY_SEC_MASK 0x3f
32#define TOY_MSEC_MASK 0xf
33
34#define TOY_MON_SHIFT 26
35#define TOY_DAY_SHIFT 21
36#define TOY_HOUR_SHIFT 16
37#define TOY_MIN_SHIFT 10
38#define TOY_SEC_SHIFT 4
39
40#endif // LS_REAL_TIME_CLOCK_H_