diff options
Diffstat (limited to 'os/hal/platforms/STM32/can_lld.c')
-rw-r--r-- | os/hal/platforms/STM32/can_lld.c | 2 |
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;
|