From 7f45d10af3a57f5fdf9d25f44d051a57a054bb33 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 22 Jul 2020 22:43:10 +0200 Subject: [PATCH] timer::global::CountDown: fix delaying from "up to" to "at least" the timespan --- libboard_zynq/src/timer/global.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libboard_zynq/src/timer/global.rs b/libboard_zynq/src/timer/global.rs index 5c4746e..71069f6 100644 --- a/libboard_zynq/src/timer/global.rs +++ b/libboard_zynq/src/timer/global.rs @@ -110,7 +110,7 @@ impl embedded_hal::timer::CountDown for CountDown { } fn wait(&mut self) -> nb::Result<(), Void> { - if self.timer.get_time() < self.timeout { + if self.timer.get_time() <= self.timeout { Err(nb::Error::WouldBlock) } else { Ok(())