2022-07-30 14:10:51 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = Split("""
|
|
|
|
ch56x_sys.c
|
|
|
|
swi_gcc.S
|
|
|
|
""")
|
|
|
|
|
|
|
|
if GetDepend('SOC_SERIES_CH569'):
|
|
|
|
src += ['ch56x_pfic.c']
|
|
|
|
if GetDepend('RT_USING_WDT'):
|
|
|
|
src += ['ch56x_wdt.c']
|
|
|
|
|
2022-08-24 19:59:37 +08:00
|
|
|
if GetDepend('RT_USING_USB_DEVICE'):
|
|
|
|
src += ['ch56x_usbd.c']
|
|
|
|
|
2022-08-10 00:18:20 +08:00
|
|
|
if GetDepend('RT_USING_PWM'):
|
|
|
|
src += ['ch56x_pwm.c']
|
|
|
|
|
2022-07-30 14:10:51 +08:00
|
|
|
if GetDepend('RT_USING_HWTIMER'):
|
|
|
|
src += ['ch56x_timer.c']
|
|
|
|
|
2022-08-02 10:36:49 +08:00
|
|
|
if GetDepend('RT_USING_SPI'):
|
|
|
|
src += ['ch56x_spi.c']
|
|
|
|
|
2022-07-30 14:10:51 +08:00
|
|
|
if GetDepend('RT_USING_PIN'):
|
|
|
|
src += ['ch56x_gpio.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_SERIAL', 'BSP_USING_UART']):
|
|
|
|
src += ['ch56x_uart.c']
|
|
|
|
|
|
|
|
path = [cwd]
|
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend=[''], CPPPATH=path)
|
|
|
|
|
|
|
|
Return('group')
|