libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
rtc_common.h
Go to the documentation of this file.
1/** @addtogroup rtc_defines
2 */
3/*
4 * This file is part of the libopencm3 project.
5 *
6 * Copyright (C) 2015 Kuldeep Singh Dhaka <kuldeepdhaka9@gmail.com>
7 *
8 * This library is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this library. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
26
27/**@{*/
28
29#define RTC_CTRL (RTC_BASE + 0x000)
30#define RTC_CNT (RTC_BASE + 0x004)
31#define RTC_COMP0 (RTC_BASE + 0x008)
32#define RTC_COMP1 (RTC_BASE + 0x00C)
33#define RTC_IF (RTC_BASE + 0x010)
34#define RTC_IFS (RTC_BASE + 0x014)
35#define RTC_IFC (RTC_BASE + 0x018)
36#define RTC_IEN (RTC_BASE + 0x01C)
37#define RTC_FREEZE (RTC_BASE + 0x020)
38#define RTC_SYNCBUSY (RTC_BASE + 0x024)
39
40/* RTC_CTRL */
41#define RTC_CTRL_COMP0TOP (1 << 2)
42#define RTC_CTRL_DEBUGRUN (1 << 1)
43#define RTC_CTRL_EN (1 << 0)
44
45/* RTC_IF */
46#define RTC_IF_COMP1 (1 << 2)
47#define RTC_IF_COMP0 (1 << 1)
48#define RTC_IF_OF (1 << 0)
49
50/* RTC_IFS */
51#define RTC_IFS_COMP1 (1 << 2)
52#define RTC_IFS_COMP0 (1 << 1)
53#define RTC_IFS_OF (1 << 0)
54
55/* RTC_IFC */
56#define RTC_IFC_COMP1 (1 << 2)
57#define RTC_IFC_COMP0 (1 << 1)
58#define RTC_IFC_OF (1 << 0)
59
60/* RTC_IFE */
61#define RTC_IFE_COMP1 (1 << 2)
62#define RTC_IFE_COMP0 (1 << 1)
63#define RTC_IFE_OF (1 << 0)
64
65/* RTC_FREEZE */
66#define RTC_FREEZE_REGFREEZE (1 << 0)
67
68/* RTC_SYNCBUSY */
69#define RTC_SYNCBUSY_COMP1 (1 << 2)
70#define RTC_SYNCBUSY_COMP0 (1 << 1)
71#define RTC_SYNCBUSY_CTRL (1 << 0)
72
73/**@}*/
Dispatcher for the base address definitions, depending on the particular Gecko family.