From c6c8201bd43ad1adfc57e12d4ac3df36ab13a3b5 Mon Sep 17 00:00:00 2001 From: charlown Date: Mon, 25 Jul 2022 10:18:15 +0800 Subject: [PATCH] [gd32/arm/libraries]: correct pin number in drv_gpio.c; fix compile error if use rtc in gd32 f1~f4 (#6172) * [gd32/libraries]: fix compile error in rtc: "pmu_backup_write_enable" was not found. * [gd32/arm/libraries/gd32_drivers/drv_gpio.c] correct gpio number. --- bsp/gd32/arm/libraries/GD32F20x_Firmware_Library/SConscript | 1 + bsp/gd32/arm/libraries/GD32F30x_Firmware_Library/SConscript | 1 + bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/SConscript | 1 + bsp/gd32/arm/libraries/gd32_drivers/drv_gpio.c | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bsp/gd32/arm/libraries/GD32F20x_Firmware_Library/SConscript b/bsp/gd32/arm/libraries/GD32F20x_Firmware_Library/SConscript index a7ba5722b0..dd90248a40 100644 --- a/bsp/gd32/arm/libraries/GD32F20x_Firmware_Library/SConscript +++ b/bsp/gd32/arm/libraries/GD32F20x_Firmware_Library/SConscript @@ -37,6 +37,7 @@ if GetDepend(['RT_USING_DAC']): if GetDepend(['RT_USING_RTC']): src += ['GD32F20x_standard_peripheral/Source/gd32f20x_rtc.c'] + src += ['GD32F20x_standard_peripheral/Source/gd32f20x_pmu.c'] if GetDepend(['RT_USING_WDT']): src += ['GD32F20x_standard_peripheral/Source/gd32f20x_wwdgt.c'] diff --git a/bsp/gd32/arm/libraries/GD32F30x_Firmware_Library/SConscript b/bsp/gd32/arm/libraries/GD32F30x_Firmware_Library/SConscript index 916762e5a4..b994b3ab4c 100644 --- a/bsp/gd32/arm/libraries/GD32F30x_Firmware_Library/SConscript +++ b/bsp/gd32/arm/libraries/GD32F30x_Firmware_Library/SConscript @@ -37,6 +37,7 @@ if GetDepend(['RT_USING_DAC']): if GetDepend(['RT_USING_RTC']): src += ['GD32F30x_standard_peripheral/Source/gd32f30x_rtc.c'] + src += ['GD32F30x_standard_peripheral/Source/gd32f30x_pmu.c'] if GetDepend(['RT_USING_WDT']): src += ['GD32F30x_standard_peripheral/Source/gd32f30x_wwdgt.c'] diff --git a/bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/SConscript b/bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/SConscript index a4007be70a..5e99846451 100644 --- a/bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/SConscript +++ b/bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/SConscript @@ -38,6 +38,7 @@ if GetDepend(['RT_USING_DAC']): if GetDepend(['RT_USING_RTC']): src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c'] + src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_pmu.c'] if GetDepend(['RT_USING_WDT']): src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_wwdgt.c'] diff --git a/bsp/gd32/arm/libraries/gd32_drivers/drv_gpio.c b/bsp/gd32/arm/libraries/gd32_drivers/drv_gpio.c index 73cf5cb620..49f239220f 100644 --- a/bsp/gd32/arm/libraries/gd32_drivers/drv_gpio.c +++ b/bsp/gd32/arm/libraries/gd32_drivers/drv_gpio.c @@ -50,7 +50,7 @@ static const struct pin_index pins[] = GD32_PIN(26, B, 10), GD32_PIN(27, B, 11), GD32_PIN(28, B, 12), - GD32_PIN(39, B, 13), + GD32_PIN(29, B, 13), GD32_PIN(30, B, 14), GD32_PIN(31, B, 15), #endif