2017-10-20 14:52:36 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
2017-11-15 21:14:09 +08:00
|
|
|
cwd = GetCurrentDir()
|
2017-10-20 14:52:36 +08:00
|
|
|
|
|
|
|
# add the general drivers.
|
|
|
|
src = Split("""
|
|
|
|
board.c
|
|
|
|
stm32f1xx_it.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_PIN']):
|
2017-11-15 21:14:09 +08:00
|
|
|
src += ['drv_gpio.c']
|
2017-10-20 14:52:36 +08:00
|
|
|
if GetDepend(['RT_USING_SERIAL']):
|
2017-11-15 21:14:09 +08:00
|
|
|
src += ['drv_usart.c']
|
2017-10-20 14:52:36 +08:00
|
|
|
if GetDepend(['RT_USING_SPI']):
|
2017-11-15 21:14:09 +08:00
|
|
|
src += ['drv_spi.c']
|
|
|
|
if GetDepend(['RT_USING_USB_DEVICE']):
|
|
|
|
src += ['drv_usb.c']
|
2018-01-16 18:05:16 +08:00
|
|
|
if GetDepend(['RT_USING_SDCARD']):
|
|
|
|
src += ['drv_sdcard.c']
|
2017-10-20 14:52:36 +08:00
|
|
|
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|