2015-08-28 16:57:41 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = os.path.join(str(Dir('#')), 'drivers')
|
|
|
|
|
|
|
|
# add the general drivers.
|
|
|
|
src = Split("""
|
|
|
|
board.c
|
|
|
|
led.c
|
2020-04-10 21:40:33 +08:00
|
|
|
uart.c
|
2015-08-28 16:57:41 +08:00
|
|
|
""")
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_DFS'):
|
|
|
|
src += ['sdcard.c']
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_LWIP'):
|
|
|
|
src += ['dm9000.c']
|
|
|
|
|
2020-04-11 17:56:02 +08:00
|
|
|
if GetDepend('PKG_USING_GUIENGINE'):
|
|
|
|
src += ['touch.c', 'key.c']
|
2015-08-28 16:57:41 +08:00
|
|
|
|
|
|
|
if GetDepend('RT_USING_RTI'):
|
2020-04-11 17:56:02 +08:00
|
|
|
src += ['rti_stub.c']
|
2015-08-28 16:57:41 +08:00
|
|
|
|
2020-04-11 17:56:02 +08:00
|
|
|
if GetDepend('PKG_USING_GUIENGINE'):
|
2015-08-28 16:57:41 +08:00
|
|
|
if rtconfig.RT_USING_LCD_TYPE == 'PNL_A70':
|
|
|
|
src += ['lcd_a70.c']
|
|
|
|
elif rtconfig.RT_USING_LCD_TYPE == 'PNL_N35':
|
|
|
|
src += ['lcd_n35.c']
|
|
|
|
elif rtconfig.RT_USING_LCD_TYPE == 'PNL_T35':
|
|
|
|
src += ['lcd_t35.c']
|
|
|
|
elif rtconfig.RT_USING_LCD_TYPE == 'PNL_X35':
|
|
|
|
src += ['lcd_x35.c']
|
|
|
|
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|
|
|
|
|