Skip to content

Commit

Permalink
updated readme to reflect can eratta
Browse files Browse the repository at this point in the history
  • Loading branch information
David-OConnor committed May 1, 2024
1 parent b5cd4db commit ce67ccd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 2 additions & 1 deletion src/can/g4.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
3 changes: 2 additions & 1 deletion src/can/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")] {
Expand Down
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {{
Expand Down

0 comments on commit ce67ccd

Please sign in to comment.