stm32/f1/can: Replace mistaken logical operators with bitwise operators.

also: remove unnecessary parenthesis
This commit is contained in:
Jeff Ciesielski 2012-10-19 23:05:37 -07:00
parent 1cb373464c
commit 24a35126bf
1 changed files with 4 additions and 4 deletions

View File

@ -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. */