mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-27 05:27:24 +08:00
ee57f2d0da
添加了 ch32v307 看门狗驱动,已在 ch32v307评估板验证; 修改了 rt-thread\bsp\wch\risc-v\ch32v307v-r1\board 目录下的 Kconfig 文件; 修改了 rt-thread\bsp\wch\risc-v\Libraries\ch32_drivers 目录下的 SConscript 文件; 添加了 rt-thread\bsp\wch\risc-v\Libraries\ch32_drivers 目录下的 drv_iwdt.c 文件;
40 lines
897 B
Python
40 lines
897 B
Python
Import('RTT_ROOT')
|
|
Import('rtconfig')
|
|
from building import *
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
# add the general drivers.
|
|
src = Split("""
|
|
""")
|
|
|
|
if GetDepend('SOC_RISCV_FAMILY_CH32'):
|
|
|
|
if GetDepend('RT_USING_PIN'):
|
|
src += ['drv_gpio.c']
|
|
|
|
if GetDepend(['RT_USING_SERIAL', 'BSP_USING_UART']):
|
|
src += ['drv_usart.c']
|
|
|
|
if GetDepend('RT_USING_ADC'):
|
|
src += ['drv_adc.c']
|
|
|
|
if GetDepend(['BSP_USING_DAC']):
|
|
src += ['drv_dac.c']
|
|
|
|
if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
|
|
if GetDepend('BSP_USING_I2C1') or GetDepend('BSP_USING_I2C2'):
|
|
src += ['drv_soft_i2c.c']
|
|
|
|
if GetDepend(['RT_USING_RTC', 'BSP_USING_RTC']):
|
|
src += ['drv_rtc.c']
|
|
|
|
if GetDepend(['RT_USING_WDT', 'BSP_USING_IWDT']):
|
|
src += ['drv_iwdt.c']
|
|
|
|
path = [cwd]
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
|
|
|
|
Return('group')
|