summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorgbcwbz <[email protected]>2016-04-14 23:47:32 +0800
committergbcwbz <[email protected]>2016-04-14 23:47:32 +0800
commit0d63eb5f6d2f94ca3507df72072d50f1c0e94698 (patch)
tree4e6f8a7faf3458605f52dfd58a815c3f72cfba5e /bsp
parentb420e83da43641089727dd7a68cb205d513121cb (diff)
fix hardfault when RT_CAN_USING_BUS_HOOK is enabled in bsp/stm32f10x
function `rt_pin_write` is invoked by function `can_bus_hook`, and it should to be initialized by gpio.c. but gpio.c was not added in SConscript
Diffstat (limited to 'bsp')
-rw-r--r--bsp/stm32f10x/drivers/SConscript3
-rw-r--r--bsp/stm32f10x/rtconfig.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/bsp/stm32f10x/drivers/SConscript b/bsp/stm32f10x/drivers/SConscript
index 6be188e0f0..6a1ab42bb7 100644
--- a/bsp/stm32f10x/drivers/SConscript
+++ b/bsp/stm32f10x/drivers/SConscript
@@ -12,6 +12,9 @@ led.c
usart.c
""")
+if GetDepend(['RT_USING_PIN']):
+ src += ['gpio.c']
+
# add canbus driver.
if GetDepend('RT_USING_CAN'):
src += ['bxcan.c']
diff --git a/bsp/stm32f10x/rtconfig.h b/bsp/stm32f10x/rtconfig.h
index 01ef716a19..f448846001 100644
--- a/bsp/stm32f10x/rtconfig.h
+++ b/bsp/stm32f10x/rtconfig.h
@@ -84,7 +84,7 @@
#define RT_USING_CAN
-//#define RT_CAN_USING_BUS_HOOK
+#define RT_CAN_USING_BUS_HOOK
#define RT_CAN_USING_HDR
/* SECTION: device filesystem */