1Import('RTT_ROOT') 2from building import * 3 4cwd = GetCurrentDir() 5src = Split(""" 6dev_i2c_core.c 7dev_i2c_dev.c 8""") 9 10if GetDepend('RT_USING_I2C_BITOPS'): 11 src = src + ['dev_i2c_bit_ops.c'] 12if GetDepend('RT_USING_SOFT_I2C'): 13 src = src + ['dev_soft_i2c.c'] 14if GetDepend(['RT_USING_DM']): 15 src += ['dev_i2c_bus.c', 'dev_i2c_dm.c'] 16 17# The set of source files associated with this SConscript file. 18path = [cwd + '/../include'] 19 20group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_I2C'], CPPPATH = path) 21 22Return('group') 23