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