diff --git a/README.md b/README.md index f225685..942b612 100644 --- a/README.md +++ b/README.md @@ -327,5 +327,5 @@ STM32WL radio support is WIP, and will be provided through interaction with newA you must manually set the `TIMx_BDTR` register, `MOE` bit. - Octospi implementation is broken - DFSDM on L4x6 is missing Filter 1. -- Only FDCAN1 is implemented; not FDCAN2 or 3 (G0, G4, H7). +- G0 and H7: Only FDCAN1 is implemented. - H5 is missing a lot of functionality, including DMA. \ No newline at end of file diff --git a/src/can/g4.rs b/src/can/g4.rs index 81daf38..4d2042f 100644 --- a/src/can/g4.rs +++ b/src/can/g4.rs @@ -1,8 +1,9 @@ +use fdcan; + use crate::{ pac::{FDCAN1, FDCAN2, FDCAN3, RCC}, util::rcc_en_reset, }; -use fdcan; const MESSAGE_RAM_BASE_ADDRESS: u32 = 0x4000_a400; diff --git a/src/can/mod.rs b/src/can/mod.rs index 2ffcbf3..0e9c96d 100644 --- a/src/can/mod.rs +++ b/src/can/mod.rs @@ -3,9 +3,10 @@ //! //! Requires the `can_bx` or `can_fd_g[h]` features. F3, F4, and L4 use BX CAN. G0, G4, L5, and H7 use FD CAN. -use crate::{pac::RCC, util::rcc_en_reset}; use cfg_if::cfg_if; +use crate::{pac::RCC, util::rcc_en_reset}; + // todo: H5 support. cfg_if! { if #[cfg(feature = "f3")] { diff --git a/src/lib.rs b/src/lib.rs index 1f158e4..b4b8674 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -603,16 +603,17 @@ macro_rules! parse_be { /// Syntax helper for converting primitives to multi-byte fields. /// -/// Example: `copy_le!(bytes, &self.position, 5..9);` +/// Example: `copy_le!(bytes, self.position, 5..9);` #[macro_export] macro_rules! copy_le { ($dest:expr, $src:expr, $range:expr) => {{ $dest[$range].copy_from_slice(&$src.to_le_bytes()) }}; } + /// Syntax helper for converting primitives to multi-byte fields. /// -/// Example: `copy_be!(bytes, &self.position, i32, 5..9);` +/// Example: `copy_be!(bytes, self.position, i32, 5..9);` #[macro_export] macro_rules! copy_be { ($dest:expr, $src:expr, $range:expr) => {{