annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Src/stm32f4xx_hal_gpio.c @ 73:06cfc7457c9e

Add definitions for Fonts to be placed in upper flash
author Ideenmodellierer
date Thu, 04 Oct 2018 20:40:21 +0200
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_hal_gpio.c
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief GPIO HAL module driver.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 * This file provides firmware functions to manage the following
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * functionalities of the General Purpose Input/Output (GPIO) peripheral:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 * + Initialization and de-initialization functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * + IO operation functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 @verbatim
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 ==============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 ##### GPIO Peripheral features #####
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 ==============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 [..]
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 Subject to the specific hardware characteristics of each I/O port listed in the datasheet, each
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 port bit of the General Purpose IO (GPIO) Ports, can be individually configured by software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 in several modes:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 (+) Input mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 (+) Analog mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 (+) Output mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 (+) Alternate function mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 (+) External interrupt/event lines
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 [..]
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 During and just after reset, the alternate functions and external interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 lines are not active and the I/O ports are configured in input floating mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 [..]
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 All GPIO pins have weak internal pull-up and pull-down resistors, which can be
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 activated or not.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 [..]
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 In Output or Alternate mode, each IO can be configured on open-drain or push-pull
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 type and the IO speed can be selected depending on the VDD value.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 [..]
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 All ports have external interrupt/event capability. To use external interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 lines, the port must be configured in input mode. All available GPIO pins are
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 connected to the 16 external interrupt/event lines from EXTI0 to EXTI15.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 [..]
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45 The external interrupt/event controller consists of up to 23 edge detectors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 (16 lines are connected to GPIO) for generating event/interrupt requests (each
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 input line can be independently configured to select the type (interrupt or event)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 and the corresponding trigger event (rising or falling or both). Each line can
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 also be masked independently.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 ##### How to use this driver #####
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 ==============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 [..]
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 (#) Enable the GPIO AHB clock using the following function: __HAL_RCC_GPIOx_CLK_ENABLE().
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 (#) Configure the GPIO pin(s) using HAL_GPIO_Init().
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 (++) Configure the IO mode using "Mode" member from GPIO_InitTypeDef structure
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 (++) Activate Pull-up, Pull-down resistor using "Pull" member from GPIO_InitTypeDef
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 structure.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 (++) In case of Output or alternate function mode selection: the speed is
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 configured through "Speed" member from GPIO_InitTypeDef structure.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 (++) In alternate mode is selection, the alternate function connected to the IO
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 is configured through "Alternate" member from GPIO_InitTypeDef structure.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 (++) Analog mode is required when a pin is to be used as ADC channel
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 or DAC output.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 (++) In case of external interrupt/event selection the "Mode" member from
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 GPIO_InitTypeDef structure select the type (interrupt or event) and
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 the corresponding trigger event (rising or falling or both).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 (#) In case of external interrupt/event mode selection, configure NVIC IRQ priority
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 mapped to the EXTI line using HAL_NVIC_SetPriority() and enable it using
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 HAL_NVIC_EnableIRQ().
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 (#) To get the level of a pin configured in input mode use HAL_GPIO_ReadPin().
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 (#) To set/reset the level of a pin configured in output mode use
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 HAL_GPIO_WritePin()/HAL_GPIO_TogglePin().
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 (#) To lock pin configuration until next reset use HAL_GPIO_LockPin().
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 (#) During and just after reset, the alternate functions are not
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 active and the GPIO pins are configured in input floating mode (except JTAG
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 pins).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 (#) The LSE oscillator pins OSC32_IN and OSC32_OUT can be used as general purpose
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 (PC14 and PC15, respectively) when the LSE oscillator is off. The LSE has
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 priority over the GPIO function.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 (#) The HSE oscillator pins OSC_IN/OSC_OUT can be used as
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 general purpose PH0 and PH1, respectively, when the HSE oscillator is off.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 The HSE has priority over the GPIO function.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 @endverbatim
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 #include "stm32f4xx_hal.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 /** @addtogroup STM32F4xx_HAL_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 /** @defgroup GPIO GPIO
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 * @brief GPIO HAL module driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 #ifdef HAL_GPIO_MODULE_ENABLED
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 /* Private typedef -----------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 /* Private define ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 /** @addtogroup GPIO_Private_Constants GPIO Private Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 #define GPIO_MODE ((uint32_t)0x00000003)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 #define EXTI_MODE ((uint32_t)0x10000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 #define GPIO_MODE_IT ((uint32_t)0x00010000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 #define GPIO_MODE_EVT ((uint32_t)0x00020000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 #define RISING_EDGE ((uint32_t)0x00100000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 #define FALLING_EDGE ((uint32_t)0x00200000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 #define GPIO_OUTPUT_TYPE ((uint32_t)0x00000010)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 #define GPIO_NUMBER ((uint32_t)16)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 /* Private macro -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 /* Private function prototypes -----------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 /* Private functions ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 /** @defgroup GPIO_Exported_Functions GPIO Exported Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 /** @defgroup GPIO_Exported_Functions_Group1 Initialization and de-initialization functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 * @brief Initialization and Configuration functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 @verbatim
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 ===============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 ##### Initialization and de-initialization functions #####
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 ===============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 [..]
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 This section provides functions allowing to initialize and de-initialize the GPIOs
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 to be ready for use.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 @endverbatim
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 * @brief Initializes the GPIOx peripheral according to the specified parameters in the GPIO_Init.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 * @param GPIOx: where x can be (A..K) to select the GPIO peripheral for STM32F429X device or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 * x can be (A..I) to select the GPIO peripheral for STM32F40XX and STM32F427X devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 * @param GPIO_Init: pointer to a GPIO_InitTypeDef structure that contains
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 * the configuration information for the specified GPIO peripheral.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 uint32_t position;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 uint32_t ioposition = 0x00;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 uint32_t iocurrent = 0x00;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 uint32_t temp = 0x00;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 /* Check the parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 assert_param(IS_GPIO_PIN(GPIO_Init->Pin));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 assert_param(IS_GPIO_PULL(GPIO_Init->Pull));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 /* Configure the port pins */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 for(position = 0; position < GPIO_NUMBER; position++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 /* Get the IO position */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 ioposition = ((uint32_t)0x01) << position;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 /* Get the current IO position */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 iocurrent = (uint32_t)(GPIO_Init->Pin) & ioposition;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 if(iocurrent == ioposition)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 /*--------------------- GPIO Mode Configuration ------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 /* In case of Alternate function mode selection */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 if((GPIO_Init->Mode == GPIO_MODE_AF_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 /* Check the Alternate function parameter */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 /* Configure Alternate function mapped with the current IO */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 temp = GPIOx->AFR[position >> 3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 temp &= ~((uint32_t)0xF << ((uint32_t)(position & (uint32_t)0x07) * 4)) ;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 temp |= ((uint32_t)(GPIO_Init->Alternate) << (((uint32_t)position & (uint32_t)0x07) * 4));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 GPIOx->AFR[position >> 3] = temp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 /* Configure IO Direction mode (Input, Output, Alternate or Analog) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 temp = GPIOx->MODER;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 temp &= ~(GPIO_MODER_MODER0 << (position * 2));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 GPIOx->MODER = temp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 /* In case of Output or Alternate function mode selection */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 if((GPIO_Init->Mode == GPIO_MODE_OUTPUT_PP) || (GPIO_Init->Mode == GPIO_MODE_AF_PP) ||
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 (GPIO_Init->Mode == GPIO_MODE_OUTPUT_OD) || (GPIO_Init->Mode == GPIO_MODE_AF_OD))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 /* Check the Speed parameter */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 /* Configure the IO Speed */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 temp = GPIOx->OSPEEDR;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 temp &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 temp |= (GPIO_Init->Speed << (position * 2));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 GPIOx->OSPEEDR = temp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 /* Configure the IO Output Type */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 temp = GPIOx->OTYPER;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 temp &= ~(GPIO_OTYPER_OT_0 << position) ;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 temp |= (((GPIO_Init->Mode & GPIO_OUTPUT_TYPE) >> 4) << position);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 GPIOx->OTYPER = temp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 /* Activate the Pull-up or Pull down resistor for the current IO */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 temp = GPIOx->PUPDR;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 temp &= ~(GPIO_PUPDR_PUPDR0 << (position * 2));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 temp |= ((GPIO_Init->Pull) << (position * 2));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 GPIOx->PUPDR = temp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 /*--------------------- EXTI Mode Configuration ------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 /* Configure the External Interrupt or event for the current IO */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 if((GPIO_Init->Mode & EXTI_MODE) == EXTI_MODE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 /* Enable SYSCFG Clock */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 __HAL_RCC_SYSCFG_CLK_ENABLE();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 temp = SYSCFG->EXTICR[position >> 2];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 temp &= ~(((uint32_t)0x0F) << (4 * (position & 0x03)));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 temp |= ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4 * (position & 0x03)));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 SYSCFG->EXTICR[position >> 2] = temp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 /* Clear EXTI line configuration */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 temp = EXTI->IMR;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 temp &= ~((uint32_t)iocurrent);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 if((GPIO_Init->Mode & GPIO_MODE_IT) == GPIO_MODE_IT)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 temp |= iocurrent;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 EXTI->IMR = temp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 temp = EXTI->EMR;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 temp &= ~((uint32_t)iocurrent);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 if((GPIO_Init->Mode & GPIO_MODE_EVT) == GPIO_MODE_EVT)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 temp |= iocurrent;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 EXTI->EMR = temp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 /* Clear Rising Falling edge configuration */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 temp = EXTI->RTSR;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 temp &= ~((uint32_t)iocurrent);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 if((GPIO_Init->Mode & RISING_EDGE) == RISING_EDGE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 temp |= iocurrent;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 EXTI->RTSR = temp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 temp = EXTI->FTSR;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 temp &= ~((uint32_t)iocurrent);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 if((GPIO_Init->Mode & FALLING_EDGE) == FALLING_EDGE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 temp |= iocurrent;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 EXTI->FTSR = temp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 * @brief De-initializes the GPIOx peripheral registers to their default reset values.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 * @param GPIOx: where x can be (A..K) to select the GPIO peripheral for STM32F429X device or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309 * x can be (A..I) to select the GPIO peripheral for STM32F40XX and STM32F427X devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 * @param GPIO_Pin: specifies the port bit to be written.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 * This parameter can be one of GPIO_PIN_x where x can be (0..15).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 uint32_t position;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 uint32_t ioposition = 0x00;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 uint32_t iocurrent = 0x00;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 uint32_t tmp = 0x00;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 /* Check the parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 /* Configure the port pins */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 for(position = 0; position < GPIO_NUMBER; position++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 /* Get the IO position */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 ioposition = ((uint32_t)0x01) << position;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 /* Get the current IO position */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 iocurrent = (GPIO_Pin) & ioposition;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 if(iocurrent == ioposition)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 /*------------------------- GPIO Mode Configuration --------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 /* Configure IO Direction in Input Floating Mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (position * 2));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 /* Configure the default Alternate Function in current IO */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 GPIOx->AFR[position >> 3] &= ~((uint32_t)0xF << ((uint32_t)(position & (uint32_t)0x07) * 4)) ;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 /* Configure the default value for IO Speed */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (position * 2));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 /* Configure the default value IO Output Type */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 GPIOx->OTYPER &= ~(GPIO_OTYPER_OT_0 << position) ;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 /* Deactivate the Pull-up and Pull-down resistor for the current IO */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << (position * 2));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 /*------------------------- EXTI Mode Configuration --------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351 /* Configure the External Interrupt or event for the current IO */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 tmp = ((uint32_t)0x0F) << (4 * (position & 0x03));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 SYSCFG->EXTICR[position >> 2] &= ~tmp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355 /* Clear EXTI line configuration */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 EXTI->IMR &= ~((uint32_t)iocurrent);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 EXTI->EMR &= ~((uint32_t)iocurrent);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 /* Clear Rising Falling edge configuration */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 EXTI->RTSR &= ~((uint32_t)iocurrent);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 EXTI->FTSR &= ~((uint32_t)iocurrent);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370 /** @defgroup GPIO_Exported_Functions_Group2 IO operation functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 * @brief GPIO Read and Write
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 @verbatim
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 ===============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 ##### IO operation functions #####
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 ===============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 @endverbatim
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 * @brief Reads the specified input port pin.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 * @param GPIOx: where x can be (A..K) to select the GPIO peripheral for STM32F429X device or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 * x can be (A..I) to select the GPIO peripheral for STM32F40XX and STM32F427X devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 * @param GPIO_Pin: specifies the port bit to read.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 * This parameter can be GPIO_PIN_x where x can be (0..15).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 * @retval The input port pin value.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 GPIO_PinState bitstatus;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 /* Check the parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395 assert_param(IS_GPIO_PIN(GPIO_Pin));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 if((GPIOx->IDR & GPIO_Pin) != (uint32_t)GPIO_PIN_RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 bitstatus = GPIO_PIN_SET;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 bitstatus = GPIO_PIN_RESET;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405 return bitstatus;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409 * @brief Sets or clears the selected data port bit.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411 * @note This function uses GPIOx_BSRR register to allow atomic read/modify
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 * accesses. In this way, there is no risk of an IRQ occurring between
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413 * the read and the modify access.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415 * @param GPIOx: where x can be (A..K) to select the GPIO peripheral for STM32F429X device or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416 * x can be (A..I) to select the GPIO peripheral for STM32F40XX and STM32F427X devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417 * @param GPIO_Pin: specifies the port bit to be written.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418 * This parameter can be one of GPIO_PIN_x where x can be (0..15).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419 * @param PinState: specifies the value to be written to the selected bit.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 * This parameter can be one of the GPIO_PinState enum values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 * @arg GPIO_PIN_RESET: to clear the port pin
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422 * @arg GPIO_PIN_SET: to set the port pin
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425 void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427 /* Check the parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428 assert_param(IS_GPIO_PIN(GPIO_Pin));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429 assert_param(IS_GPIO_PIN_ACTION(PinState));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431 if(PinState != GPIO_PIN_RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433 GPIOx->BSRR = GPIO_Pin;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437 GPIOx->BSRR = (uint32_t)GPIO_Pin << 16;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442 * @brief Toggles the specified GPIO pins.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443 * @param GPIOx: Where x can be (A..K) to select the GPIO peripheral for STM32F429X device or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444 * x can be (A..I) to select the GPIO peripheral for STM32F40XX and STM32F427X devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445 * @param GPIO_Pin: Specifies the pins to be toggled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
449 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
450 /* Check the parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
451 assert_param(IS_GPIO_PIN(GPIO_Pin));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
452
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
453 GPIOx->ODR ^= GPIO_Pin;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
454 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
455
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
456 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
457 * @brief Locks GPIO Pins configuration registers.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
458 * @note The locked registers are GPIOx_MODER, GPIOx_OTYPER, GPIOx_OSPEEDR,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
459 * GPIOx_PUPDR, GPIOx_AFRL and GPIOx_AFRH.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
460 * @note The configuration of the locked GPIO pins can no longer be modified
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
461 * until the next reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
462 * @param GPIOx: where x can be (A..F) to select the GPIO peripheral for STM32F4 family
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
463 * @param GPIO_Pin: specifies the port bit to be locked.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
464 * This parameter can be any combination of GPIO_PIN_x where x can be (0..15).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
465 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
466 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
467 HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
468 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
469 __IO uint32_t tmp = GPIO_LCKR_LCKK;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
470
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
471 /* Check the parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
472 assert_param(IS_GPIO_PIN(GPIO_Pin));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
473
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
474 /* Apply lock key write sequence */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
475 tmp |= GPIO_Pin;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
476 /* Set LCKx bit(s): LCKK='1' + LCK[15-0] */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
477 GPIOx->LCKR = tmp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
478 /* Reset LCKx bit(s): LCKK='0' + LCK[15-0] */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
479 GPIOx->LCKR = GPIO_Pin;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
480 /* Set LCKx bit(s): LCKK='1' + LCK[15-0] */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
481 GPIOx->LCKR = tmp;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
482 /* Read LCKK bit*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
483 tmp = GPIOx->LCKR;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
484
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
485 if((GPIOx->LCKR & GPIO_LCKR_LCKK) != RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
486 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
487 return HAL_OK;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
488 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
489 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
490 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
491 return HAL_ERROR;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
492 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
493 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
494
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
495 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
496 * @brief This function handles EXTI interrupt request.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
497 * @param GPIO_Pin: Specifies the pins connected EXTI line
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
498 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
499 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
500 void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
501 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
502 /* EXTI line interrupt detected */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
503 if(__HAL_GPIO_EXTI_GET_IT(GPIO_Pin) != RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
504 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
505 __HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
506 HAL_GPIO_EXTI_Callback(GPIO_Pin);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
507 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
508 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
509
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
510 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
511 * @brief EXTI line detection callbacks.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
512 * @param GPIO_Pin: Specifies the pins connected EXTI line
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
513 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
514 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
515 __weak void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
516 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
517 /* NOTE: This function Should not be modified, when the callback is needed,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
518 the HAL_GPIO_EXTI_Callback could be implemented in the user file
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
519 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
520 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
521
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
522 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
523 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
524 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
525
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
526
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
527 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
528 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
529 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
530
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
531 #endif /* HAL_GPIO_MODULE_ENABLED */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
532 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
533 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
534 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
535
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
536 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
537 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
538 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
539
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
540 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/