rt-thread/bsp/hc32/libraries/hc32_drivers/SConscript

47 lines
901 B
Python
Raw Normal View History

Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
# add the general drivers.
src = Split("""
drv_irq.c
""")
if GetDepend(['RT_USING_PIN']):
src += ['drv_gpio.c']
if GetDepend(['RT_USING_SERIAL']):
src += ['drv_usart.c']
if GetDepend(['RT_USING_SPI']):
src += ['drv_spi.c']
if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
src += ['drv_soft_i2c.c']
if GetDepend(['BSP_USING_ETH', 'RT_USING_LWIP']):
src += ['drv_eth.c']
if GetDepend(['RT_USING_ADC']):
src += ['drv_adc.c']
if GetDepend(['RT_USING_CAN']):
src += ['drv_can.c']
2023-01-09 10:14:23 +08:00
if GetDepend(['RT_USING_RTC']):
src += ['drv_rtc.c']
2023-01-09 10:14:23 +08:00
if GetDepend(['RT_USING_WDT']):
src += ['drv_wdt.c']
2022-06-29 00:00:58 +08:00
if GetDepend(['RT_USING_PWM', 'BSP_USING_PWM_TMRA']):
src += ['drv_pwm_tmra.c']
path = [cwd]
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
Return('group')