rt-thread-official/bsp/stm32f10x/drivers/SConscript

54 lines
1.0 KiB
Python
Raw Normal View History

Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = os.path.join(str(Dir('#')), 'drivers')
2014-09-08 19:53:55 +08:00
# add the general drivers.
src = Split("""
board.c
2013-07-12 18:20:27 +08:00
stm32f10x_it.c
led.c
usart.c
""")
if GetDepend(['RT_USING_PIN']):
src += ['gpio.c']
2018-09-29 18:44:53 +08:00
if GetDepend(['BSP_USING_I2C']):
2018-09-29 15:42:33 +08:00
src += ['i2c.c']
# add canbus driver.
if GetDepend('RT_USING_CAN'):
src += ['bxcan.c']
2014-09-08 19:53:55 +08:00
# add Ethernet drivers.
if GetDepend('RT_USING_LWIP'):
src += ['dm9000a.c']
2014-09-08 19:53:55 +08:00
# add Ethernet drivers.
if GetDepend('RT_USING_DFS'):
src += ['sdcard.c']
2014-09-08 19:53:55 +08:00
# add Ethernet drivers.
if GetDepend('RT_USING_RTC'):
src += ['stm32f1_rtc.c']
2014-09-08 19:53:55 +08:00
# add Ethernet drivers.
if GetDepend('PKG_USING_GUIENGINE'):
src += ['touch.c']
if rtconfig.RT_USING_LCD_TYPE == 'ILI932X':
src += ['ili_lcd_general.c']
elif rtconfig.RT_USING_LCD_TYPE == 'SSD1289':
src += ['ssd1289.c']
2017-07-14 13:55:19 +08:00
# add wdt driver.
if GetDepend('RT_USING_WDT'):
src += ['stm32f1_wdg.c']
CPPPATH = [cwd]
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
Return('group')