summaryrefslogtreecommitdiff
path: root/examples/stm32f4/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32f4/src/bin')
-rw-r--r--examples/stm32f4/src/bin/can.rs7
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 {