This commit is contained in:
Bernard Xiong 2016-04-05 14:41:29 +08:00
commit a128dcc6ea
4 changed files with 16 additions and 4 deletions

View File

@ -3,7 +3,15 @@ Import('rtconfig')
from building import *
cwd = os.path.join(str(Dir('#')), 'applications')
src = Glob('*.c')
src = Split("""
application.c
startup.c
""")
if GetDepend('RT_USING_CAN'):
src += ['canapp.c']
CPPPATH = [cwd, str(Dir('#'))]
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)

View File

@ -12,6 +12,10 @@ led.c
usart.c
""")
# add canbus driver.
if GetDepend('RT_USING_CAN'):
src += ['bxcan.c']
# add Ethernet drivers.
if GetDepend('RT_USING_LWIP'):
src += ['dm9000a.c']

View File

@ -1575,4 +1575,4 @@ int stm32_bxcan_init(void)
}
INIT_BOARD_EXPORT(stm32_bxcan_init);
#endif /*RT_USING_CAN2*/
#endif /*RT_USING_CAN*/

View File

@ -82,7 +82,7 @@
#define RT_USING_PIN
#define RT_USING_CAN
//#define RT_USING_CAN
#define RT_CAN_USING_BUS_HOOK