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_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-10-28 07:57:26 +08:00
|
|
|
if GetDepend('RT_USING_MTD_NAND'):
|
|
|
|
src += ['drv_nand.c']
|
|
|
|
|
2017-04-12 09:25:37 +08:00
|
|
|
# add Ethernet drivers.
|
|
|
|
if GetDepend('RT_USING_LWIP'):
|
2018-03-11 13:39:31 +08:00
|
|
|
src += ['drv_eth.c', 'drv_pcf8574.c']
|
|
|
|
|
|
|
|
# add i2c drivers.
|
|
|
|
if GetDepend(['RT_USING_I2C']) or GetDepend('RT_USING_LWIP'):
|
|
|
|
src += ['drv_i2c.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.
|
2018-03-03 16:34:01 +08:00
|
|
|
if GetDepend('PKG_USING_GUIENGINE'):
|
2017-06-08 15:34:00 +08:00
|
|
|
src += ['drv_lcd.c']
|
2018-03-08 12:21:06 +08:00
|
|
|
|
2017-04-12 09:25:37 +08:00
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|