Skip to content

Commit c051a7a

Browse files
committed
Delete old delay implementation
1 parent cb34a06 commit c051a7a

File tree

4 files changed

+0
-123
lines changed

4 files changed

+0
-123
lines changed

src/common/timer/delay.rs

Lines changed: 0 additions & 96 deletions
This file was deleted.

src/common/timer/fix_timer.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ impl<TIM: GeneralTimer, const FREQ: u32> FTimer<TIM, FREQ> {
3636
Counter(self)
3737
}
3838

39-
/// Creates `Delay` that imlements [embedded_hal_02::blocking::delay] traits
40-
pub fn delay(self) -> Delay<TIM, FREQ> {
41-
Delay(self)
42-
}
43-
4439
/// Releases the TIM peripheral
4540
pub fn release(self) -> TIM {
4641
self.tim

src/common/timer/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ pub mod counter;
44
pub use counter::*;
55
pub mod fix_timer;
66
pub use fix_timer::*;
7-
pub mod delay;
8-
pub use delay::*;
97

108
use fugit::HertzU32 as Hertz;
119

src/timer/mod.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,26 +106,6 @@ impl<TIM: Instance + Steal> Timer<TIM> {
106106
}
107107
}
108108

109-
/// Blocking [Delay] with custom fixed precision
110-
pub fn delay<const FREQ: u32>(self) -> Delay<TIM, FREQ> {
111-
FTimer::new(self.tim, self.clk).delay()
112-
}
113-
114-
/// Blocking [Delay] with fixed precision of 1 ms (1 kHz sampling)
115-
///
116-
/// Can wait from 2 ms to 49 days.
117-
///
118-
/// NOTE: don't use this if your system frequency more than 65 MHz
119-
pub fn delay_ms(self) -> DelayMs<TIM> {
120-
self.delay::<1_000>()
121-
}
122-
/// Blocking [Delay] with fixed precision of 1 μs (1 MHz sampling)
123-
///
124-
/// Can wait from 2 μs to 71 min.
125-
pub fn delay_us(self) -> DelayUs<TIM> {
126-
self.delay::<1_000_000>()
127-
}
128-
129109
pub fn release(self) -> TIM {
130110
self.tim
131111
}

0 commit comments

Comments
 (0)