From 31177d994f0acda9d036274cd92b8a3da7475c5f Mon Sep 17 00:00:00 2001 From: chemicstry Date: Thu, 23 Jun 2022 02:01:23 +0300 Subject: [PATCH] Fix example --- embassy-stm32/Cargo.toml | 2 +- examples/stm32f4/src/bin/can.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 9209fc01..88c0f42f 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -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"] diff --git a/examples/stm32f4/src/bin/can.rs b/examples/stm32f4/src/bin/can.rs index 8abce87a..e8377b9a 100644 --- a/examples/stm32f4/src/bin/can.rs +++ b/examples/stm32f4/src/bin/can.rs @@ -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/