diff --git a/embassy-stm32/src/can/fdcan.rs b/embassy-stm32/src/can/fdcan.rs index 4b76cc34d..744d756f5 100644 --- a/embassy-stm32/src/can/fdcan.rs +++ b/embassy-stm32/src/can/fdcan.rs @@ -3,12 +3,9 @@ use core::future::poll_fn; use core::marker::PhantomData; use core::task::Poll; -pub mod fd; use embassy_hal_internal::{into_ref, PeripheralRef}; use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; use embassy_sync::channel::Channel; -use fd::config::*; -use fd::filter::*; use crate::can::fd::peripheral::Registers; use crate::gpio::sealed::AFType; @@ -17,10 +14,14 @@ use crate::rcc::RccPeripheral; use crate::{interrupt, peripherals, Peripheral}; pub mod enums; -use enums::*; +pub(crate) mod fd; +pub mod frame; mod util; -pub mod frame; +use enums::*; +use fd::config::*; +use fd::filter::*; +pub use fd::{config, filter}; use frame::*; /// Timestamp for incoming packets. Use Embassy time when enabled. diff --git a/examples/stm32g4/src/bin/can.rs b/examples/stm32g4/src/bin/can.rs index affa97039..a41f765c1 100644 --- a/examples/stm32g4/src/bin/can.rs +++ b/examples/stm32g4/src/bin/can.rs @@ -22,8 +22,8 @@ async fn main(_spawner: Spawner) { let mut can = can::FdcanConfigurator::new(peripherals.FDCAN1, peripherals.PA11, peripherals.PA12, Irqs); can.set_extended_filter( - can::fd::filter::ExtendedFilterSlot::_0, - can::fd::filter::ExtendedFilter::accept_all_into_fifo1(), + can::filter::ExtendedFilterSlot::_0, + can::filter::ExtendedFilter::accept_all_into_fifo1(), ); // 250k bps diff --git a/tests/stm32/src/bin/fdcan.rs b/tests/stm32/src/bin/fdcan.rs index 398e31ffc..f21aa797c 100644 --- a/tests/stm32/src/bin/fdcan.rs +++ b/tests/stm32/src/bin/fdcan.rs @@ -81,8 +81,8 @@ async fn main(_spawner: Spawner) { can.set_bitrate(250_000); can.set_extended_filter( - can::fd::filter::ExtendedFilterSlot::_0, - can::fd::filter::ExtendedFilter::accept_all_into_fifo1(), + can::filter::ExtendedFilterSlot::_0, + can::filter::ExtendedFilter::accept_all_into_fifo1(), ); let mut can = can.into_internal_loopback_mode();