|
@@ -1,3 +1,4 @@
|
|
|
|
+//! Delay devices and providers
|
|
use crate::register::mcycle;
|
|
use crate::register::mcycle;
|
|
use embedded_hal::blocking::delay::{DelayMs, DelayUs};
|
|
use embedded_hal::blocking::delay::{DelayMs, DelayUs};
|
|
|
|
|
|
@@ -8,7 +9,8 @@ pub struct McycleDelay {
|
|
}
|
|
}
|
|
|
|
|
|
impl McycleDelay {
|
|
impl McycleDelay {
|
|
- /// Constructs the delay provider
|
|
|
|
|
|
+ /// Constructs the delay provider.
|
|
|
|
+ /// `ticks_second` should be the clock speed of the core, in Hertz
|
|
#[inline(always)]
|
|
#[inline(always)]
|
|
pub fn new(ticks_second: u32) -> Self {
|
|
pub fn new(ticks_second: u32) -> Self {
|
|
Self { ticks_second }
|
|
Self { ticks_second }
|