Skip to content

Commit

Permalink
Cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rnd-ash committed Jan 6, 2025
1 parent d8056c1 commit ca1e486
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hal/src/delay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ use crate::time::Hertz;
use crate::typelevel::Increment;

#[hal_cfg("rtc-d5x")]
use crate::clock::v2::{
Source, gclk::Gclk0Id
};
use crate::clock::v2::{gclk::Gclk0Id, Source};

/// System timer (SysTick) as a delay provider
pub struct Delay {
Expand All @@ -38,14 +36,16 @@ impl Delay {
/// Configures the system timer (SysTick) as a delay provide, compatible
/// with the V2 clocking API
pub fn new_with_source<S>(mut syst: SYST, gclk0: S) -> (Self, S::Inc)
where S: Source<Id = Gclk0Id> + Increment {
where
S: Source<Id = Gclk0Id> + Increment,
{
syst.set_clock_source(SystClkSource::Core);
(
Delay {
syst,
sysclock: gclk0.freq(),
},
gclk0.inc()
gclk0.inc(),
)
}

Expand Down

0 comments on commit ca1e486

Please sign in to comment.