2017-04-12 09:25:37 +08:00
|
|
|
from building import *
|
|
|
|
|
2017-10-09 15:12:03 +08:00
|
|
|
cwd = GetCurrentDir()
|
2017-04-12 09:25:37 +08:00
|
|
|
|
|
|
|
# add the general drivers.
|
|
|
|
src = Split("""
|
|
|
|
board.c
|
|
|
|
stm32f4xx_it.c
|
|
|
|
usart.c
|
|
|
|
drv_sdram.c
|
|
|
|
drv_rtc.c
|
|
|
|
drv_nand.c
|
|
|
|
drv_mpu.c
|
|
|
|
""")
|
|
|
|
|
2017-10-09 15:12:03 +08:00
|
|
|
# add sdio driver
|
|
|
|
if GetDepend('RT_USING_DFS'):
|
|
|
|
src += ['drv_sdio_sd.c']
|
2017-10-09 11:38:52 +08:00
|
|
|
|
2017-04-12 09:25:37 +08:00
|
|
|
# add Ethernet drivers.
|
|
|
|
if GetDepend('RT_USING_LWIP'):
|
2017-06-09 14:58:33 +08:00
|
|
|
src += ['drv_eth.c', 'drv_iic.c', 'drv_pcf8574.c']
|
2017-04-12 09:25:37 +08:00
|
|
|
|
|
|
|
# add gpio drivers.
|
|
|
|
if GetDepend('RT_USING_PIN'):
|
|
|
|
src += ['gpio.c']
|
|
|
|
|
2017-06-07 21:04:05 +08:00
|
|
|
# add spi drivers.
|
|
|
|
if GetDepend('RT_USING_SPI'):
|
|
|
|
src += ['drv_spi.c']
|
|
|
|
|
|
|
|
# add spi flash drivers.
|
|
|
|
if GetDepend('RT_USING_SFUD'):
|
|
|
|
src += ['drv_spi_flash.c']
|
|
|
|
|
2017-06-08 15:34:00 +08:00
|
|
|
# add lcd drivers.
|
|
|
|
if GetDepend('RT_USING_GUIENGINE'):
|
|
|
|
src += ['drv_lcd.c']
|
|
|
|
|
2017-04-12 09:25:37 +08:00
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|