libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
g4/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 STM32G4xx General Purpose I/O</b>
4
*
5
* @ingroup STM32G4xx_defines
6
*
7
* @version 1.0.0
8
*
9
* LGPL License Terms @ref lgpl_license
10
*/
11
12
/*
13
* This file is part of the libopencm3 project.
14
*
15
* This library is free software: you can redistribute it and/or modify
16
* it under the terms of the GNU Lesser General Public License as published by
17
* the Free Software Foundation, either version 3 of the License, or
18
* (at your option) any later version.
19
*
20
* This library is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
* GNU Lesser General Public License for more details.
24
*
25
* You should have received a copy of the GNU Lesser General Public License
26
* along with this library. If not, see <http://www.gnu.org/licenses/>.
27
*/
28
29
/**@{*/
30
#ifndef LIBOPENCM3_GPIO_H
31
#define LIBOPENCM3_GPIO_H
32
33
#include <
libopencm3/stm32/common/gpio_common_f24.h
>
34
35
/** GPIO Bit Reset Registers GPIOx_BRR
36
* @{
37
*/
38
#define GPIO_BRR(port) MMIO32((port) + 0x28)
39
#define GPIOA_BRR GPIO_BRR(GPIOA)
40
#define GPIOB_BRR GPIO_BRR(GPIOB)
41
#define GPIOC_BRR GPIO_BRR(GPIOC)
42
#define GPIOD_BRR GPIO_BRR(GPIOD)
43
#define GPIOE_BRR GPIO_BRR(GPIOE)
44
#define GPIOF_BRR GPIO_BRR(GPIOF)
45
#define GPIOG_BRR GPIO_BRR(GPIOG)
46
#define GPIOH_BRR GPIO_BRR(GPIOH)
47
/**@}*/
48
49
/** @defgroup gpio_speed GPIO Output Pin Speed
50
@{*/
51
#define GPIO_OSPEED_LOW 0x0
52
#define GPIO_OSPEED_MED 0x1
53
#define GPIO_OSPEED_HIGH 0x2
54
#define GPIO_OSPEED_VERYHIGH 0x3
55
/**@}*/
56
57
BEGIN_DECLS
58
59
END_DECLS
60
61
#endif
62
/**@}*/
END_DECLS
#define END_DECLS
Definition:
common.h:34
BEGIN_DECLS
#define BEGIN_DECLS
Definition:
common.h:33
gpio_common_f24.h
include
libopencm3
stm32
g4
gpio.h
Generated on Tue Mar 7 2023 16:12:22 for libopencm3 by
1.9.4