diff options
| author | chemicstry <[email protected]> | 2022-06-23 02:01:23 +0300 |
|---|---|---|
| committer | chemicstry <[email protected]> | 2022-06-23 02:01:23 +0300 |
| commit | 31177d994f0acda9d036274cd92b8a3da7475c5f (patch) | |
| tree | 227ab3ed773670229afce9d6d6c047074c7bca59 /examples | |
| parent | 2d2f9e39b9815c4eff33efe6896024bab2c4181c (diff) | |
Fix example
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32f4/src/bin/can.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f4/src/bin/can.rs b/examples/stm32f4/src/bin/can.rs index 8abce87a2..e8377b9a1 100644 --- a/examples/stm32f4/src/bin/can.rs +++ b/examples/stm32f4/src/bin/can.rs | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | use cortex_m_rt::entry; | 5 | use cortex_m_rt::entry; |
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_stm32::can::bxcan::filter::Mask32; | 7 | use embassy_stm32::can::bxcan::filter::Mask32; |
| 8 | use embassy_stm32::can::bxcan::{Frame, StandardId}; | 8 | use embassy_stm32::can::bxcan::{Fifo, Frame, StandardId}; |
| 9 | use embassy_stm32::can::Can; | 9 | use embassy_stm32::can::Can; |
| 10 | use embassy_stm32::gpio::{Input, Pull}; | 10 | use embassy_stm32::gpio::{Input, Pull}; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -25,7 +25,7 @@ fn main() -> ! { | |||
| 25 | 25 | ||
| 26 | let mut can = Can::new(p.CAN1, p.PA11, p.PA12); | 26 | let mut can = Can::new(p.CAN1, p.PA11, p.PA12); |
| 27 | 27 | ||
| 28 | can.modify_filters().enable_bank(0, Mask32::accept_all()); | 28 | can.modify_filters().enable_bank(0, Fifo::Fifo0, Mask32::accept_all()); |
| 29 | 29 | ||
| 30 | can.modify_config() | 30 | can.modify_config() |
| 31 | .set_bit_timing(0x001c0003) // http://www.bittiming.can-wiki.info/ | 31 | .set_bit_timing(0x001c0003) // http://www.bittiming.can-wiki.info/ |
