Skip to content

Commit

Permalink
Fixed CAN on G431
Browse files Browse the repository at this point in the history
  • Loading branch information
David O'Connor committed May 8, 2024
1 parent e3c4b26 commit 8633c62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/can/g4.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use fdcan;

#[cfg(not(feature = "g431"))]
use crate::pac::{FDCAN2, FDCAN3};
use crate::{
pac::{FDCAN1, FDCAN2, FDCAN3, RCC},
pac::{FDCAN1, RCC},
util::rcc_en_reset,
};

Expand Down Expand Up @@ -47,6 +49,8 @@ macro_rules! create_cans {
};
}

create_cans!(Can1, FDCAN1, FDCAN1_MESSAGE_RAM_ADDRESS);
create_cans!(Can, FDCAN1, FDCAN1_MESSAGE_RAM_ADDRESS);
#[cfg(not(feature = "g431"))]
create_cans!(Can2, FDCAN2, FDCAN2_MESSAGE_RAM_ADDRESS);
#[cfg(not(feature = "g431"))]
create_cans!(Can3, FDCAN3, FDCAN3_MESSAGE_RAM_ADDRESS);
1 change: 1 addition & 0 deletions src/spi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ cfg_if! {
}
}

#[derive(Clone)]
/// Configuration data for SPI.
pub struct SpiConfig {
/// SPI mode associated with Polarity and Phase. Defaults to Mode0: Idle low, capture on first transition.
Expand Down

0 comments on commit 8633c62

Please sign in to comment.