Skip to content

Commit 14d579a

Browse files
committed
Fix && -> & typo
1 parent fd24700 commit 14d579a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

targets/TARGET_NXP/TARGET_LPC15XX/can_api.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,18 +267,18 @@ void can_irq_set(can_t *obj, CanIrqType type, uint32_t enable) {
267267

268268
// Put CAN in Reset Mode and enable interrupt
269269
can_disable(obj);
270-
if (!(enabled_irqs && IRQ_ENABLE_ANY)) {
270+
if (!(enabled_irqs & IRQ_ENABLE_ANY)) {
271271
LPC_C_CAN0->CANCNTL &= ~(1UL << 1 | 1UL << 2 | 1UL << 3);
272272
} else {
273273
LPC_C_CAN0->CANCNTL |= 1UL << 1;
274274
// Use status interrupts instead of message interrupts to avoid
275275
// stomping over potential filter configurations.
276-
if (enabled_irqs && IRQ_ENABLE_STATUS) {
276+
if (enabled_irqs & IRQ_ENABLE_STATUS) {
277277
LPC_C_CAN0->CANCNTL |= 1UL << 2;
278278
} else {
279279
LPC_C_CAN0->CANCNTL &= ~(1UL << 2);
280280
}
281-
if (enabled_irqs && IRQ_ENABLE_ERROR) {
281+
if (enabled_irqs & IRQ_ENABLE_ERROR) {
282282
LPC_C_CAN0->CANCNTL |= 1UL << 3;
283283
} else {
284284
LPC_C_CAN0->CANCNTL &= ~(1UL << 3);

0 commit comments

Comments
 (0)