aboutsummaryrefslogtreecommitdiff
path: root/lib/stm32/f1
diff options
context:
space:
mode:
authorJeff Ciesielski2012-10-19 23:05:37 -0700
committerJeff Ciesielski2012-10-19 23:05:37 -0700
commit24a35126bfcf8b462cc167307c274106e7128a3f (patch)
treeab0b7110e91baff7b26f8fcde7c5d3c868fc44f5 /lib/stm32/f1
parent1cb373464cbd43e55fecbebcf9f8120fda36a6d0 (diff)
stm32/f1/can: Replace mistaken logical operators with bitwise operators.
also: remove unnecessary parenthesis
Diffstat (limited to 'lib/stm32/f1')
-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. */