Skip to content

Commit ba8c796

Browse files
committed
1 parent 28f0806 commit ba8c796

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/filter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl StandardFilter {
3737
filter: 0x0,
3838
mask: 0x0,
3939
},
40-
action: Action::StoreInFifo0,
40+
action: Action::StoreInFifo1,
4141
}
4242
}
4343

@@ -80,7 +80,7 @@ impl ExtendedFilter {
8080
filter: 0x0,
8181
mask: 0x0,
8282
},
83-
action: Action::StoreInFifo0,
83+
action: Action::StoreInFifo1,
8484
}
8585
}
8686

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ where
13561356
// Check if there is a request pending to abort
13571357
if self.has_pending_frame(idx) {
13581358
let idx: u8 = idx.into();
1359-
let idx: u32 = idx as u32;
1359+
let idx: u32 = 1u32 << (idx as u32);
13601360

13611361
// Abort Request
13621362
can.txbcr.write(|w| unsafe { w.cr().bits(idx) });
@@ -1377,7 +1377,7 @@ where
13771377
fn has_pending_frame(&self, idx: Mailbox) -> bool {
13781378
let can = self.registers();
13791379
let idx: u8 = idx.into();
1380-
let idx: u32 = idx as u32;
1380+
let idx: u32 = 1u32 << (idx as u32);
13811381

13821382
can.txbrp.read().trp().bits() & idx != 0
13831383
}

src/message_ram/txbuffer_element.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl<'a> ID_W<'a> {
137137
#[allow(dead_code)]
138138
pub unsafe fn bits(self, value: u32) -> &'a mut W {
139139
self.w.bits[0] =
140-
(self.w.bits[0] & !(0x0FFFFFFF)) | ((value as u32) & 0x0FFFFFFF);
140+
(self.w.bits[0] & !(0x1FFFFFFF)) | ((value as u32) & 0x1FFFFFFF);
141141
self.w
142142
}
143143
}

0 commit comments

Comments
 (0)