libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
g0/gpio.h
Go to the documentation of this file.
1/** @defgroup gpio_defines GPIO Defines
2 *
3 * @ingroup STM32G0xx_defines
4 *
5 * @brief <b>Defined Constants and Types for the STM32G0xx General Purpose I/O</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 * This library is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public License
25 * along with this library. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28/**@{*/
29#ifndef LIBOPENCM3_GPIO_H
30#define LIBOPENCM3_GPIO_H
31
33
34/*****************************************************************************/
35/* Module definitions */
36/*****************************************************************************/
37
38/*****************************************************************************/
39/* Register definitions */
40/*****************************************************************************/
41
42#define GPIO_BRR(port) MMIO32((port) + 0x28)
43#define GPIOA_BRR GPIO_BRR(GPIOA)
44#define GPIOB_BRR GPIO_BRR(GPIOB)
45#define GPIOC_BRR GPIO_BRR(GPIOC)
46#define GPIOD_BRR GPIO_BRR(GPIOD)
47#define GPIOE_BRR GPIO_BRR(GPIOE)
48#define GPIOF_BRR GPIO_BRR(GPIOF)
49
50/*****************************************************************************/
51/* Register values */
52/*****************************************************************************/
53
54/** @defgroup gpio_speed GPIO Output Pin Speed
55@{*/
56#define GPIO_OSPEED_LOW 0x0
57#define GPIO_OSPEED_MED 0x1
58#define GPIO_OSPEED_HIGH 0x2
59#define GPIO_OSPEED_VERYHIGH 0x3
60/**@}*/
61
62/*****************************************************************************/
63/* API definitions */
64/*****************************************************************************/
65
66/*****************************************************************************/
67/* API Functions */
68/*****************************************************************************/
69
71
73
74#endif
75/**@}*/
#define END_DECLS
Definition: common.h:34
#define BEGIN_DECLS
Definition: common.h:33