stm32f4xx_hal_gpio.c 20 KB

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