rt-thread-official/bsp/wch/risc-v/Libraries/ch32_drivers/SConscript

34 lines
729 B
Python
Raw Normal View History

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']
2022-09-18 21:32:56 +08:00
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']
path = [cwd]
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
Return('group')