diff --git a/Cargo.toml b/Cargo.toml index 2ce271f..db96479 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/rust-iot/radio-hal" authors = ["Ryan Kurte "] license = "MIT" edition = "2018" -version = "0.12.0" +version = "0.12.1" [package.metadata.docs.rs] features = [ "std", "nonblocking", "mock", "helpers" ] diff --git a/src/mock.rs b/src/mock.rs index 3a0b90a..96fde02 100644 --- a/src/mock.rs +++ b/src/mock.rs @@ -13,7 +13,7 @@ use std::vec::Vec; use log::debug; -use embedded_hal::delay::DelayUs; +use embedded_hal::delay::DelayNs; use embedded_hal_mock::common::Generic; @@ -217,9 +217,9 @@ impl Transaction { } /// Delay for a certain time - pub fn delay_us(us: u32) -> Self { + pub fn delay_ns(ns: u32) -> Self { Self { - request: Request::DelayUs(us), + request: Request::DelayNs(ns), response: Response::Ok, } } @@ -247,7 +247,7 @@ enum Request { CheckReceive(bool), GetReceived, - DelayUs(u32), + DelayNs(u32), } #[derive(Debug, Clone, PartialEq)] @@ -271,7 +271,7 @@ impl From> for Response { } } -impl DelayUs for Radio +impl DelayNs for Radio where St: PartialEq + Debug + Clone, Reg: PartialEq + Debug + Clone, @@ -280,10 +280,10 @@ where Irq: PartialEq + Debug + Clone, E: PartialEq + Debug + Clone, { - fn delay_us(&mut self, us: u32) { - let n = self.next().expect("no expectation for delay_us call"); + fn delay_ns(&mut self, ns: u32) { + let n = self.next().expect("no expectation for delay_ns call"); - assert_eq!(&n.request, &Request::DelayUs(us)); + assert_eq!(&n.request, &Request::DelayNs(ns)); } }