Skip to content

Commit 6073fab

Browse files
bors[bot]Joeyh021
andauthored
Merge #105
105: Add extra documentation for `delay` r=almindor a=Joeyh021 Took me a minute or two to figure out what value exactly to pass to `McycleDelay::new`, so figured I'd make a quick PR to add a note for anyone else that hits the same confusion as I did. Also added a doc line for the `delay` module while I was at it, as it was missing one. Co-authored-by: Joey Harrison <[email protected]>
2 parents d50928b + d1272fa commit 6073fab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/delay.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Delay devices and providers
12
use crate::register::mcycle;
23
use embedded_hal::blocking::delay::{DelayMs, DelayUs};
34

@@ -8,7 +9,8 @@ pub struct McycleDelay {
89
}
910

1011
impl McycleDelay {
11-
/// Constructs the delay provider
12+
/// Constructs the delay provider.
13+
/// `ticks_second` should be the clock speed of the core, in Hertz
1214
#[inline(always)]
1315
pub fn new(ticks_second: u32) -> Self {
1416
Self { ticks_second }

0 commit comments

Comments
 (0)