Skip to content

Commit

Permalink
Remove delay_ns
Browse files Browse the repository at this point in the history
  • Loading branch information
David-OConnor committed Dec 15, 2023
1 parent f7914cd commit 9c0b95b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,12 +682,12 @@ pub fn delay_us(num_us: u32, ahb_freq: u32) {
delay.delay_us(num_us);
}

/// A blocking delay, for a specified time in ns.
pub fn delay_ns(num_ns: u32, ahb_freq: u32) {
let cp = unsafe { cortex_m::Peripherals::steal() };
let mut delay = Delay::new(cp.SYST, ahb_freq);
delay.delay_ns(num_ns);
}
// /// A blocking delay, for a specified time in ns.
// pub fn delay_ns(num_ns: u32, ahb_freq: u32) {
// let cp = unsafe { cortex_m::Peripherals::steal() };
// let mut delay = Delay::new(cp.SYST, ahb_freq);
// delay.delay_ns(num_ns);
// }

/// In the prelude, we export helper macros.
pub mod prelude {
Expand Down

0 comments on commit 9c0b95b

Please sign in to comment.