libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
l0/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 STM32L0xx_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 GPIOE_BRR GPIO_BRR(GPIOE)
50#define GPIOH_BRR GPIO_BRR(GPIOH)
51
52/*****************************************************************************/
53/* Register values */
54/*****************************************************************************/
55
56/** @defgroup gpio_speed GPIO Output Pin Speed
57@ingroup gpio_defines
58@{*/
59#define GPIO_OSPEED_LOW 0x0
60#define GPIO_OSPEED_MED 0x1
61#define GPIO_OSPEED_HIGH 0x2
62#define GPIO_OSPEED_VERYHIGH 0x3
63/**@}*/
64
65/*****************************************************************************/
66/* API definitions */
67/*****************************************************************************/
68
69/*****************************************************************************/
70/* API Functions */
71/*****************************************************************************/
72
74
76
77#endif
#define END_DECLS
Definition: common.h:34
#define BEGIN_DECLS
Definition: common.h:33