2013-01-08 22:40:58 +08:00
|
|
|
from building import *
|
2017-12-10 16:53:03 +08:00
|
|
|
import rtconfig
|
2013-01-08 22:40:58 +08:00
|
|
|
|
2014-07-31 14:42:37 +08:00
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = ['spi_core.c', 'spi_dev.c']
|
2014-08-29 21:53:28 +08:00
|
|
|
CPPPATH = [cwd, cwd + '/../include']
|
2017-12-10 16:53:03 +08:00
|
|
|
LOCAL_CCFLAGS = ''
|
2014-07-31 14:42:37 +08:00
|
|
|
|
|
|
|
src_device = []
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_SPI_WIFI'):
|
|
|
|
src_device += ['spi_wifi_rw009.c']
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_W25QXX'):
|
|
|
|
src_device += ['spi_flash_w25qxx.c']
|
2017-02-13 19:37:53 +08:00
|
|
|
|
|
|
|
if GetDepend('RT_USING_W25QXX_MTD'):
|
|
|
|
src_device += ['spi_flash_w25qxx_mtd.c']
|
|
|
|
|
2014-07-31 14:42:37 +08:00
|
|
|
if GetDepend('RT_USING_ENC28J60'):
|
|
|
|
src_device += ['enc28j60.c']
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_AT45DBXX'):
|
|
|
|
src_device += ['spi_flash_at45dbxx.c']
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_SST25VFXX'):
|
|
|
|
src_device += ['spi_flash_sst25vfxx.c']
|
|
|
|
|
2016-05-20 14:07:32 +08:00
|
|
|
if GetDepend('RT_USING_GD'):
|
|
|
|
src_device += ['spi_flash_gd.c']
|
2018-02-06 20:26:49 +08:00
|
|
|
|
|
|
|
if GetDepend('RT_USING_SPI_MSD'):
|
|
|
|
src_device += ['spi_msd.c']
|
|
|
|
|
2016-10-09 09:06:01 +08:00
|
|
|
if GetDepend('RT_USING_SFUD'):
|
|
|
|
src_device += ['spi_flash_sfud.c', 'sfud/src/sfud.c']
|
|
|
|
CPPPATH += [cwd + '/sfud/inc']
|
|
|
|
if GetDepend('RT_SFUD_USING_SFDP'):
|
|
|
|
src_device += ['sfud/src/sfud_sfdp.c']
|
2017-12-10 16:53:03 +08:00
|
|
|
if rtconfig.CROSS_TOOL == 'gcc':
|
|
|
|
LOCAL_CCFLAGS += ' -std=c99'
|
|
|
|
elif rtconfig.CROSS_TOOL == 'keil':
|
|
|
|
LOCAL_CCFLAGS += ' --c99'
|
2016-05-20 14:07:32 +08:00
|
|
|
|
2014-07-31 14:42:37 +08:00
|
|
|
src += src_device
|
|
|
|
|
2017-12-10 16:53:03 +08:00
|
|
|
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SPI'], CPPPATH = CPPPATH, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
Return('group')
|