aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/can_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-09 11:19:01 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-09 11:19:01 +0000
commitf8a70c1eb1401a4efa87ebc2c97f9782c79a6e7f (patch)
tree1d10bf834234aa99b4a4f69c8a86bbb6f0173e92 /os/hal/platforms/STM32/can_lld.c
parent125a85a1528192fc43f532b570268640eaa550bf (diff)
downloadChibiOS-f8a70c1eb1401a4efa87ebc2c97f9782c79a6e7f.tar.gz
ChibiOS-f8a70c1eb1401a4efa87ebc2c97f9782c79a6e7f.tar.bz2
ChibiOS-f8a70c1eb1401a4efa87ebc2c97f9782c79a6e7f.zip
Fixed bug 3606616.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5389 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/can_lld.c')
-rw-r--r--os/hal/platforms/STM32/can_lld.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/can_lld.c b/os/hal/platforms/STM32/can_lld.c
index 76a50f460..7dab31faf 100644
--- a/os/hal/platforms/STM32/can_lld.c
+++ b/os/hal/platforms/STM32/can_lld.c
@@ -212,6 +212,7 @@ static void can_lld_sce_handler(CANDriver *canp) {
msr = canp->can->MSR;
canp->can->MSR = CAN_MSR_ERRI | CAN_MSR_WKUI | CAN_MSR_SLAKI;
/* Wakeup event.*/
+#if CAN_USE_SLEEP_MODE
if (msr & CAN_MSR_WKUI) {
canp->state = CAN_READY;
canp->can->MCR &= ~CAN_MCR_SLEEP;
@@ -219,6 +220,7 @@ static void can_lld_sce_handler(CANDriver *canp) {
chEvtBroadcastI(&canp->wakeup_event);
chSysUnlockFromIsr();
}
+#endif /* CAN_USE_SLEEP_MODE */
/* Error event.*/
if (msr & CAN_MSR_ERRI) {
flagsmask_t flags;