[HAL][EXTI] Fix computation of pExtiConfig->GPIOSel in HAL_EXTI_GetConfigLine()
diff --git a/Src/stm32f4xx_hal_exti.c b/Src/stm32f4xx_hal_exti.c
index 04b5215..0804555 100644
--- a/Src/stm32f4xx_hal_exti.c
+++ b/Src/stm32f4xx_hal_exti.c
@@ -300,8 +300,8 @@
     {
       assert_param(IS_EXTI_GPIO_PIN(linepos));
 
-      regval = (SYSCFG->EXTICR[linepos >> 2u] << 16u );
-      pExtiConfig->GPIOSel = ((regval << (SYSCFG_EXTICR1_EXTI1_Pos * (3uL - (linepos & 0x03u)))) >> 28u);
+      regval = SYSCFG->EXTICR[linepos >> 2u];
+      pExtiConfig->GPIOSel = (regval >> (SYSCFG_EXTICR1_EXTI1_Pos * (linepos & 0x03u))) & SYSCFG_EXTICR1_EXTI0;
     }
   }