Adjust for bxcan API.

This commit is contained in:
Bob McWhirter 2021-11-15 12:00:26 -05:00
parent 57ca241658
commit 436eb81fc2

View file

@ -26,12 +26,13 @@ fn main() -> ! {
let mut can = Can::new(p.CAN1, p.PA11, p.PA12); let mut can = Can::new(p.CAN1, p.PA11, p.PA12);
can.modify_filters().enable_bank(0, Mask32::accept_all());
can.modify_config() can.modify_config()
.set_bit_timing(0x001c0003) // http://www.bittiming.can-wiki.info/ .set_bit_timing(0x001c0003) // http://www.bittiming.can-wiki.info/
.set_loopback(true) // Receive own frames .set_loopback(true) // Receive own frames
.set_silent(true); .set_silent(true)
can.modify_filters().enable_bank(0, Mask32::accept_all()); .enable();
unwrap!(nb::block!(can.enable()));
let mut i: u8 = 0; let mut i: u8 = 0;
loop { loop {