1Import('RTT_ROOT')
2Import('rtconfig')
3from building import *
4
5cwd = GetCurrentDir()
6
7# add the general drivers.
8src = Split("""
9""")
10
11if GetDepend(['RT_USING_PIN']):
12    src += ['drv_gpio.c']
13
14if GetDepend(['RT_USING_SERIAL']):
15    src += ['drv_uart.c']
16
17if GetDepend(['RT_USING_PWM']):
18    src += ['drv_pwm.c']
19
20if GetDepend(['RT_USING_SPI']):
21    src += ['drv_spi.c']
22
23if GetDepend(['RT_USING_I2C']):
24    src += ['drv_i2c.c']
25
26if GetDepend(['BSP_USING_ONCHIP_RTC']):
27    src += ['drv_rtc.c']
28
29if GetDepend(['BSP_USING_WDT']):
30    src += ['drv_wdt.c']
31
32path =  [cwd]
33
34group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
35
36Return('group')
37