Skip to content

Commit

Permalink
chore: add qingke v4 delay support using qingke v2 implementation
Browse files Browse the repository at this point in the history
qingke v4 SysTick timer is 64-bit while qingke v2 is 32-bit but the
registers have the same names
  • Loading branch information
romainreignier authored and andelf committed Oct 2, 2024
1 parent 75f3c55 commit 20e44ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! SYSTICK based delay implementation for Qingke V2
//! SYSTICK based delay implementation for Qingke V2 and V4
use pac::systick::vals;

Expand Down
4 changes: 2 additions & 2 deletions src/delay/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[cfg(qingke_v2)]
#[path = "./impl_qingke_v2.rs"]
#[cfg(any(qingke_v2, qingke_v4))]
#[path = "./impl_qingke_v2_v4.rs"]
mod delay_impl;

#[cfg(qingke_v3)]
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mod interrupt_ext;

pub use crate::_generated::{peripherals, Peripherals};

#[cfg(any(systick_rv2, systick_rv3))]
#[cfg(any(systick_rv2, systick_rv3, systick_rv4))]
pub mod delay;
pub mod dma;

Expand Down Expand Up @@ -115,7 +115,7 @@ pub fn init(config: Config) -> Peripherals {
unsafe {
rcc::init(config.rcc);

#[cfg(any(systick_rv2, systick_rv3))]
#[cfg(any(systick_rv2, systick_rv3, systick_rv4))]
delay::Delay::init();
}

Expand Down

0 comments on commit 20e44ed

Please sign in to comment.