Fix example
This commit is contained in:
parent
2d2f9e39b9
commit
31177d994f
@ -71,7 +71,7 @@ quote = "1.0.15"
|
||||
stm32-metapac = { version = "0.1.0", path = "../stm32-metapac", default-features = false, features = ["metadata"]}
|
||||
|
||||
[features]
|
||||
defmt = ["dep:defmt", "embassy/defmt", "embedded-io?/defmt", "embassy-usb?/defmt"]
|
||||
defmt = ["dep:defmt", "bxcan/unstable-defmt", "embassy/defmt", "embedded-io?/defmt", "embassy-usb?/defmt"]
|
||||
sdmmc-rs = ["embedded-sdmmc"]
|
||||
net = ["embassy-net" ]
|
||||
memory-x = ["stm32-metapac/memory-x"]
|
||||
|
@ -5,7 +5,7 @@
|
||||
use cortex_m_rt::entry;
|
||||
use defmt::*;
|
||||
use embassy_stm32::can::bxcan::filter::Mask32;
|
||||
use embassy_stm32::can::bxcan::{Frame, StandardId};
|
||||
use embassy_stm32::can::bxcan::{Fifo, Frame, StandardId};
|
||||
use embassy_stm32::can::Can;
|
||||
use embassy_stm32::gpio::{Input, Pull};
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
@ -25,7 +25,7 @@ fn main() -> ! {
|
||||
|
||||
let mut can = Can::new(p.CAN1, p.PA11, p.PA12);
|
||||
|
||||
can.modify_filters().enable_bank(0, Mask32::accept_all());
|
||||
can.modify_filters().enable_bank(0, Fifo::Fifo0, Mask32::accept_all());
|
||||
|
||||
can.modify_config()
|
||||
.set_bit_timing(0x001c0003) // http://www.bittiming.can-wiki.info/
|
||||
|
Loading…
Reference in New Issue
Block a user