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