diff options
| author | Bernard Xiong <[email protected]> | 2016-04-05 14:41:29 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2016-04-05 14:41:29 +0800 |
| commit | a128dcc6ea78266a20b279f6280320d3be62c0d8 (patch) | |
| tree | 76e59420af164af66a28f86946e9a8315e51041a | |
| parent | 49b1172b8d8e38d52dac79bbd87ae40c68d7d742 (diff) | |
| parent | 121f290fbd63313279f0788b538a400200290e02 (diff) | |
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
| -rw-r--r-- | bsp/stm32f10x/applications/SConscript | 12 | ||||
| -rw-r--r-- | bsp/stm32f10x/drivers/SConscript | 4 | ||||
| -rw-r--r-- | bsp/stm32f10x/drivers/bxcan.c | 2 | ||||
| -rw-r--r-- | bsp/stm32f10x/rtconfig.h | 2 |
4 files changed, 16 insertions, 4 deletions
diff --git a/bsp/stm32f10x/applications/SConscript b/bsp/stm32f10x/applications/SConscript index 01eb940dfb..4289435f37 100644 --- a/bsp/stm32f10x/applications/SConscript +++ b/bsp/stm32f10x/applications/SConscript @@ -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) diff --git a/bsp/stm32f10x/drivers/SConscript b/bsp/stm32f10x/drivers/SConscript index 30a848fc40..6be188e0f0 100644 --- a/bsp/stm32f10x/drivers/SConscript +++ b/bsp/stm32f10x/drivers/SConscript @@ -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'] diff --git a/bsp/stm32f10x/drivers/bxcan.c b/bsp/stm32f10x/drivers/bxcan.c index e19d971123..071d05e8cc 100644 --- a/bsp/stm32f10x/drivers/bxcan.c +++ b/bsp/stm32f10x/drivers/bxcan.c @@ -1575,4 +1575,4 @@ int stm32_bxcan_init(void) } INIT_BOARD_EXPORT(stm32_bxcan_init); -#endif /*RT_USING_CAN2*/ +#endif /*RT_USING_CAN*/ diff --git a/bsp/stm32f10x/rtconfig.h b/bsp/stm32f10x/rtconfig.h index f448846001..e233006509 100644 --- a/bsp/stm32f10x/rtconfig.h +++ b/bsp/stm32f10x/rtconfig.h @@ -82,7 +82,7 @@ #define RT_USING_PIN -#define RT_USING_CAN +//#define RT_USING_CAN #define RT_CAN_USING_BUS_HOOK |
