浏览代码

Merge pull request #3125 from yygg/master

fix warning: #1296-D
Bernard Xiong 5 年之前
父节点
当前提交
21d24d51b8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      bsp/stm32/libraries/HAL_Drivers/drv_gpio.h

+ 2 - 2
bsp/stm32/libraries/HAL_Drivers/drv_gpio.h

@@ -14,9 +14,9 @@
 #include <drv_common.h>
 #include <drv_common.h>
 #include <board.h>
 #include <board.h>
 
 
-#define __STM32_PORT(port)  GPIO##port
+#define __STM32_PORT(port)  GPIO##port##_BASE
 
 
-#define GET_PIN(PORTx,PIN) (rt_base_t)((16 * ( ((rt_base_t)__STM32_PORT(PORTx) - (rt_base_t)GPIOA)/(0x0400UL) )) + PIN)
+#define GET_PIN(PORTx,PIN) (rt_base_t)((16 * ( ((rt_base_t)__STM32_PORT(PORTx) - (rt_base_t)GPIOA_BASE)/(0x0400UL) )) + PIN)
 
 
 #define __STM32_PIN(index, gpio, gpio_index)                                \
 #define __STM32_PIN(index, gpio, gpio_index)                                \
     {                                                                       \
     {                                                                       \