Fix example

This commit is contained in:
chemicstry 2022-06-23 02:01:23 +03:00
parent 2d2f9e39b9
commit 31177d994f
2 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ quote = "1.0.15"
stm32-metapac = { version = "0.1.0", path = "../stm32-metapac", default-features = false, features = ["metadata"]} stm32-metapac = { version = "0.1.0", path = "../stm32-metapac", default-features = false, features = ["metadata"]}
[features] [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"] sdmmc-rs = ["embedded-sdmmc"]
net = ["embassy-net" ] net = ["embassy-net" ]
memory-x = ["stm32-metapac/memory-x"] memory-x = ["stm32-metapac/memory-x"]

View File

@ -5,7 +5,7 @@
use cortex_m_rt::entry; use cortex_m_rt::entry;
use defmt::*; use defmt::*;
use embassy_stm32::can::bxcan::filter::Mask32; 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::can::Can;
use embassy_stm32::gpio::{Input, Pull}; use embassy_stm32::gpio::{Input, Pull};
use {defmt_rtt as _, panic_probe as _}; use {defmt_rtt as _, panic_probe as _};
@ -25,7 +25,7 @@ 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_filters().enable_bank(0, Fifo::Fifo0, 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/