summaryrefslogtreecommitdiff
path: root/bsp/swm320-lq100/drivers/SConscript
blob: 0d9187d78ae7f82a53090c90fa40defd3552a761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# RT-Thread building script for component

from building import *

cwd = GetCurrentDir()

# add the general drivers.
src = Split("""
board.c
""")

# add gpio driver code
if  GetDepend(['BSP_USING_GPIO']):
    src += ['drv_gpio.c']

# add serial driver code
if  GetDepend('BSP_USING_UART0') or GetDepend('BSP_USING_UART1') or GetDepend('BSP_USING_UART2') or GetDepend('BSP_USING_UART3'):
    src += ['drv_uart.c']

# add spi driver code
if  GetDepend('BSP_USING_SPI0') or GetDepend('BSP_USING_SPI1'):
    src += ['drv_spi.c']

# add i2c driver code
if  GetDepend(['BSP_USING_I2C']):
    src += ['drv_i2c.c']

# add sram driver code
if  GetDepend(['BSP_USING_EXT_SRAM']):
    src += ['drv_sram.c']

# add nor flash driver code
if  GetDepend(['BSP_USING_NOR_FLASH']):
    src += ['drv_nor_flash.c']

# add pwm driver code
if  GetDepend('BSP_USING_PWM0') or GetDepend('BSP_USING_PWM1') or GetDepend('BSP_USING_PWM2') or GetDepend('BSP_USING_PWM3'):
    src += ['drv_pwm.c']

# add rtc driver code
if GetDepend(['BSP_USING_RTC']):
    src += ['drv_rtc.c']

# add hwtimer driver code
if GetDepend(['BSP_USING_WDT']):
    src += ['drv_iwg.c']

# add hwtimer driver code
if  GetDepend('BSP_USING_HWTIMER0') or GetDepend('BSP_USING_HWTIMER1') or  GetDepend('BSP_USING_HWTIMER2') or GetDepend('BSP_USING_HWTIMER3') or GetDepend('BSP_USING_HWTIMER4') or GetDepend('BSP_USING_HWTIMER5'):
    src += ['drv_hwtimer.c']

CPPPATH = [cwd]

group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)

Return('group')