libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
g0/lptimer.h
Go to the documentation of this file.
1
/** @defgroup lptimer_defines LPTIM Defines
2
*
3
* @ingroup STM32G0xx_defines
4
*
5
* @brief <b>libopencm3 Defined Constants and Types for the STM32G0xx Low Power Timer</b>
6
*
7
* @version 1.0.0
8
*
9
* LGPL License Terms @ref lgpl_license
10
* */
11
/*
12
* This file is part of the libopencm3 project.
13
*
14
* Copyright (C) 2019 Guillaume Revaillot <g.revaillot@gmail.com>
15
*
16
* This library is free software: you can redistribute it and/or modify
17
* it under the terms of the GNU Lesser General Public License as published by
18
* the Free Software Foundation, either version 3 of the License, or
19
* (at your option) any later version.
20
*
21
* This library is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
* GNU Lesser General Public License for more details.
25
*
26
* You should have received a copy of the GNU Lesser General Public License
27
* along with this library. If not, see <http://www.gnu.org/licenses/>.
28
*/
29
30
#ifndef LIBOPENCM3_LPTIMER_H
31
#define LIBOPENCM3_LPTIMER_H
32
/**@{*/
33
34
#include <
libopencm3/stm32/common/lptimer_common_all.h
>
35
36
/** @defgroup lptim_reg_base Low Power Timer register base addresses
37
@{*/
38
#define LPTIM1 LPTIM1_BASE
39
#define LPTIM2 LPTIM2_BASE
40
/**@}*/
41
42
/** LPTIM_CFGR2 LPTIM configuration register 2 */
43
#define LPTIM_CFGR2(tim_base) MMIO32((tim_base) + 0x24)
44
45
/** @addtogroup lptim_cr
46
@{*/
47
/** COUNTRST Counter reset **/
48
#define LPTIM_CR_COUNTRST (1 << 3)
49
/** RSTARE Reset after read enable **/
50
#define LPTIM_CR_RSTARE (1 << 4)
51
/**@}*/
52
53
/** @defgroup lptim_cfgr2 LPTIM_CFGR2 Configuration Register 2
54
@{*/
55
56
#define LPTIM_CFGR2_IN2SEL_SHIFT 4
57
#define LPTIM_CFGR2_IN2SEL_MASK 0x03
58
59
#define LPTIM_CFGR2_IN1SEL_SHIFT 0
60
#define LPTIM_CFGR2_IN1SEL_MASK 0x03
61
62
/**@}*/
63
64
65
BEGIN_DECLS
66
67
END_DECLS
68
69
/**@}*/
70
#endif
END_DECLS
#define END_DECLS
Definition:
common.h:34
BEGIN_DECLS
#define BEGIN_DECLS
Definition:
common.h:33
lptimer_common_all.h
include
libopencm3
stm32
g0
lptimer.h
Generated on Tue Mar 7 2023 16:12:17 for libopencm3 by
1.9.4