2022-04-04 11:07:49 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2022-09-30 23:07:52 +08:00
|
|
|
src = []
|
|
|
|
path = [cwd]
|
2022-04-04 11:07:49 +08:00
|
|
|
|
2022-08-23 14:13:33 +08:00
|
|
|
if GetDepend('SOC_RISCV_FAMILY_CH32'):
|
2022-04-04 11:07:49 +08:00
|
|
|
|
2022-09-30 23:07:52 +08:00
|
|
|
if GetDepend('BSP_USING_GPIO'):
|
2022-04-04 11:07:49 +08:00
|
|
|
src += ['drv_gpio.c']
|
|
|
|
|
2022-09-30 23:07:52 +08:00
|
|
|
if GetDepend('BSP_USING_UART'):
|
2022-04-04 11:07:49 +08:00
|
|
|
src += ['drv_usart.c']
|
|
|
|
|
2022-09-30 23:07:52 +08:00
|
|
|
if GetDepend('BSP_USING_ADC'):
|
2022-09-17 10:50:57 +08:00
|
|
|
src += ['drv_adc.c']
|
2022-04-04 11:07:49 +08:00
|
|
|
|
2022-09-18 21:32:56 +08:00
|
|
|
if GetDepend(['BSP_USING_DAC']):
|
|
|
|
src += ['drv_dac.c']
|
|
|
|
|
2022-09-30 23:07:52 +08:00
|
|
|
if GetDepend(['BSP_USING_I2C_BITOPS']):
|
|
|
|
src += ['drv_soft_i2c.c']
|
2022-09-19 22:33:55 +08:00
|
|
|
|
2022-09-30 23:07:52 +08:00
|
|
|
if GetDepend('BSP_USING_RTC'):
|
2022-09-22 17:12:30 +08:00
|
|
|
src += ['drv_rtc.c']
|
|
|
|
|
2022-09-30 23:07:52 +08:00
|
|
|
if GetDepend('BSP_USING_IWDT'):
|
2022-09-29 09:09:53 +08:00
|
|
|
src += ['drv_iwdt.c']
|
2022-10-09 10:32:29 +08:00
|
|
|
|
|
|
|
if GetDepend('BSP_USING_CAN'):
|
|
|
|
src += ['drv_can.c']
|
2022-09-29 09:09:53 +08:00
|
|
|
|
2022-04-04 11:07:49 +08:00
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
|
|
|
|
|
|
|
|
Return('group')
|