1from building import *
2
3cwd = GetCurrentDir()
4
5src = Split("""
6ch56x_sys.c
7swi_gcc.S
8""")
9
10if GetDepend('SOC_SERIES_CH569'):
11    src += ['ch56x_pfic.c']
12    if GetDepend('RT_USING_WDT'):
13        src += ['ch56x_wdt.c']
14
15if GetDepend('RT_USING_USB_DEVICE'):
16    src += ['ch56x_usbd.c']
17
18if GetDepend('RT_USING_PWM'):
19    src += ['ch56x_pwm.c']
20
21if GetDepend('RT_USING_HWTIMER'):
22    src += ['ch56x_timer.c']
23
24if GetDepend('RT_USING_SPI'):
25    src += ['ch56x_spi.c']
26
27if GetDepend('RT_USING_PIN'):
28    src += ['ch56x_gpio.c']
29
30if GetDepend(['RT_USING_SERIAL', 'BSP_USING_UART']):
31    src += ['ch56x_uart.c']
32
33path = [cwd]
34
35group = DefineGroup('Drivers', src, depend=[''], CPPPATH=path)
36
37Return('group')
38