diff options
author | Bob McWhirter <bmcwhirt@redhat.com> | 2021-11-15 12:00:26 -0500 |
---|---|---|
committer | Bob McWhirter <bmcwhirt@redhat.com> | 2021-11-15 12:00:26 -0500 |
commit | 436eb81fc2938285c6cd7494e9e256256b836f60 (patch) | |
tree | 02db17d94afc23dcb3da09697852dcd3ed79a0b0 /examples/stm32f4/src/bin | |
parent | 57ca241658f95e4e30940b29dff541b2ee1e1b56 (diff) | |
download | embassy-436eb81fc2938285c6cd7494e9e256256b836f60.zip |
Adjust for bxcan API.
Diffstat (limited to 'examples/stm32f4/src/bin')
-rw-r--r-- | examples/stm32f4/src/bin/can.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/stm32f4/src/bin/can.rs b/examples/stm32f4/src/bin/can.rs index 21b9a600..4c575aa8 100644 --- a/examples/stm32f4/src/bin/can.rs +++ b/examples/stm32f4/src/bin/can.rs @@ -26,12 +26,13 @@ fn main() -> ! { let mut can = Can::new(p.CAN1, p.PA11, p.PA12); + can.modify_filters().enable_bank(0, Mask32::accept_all()); + can.modify_config() .set_bit_timing(0x001c0003) // http://www.bittiming.can-wiki.info/ .set_loopback(true) // Receive own frames - .set_silent(true); - can.modify_filters().enable_bank(0, Mask32::accept_all()); - unwrap!(nb::block!(can.enable())); + .set_silent(true) + .enable(); let mut i: u8 = 0; loop { |