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