aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/stm32/f1/can.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stm32/f1/can.c b/lib/stm32/f1/can.c
index 46d0e65..9bd23cb 100644
--- a/lib/stm32/f1/can.c
+++ b/lib/stm32/f1/can.c
@@ -87,14 +87,14 @@ int can_init(u32 canport, bool ttcm, bool abom, bool awum, bool nart,
CAN_MCR(canport) &= ~CAN_MCR_TXFP;
if (silent)
- CAN_BTR(canport) |= (CAN_BTR_SILM);
+ CAN_BTR(canport) |= CAN_BTR_SILM;
else
- CAN_BTR(canport) &= !(CAN_BTR_SILM);
+ CAN_BTR(canport) &= ~CAN_BTR_SILM;
if (loopback)
- CAN_BTR(canport) |= (CAN_BTR_LBKM);
+ CAN_BTR(canport) |= CAN_BTR_LBKM;
else
- CAN_BTR(canport) &= !(CAN_BTR_LBKM);
+ CAN_BTR(canport) &= ~CAN_BTR_LBKM;
/* Set bit timings. */