Skip to content

Commit 0a5a2fc

Browse files
committed
fix: cargo fmt --all to pass github actions check
1 parent a427ff3 commit 0a5a2fc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

neotron-bmc-nucleo/src/monotonic.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use stm32f4xx_hal::rcc::Clocks;
66
/// This uses TIM2 internally.
77
pub struct MonoTimer<T, const FREQ: u32>(T);
88

9-
109
impl<const FREQ: u32> MonoTimer<pac::TIM2, FREQ> {
1110
/// Initialize the timer instance.
1211
pub fn new(timer: pac::TIM2, clocks: &Clocks) -> Self {
@@ -25,7 +24,7 @@ impl<const FREQ: u32> MonoTimer<pac::TIM2, FREQ> {
2524
rcc.apb1rstr.modify(|_, w| w.tim2rst().clear_bit());
2625
}
2726

28-
let prescaler = (clocks.pclk1().0 /FREQ) - 1;
27+
let prescaler = (clocks.pclk1().0 / FREQ) - 1;
2928
// Set up prescaler
3029
timer.psc.write(|w| w.psc().bits(prescaler as u16));
3130

@@ -42,11 +41,11 @@ impl<const FREQ: u32> MonoTimer<pac::TIM2, FREQ> {
4241
impl<const FREQ: u32> Monotonic for MonoTimer<pac::TIM2, FREQ> {
4342
type Instant = fugit::TimerInstantU32<FREQ>;
4443
type Duration = fugit::TimerDurationU32<FREQ>;
45-
44+
4645
unsafe fn reset(&mut self) {
4746
self.0.dier.modify(|_, w| w.cc1ie().set_bit());
4847
}
49-
48+
5049
#[inline(always)]
5150
fn now(&mut self) -> Self::Instant {
5251
Self::Instant::from_ticks(self.0.cnt.read().cnt().bits())

0 commit comments

Comments
 (0)