Welcome to mirror list, hosted at ThFree Co, Russian Federation.

rtc_common.h « common « efm32 « libopencm3 « include - github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c7eea3e41827cc1046d6ea121daaae3de5bbb26f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/** @addtogroup rtc_defines
 */
/*
 * This file is part of the libopencm3 project.
 *
 * Copyright (C) 2015 Kuldeep Singh Dhaka <kuldeepdhaka9@gmail.com>
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once

#include <libopencm3/efm32/memorymap.h>
#include <libopencm3/cm3/common.h>

/**@{*/

#define RTC_CTRL		(RTC_BASE + 0x000)
#define RTC_CNT			(RTC_BASE + 0x004)
#define RTC_COMP0		(RTC_BASE + 0x008)
#define RTC_COMP1		(RTC_BASE + 0x00C)
#define RTC_IF			(RTC_BASE + 0x010)
#define RTC_IFS			(RTC_BASE + 0x014)
#define RTC_IFC			(RTC_BASE + 0x018)
#define RTC_IEN			(RTC_BASE + 0x01C)
#define RTC_FREEZE		(RTC_BASE + 0x020)
#define RTC_SYNCBUSY	(RTC_BASE + 0x024)

/* RTC_CTRL */
#define RTC_CTRL_COMP0TOP		(1 << 2)
#define RTC_CTRL_DEBUGRUN		(1 << 1)
#define RTC_CTRL_EN				(1 << 0)

/* RTC_IF */
#define RTC_IF_COMP1			(1 << 2)
#define RTC_IF_COMP0			(1 << 1)
#define RTC_IF_OF				(1 << 0)

/* RTC_IFS */
#define RTC_IFS_COMP1			(1 << 2)
#define RTC_IFS_COMP0			(1 << 1)
#define RTC_IFS_OF				(1 << 0)

/* RTC_IFC */
#define RTC_IFC_COMP1			(1 << 2)
#define RTC_IFC_COMP0			(1 << 1)
#define RTC_IFC_OF				(1 << 0)

/* RTC_IFE */
#define RTC_IFE_COMP1			(1 << 2)
#define RTC_IFE_COMP0			(1 << 1)
#define RTC_IFE_OF				(1 << 0)

/* RTC_FREEZE */
#define RTC_FREEZE_REGFREEZE	(1 << 0)

/* RTC_SYNCBUSY */
#define RTC_SYNCBUSY_COMP1		(1 << 2)
#define RTC_SYNCBUSY_COMP0		(1 << 1)
#define RTC_SYNCBUSY_CTRL		(1 << 0)

/**@}*/