Meco Man ee3ecf82d7 [bsp][ch32-rsicv][sconscript] add drv_common.c
attach bf4594870e9f8a533450d34a1ea2b4f035e89c96
2023-06-14 18:49:04 -04:00

45 lines
966 B
Python

from building import *
cwd = GetCurrentDir()
src = ['drv_common.c']
path = [cwd]
if GetDepend('SOC_RISCV_FAMILY_CH32'):
if GetDepend('BSP_USING_GPIO'):
src += ['drv_gpio.c']
if GetDepend('BSP_USING_UART'):
src += ['drv_usart.c']
if GetDepend('BSP_USING_ADC'):
src += ['drv_adc.c']
if GetDepend('BSP_USING_DAC'):
src += ['drv_dac.c']
if GetDepend('BSP_USING_SOFT_I2C'):
src += ['drv_soft_i2c.c']
if GetDepend('BSP_USING_SPI'):
src += ['drv_soft_spi.c','drv_spi.c']
if GetDepend('BSP_USING_RTC'):
src += ['drv_rtc.c']
if GetDepend('BSP_USING_IWDT'):
src += ['drv_iwdt.c']
if GetDepend('BSP_USING_CAN'):
src += ['drv_can.c']
if GetDepend('BSP_USING_PWM'):
src += ['drv_pwm.c']
if GetDepend('BSP_USING_HWTIMER'):
src += ['drv_hwtimer.c']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
Return('group')