We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 695cbb8 commit e1b045bCopy full SHA for e1b045b
src/timer/delay.rs
@@ -85,7 +85,7 @@ pub type DelayMs<TIM> = Delay<TIM, 1_000>;
85
impl<TIM: Instance, const FREQ: u32> Delay<TIM, FREQ> {
86
/// Sleep for given time
87
pub fn delay(&mut self, time: TimerDurationU32<FREQ>) {
88
- let mut ticks = time.ticks().min(1) - 1;
+ let mut ticks = time.ticks().max(1) - 1;
89
while ticks != 0 {
90
let reload = ticks.min(TIM::max_auto_reload());
91
0 commit comments