4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-23 14:17:24 +08:00
charlown c6c8201bd4
[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.
2022-07-25 10:18:15 +08:00

60 lines
1.9 KiB
Python

import rtconfig
from building import *
# get current directory
cwd = GetCurrentDir()
# The set of source files associated with this SConscript file.
src = Split('''
CMSIS/GD/GD32F30x/Source/system_gd32f30x.c
GD32F30x_standard_peripheral/Source/gd32f30x_gpio.c
GD32F30x_standard_peripheral/Source/gd32f30x_rcu.c
GD32F30x_standard_peripheral/Source/gd32f30x_exti.c
GD32F30x_standard_peripheral/Source/gd32f30x_misc.c
''')
if GetDepend(['RT_USING_SERIAL']):
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_usart.c']
if GetDepend(['RT_USING_I2C']):
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_i2c.c']
if GetDepend(['RT_USING_SPI']):
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_spi.c']
if GetDepend(['RT_USING_CAN']):
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_can.c']
if GetDepend(['BSP_USING_ETH']):
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_enet.c']
if GetDepend(['RT_USING_ADC']):
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_adc.c']
if GetDepend(['RT_USING_DAC']):
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_dac.c']
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']
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_fwdgt.c']
if GetDepend(['RT_USING_SDIO']):
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_sdio.c']
src += ['GD32F30x_standard_peripheral/Source/gd32f30x_dma.c']
path = [
cwd + '/CMSIS/GD/GD32F30x/Include',
cwd + '/CMSIS',
cwd + '/GD32F30x_standard_peripheral/Include',]
CPPDEFINES = ['USE_STDPERIPH_DRIVER']
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')