Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
Browse files Browse the repository at this point in the history
  • Loading branch information
BernardXiong committed Apr 5, 2016
2 parents 49b1172 + 121f290 commit a128dcc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
12 changes: 10 additions & 2 deletions bsp/stm32f10x/applications/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@ Import('RTT_ROOT')
Import('rtconfig')
from building import *

cwd = os.path.join(str(Dir('#')), 'applications')
src = Glob('*.c')
cwd = os.path.join(str(Dir('#')), 'applications')

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)
Expand Down
4 changes: 4 additions & 0 deletions bsp/stm32f10x/drivers/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion bsp/stm32f10x/drivers/bxcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,4 +1575,4 @@ int stm32_bxcan_init(void)
}
INIT_BOARD_EXPORT(stm32_bxcan_init);

#endif /*RT_USING_CAN2*/
#endif /*RT_USING_CAN*/
2 changes: 1 addition & 1 deletion bsp/stm32f10x/rtconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

#define RT_USING_PIN

#define RT_USING_CAN
//#define RT_USING_CAN

#define RT_CAN_USING_BUS_HOOK

Expand Down

0 comments on commit a128dcc

Please sign in to comment.