1Import('RTT_ROOT') 2Import('rtconfig') 3from building import * 4 5cwd = os.path.join(str(Dir('#')), 'drivers') 6 7# add the general drvers. 8src = Split(""" 9board.c 10usart.c 11""") 12 13# add Ethernet drvers. 14if GetDepend('RT_USING_LED'): 15 src += ['led.c'] 16 17if GetDepend('RT_USING_SDIO'): 18 src += ['at91_mci.c'] 19 20if GetDepend('RT_USING_LWIP'): 21 src += ['macb.c'] 22 23if GetDepend('RT_USING_I2C') and GetDepend('RT_USING_I2C_BITOPS'): 24 src += ['at91_i2c_gpio.c'] 25 26 27CPPPATH = [cwd] 28 29group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) 30 31Return('group') 32