diff options
author | 2023-12-01 08:59:22 +0100 | |
---|---|---|
committer | 2023-12-01 07:59:22 +0000 | |
commit | 612a47ef4d09da3553145d77bf1750314bbb7b16 (patch) | |
tree | 7f6f6beca7e0c81397994b4f835c6a7f0bbee331 /rtic-sync/src | |
parent | 9f5820da1d36a8c84455b1bc0458d34eb7dd9a70 (diff) | |
download | rtic-612a47ef4d09da3553145d77bf1750314bbb7b16.tar.gz rtic-612a47ef4d09da3553145d77bf1750314bbb7b16.tar.zst rtic-612a47ef4d09da3553145d77bf1750314bbb7b16.zip |
Fix mono delay (#843)
* rtic-time: Compenstate for timer uncertainty
* Update changelog and incorrect cargo.lock in an example
* Fix Monotonic impls
* Fix tests
* Fix other monotonics, again
* Update changelog
* Fix example
* Fix DelayUs and DelayMs impls
* Minor coding style fix in u64 conversions
* Fix all changelogs
* Fix changelog
* Fix blocking DelayUs
* Minor monotonic rework
* Add delay precision test
* Add more tests
* Add rust-version tags to Cargo.toml
* Fix imxrt, rp2040 and systick timer
* Fix more monotonics
* Fix systick monotonic
* Some reverts
* Fix imxrt
* Fix nrf
* Fix rp2040
* Fix stm32
* Fix systick
* Fix rtic-time tests
* Bump to e-h.rc2
* Apply e-h.rc2 fixes to rtic-time
* Apply fixes from arbiter
* Fix clippy warning
* Minor beautification
* Revert previous changes
* Fix variable name
* Add blocking tests, but disable them by default
Diffstat (limited to 'rtic-sync/src')
-rw-r--r-- | rtic-sync/src/arbiter.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rtic-sync/src/arbiter.rs b/rtic-sync/src/arbiter.rs index 99d41748..f0dbc4cd 100644 --- a/rtic-sync/src/arbiter.rs +++ b/rtic-sync/src/arbiter.rs @@ -197,7 +197,7 @@ pub mod spi { use super::Arbiter; use embedded_hal::digital::OutputPin; use embedded_hal_async::{ - delay::DelayUs, + delay::DelayNs, spi::{ErrorType, Operation, SpiBus, SpiDevice}, }; use embedded_hal_bus::spi::DeviceError; @@ -229,7 +229,7 @@ pub mod spi { Word: Copy + 'static, BUS: SpiBus<Word>, CS: OutputPin, - D: DelayUs, + D: DelayNs, { async fn transaction( &mut self, @@ -246,10 +246,10 @@ pub mod spi { Operation::Write(buf) => bus.write(buf).await, Operation::Transfer(read, write) => bus.transfer(read, write).await, Operation::TransferInPlace(buf) => bus.transfer_in_place(buf).await, - Operation::DelayUs(us) => match bus.flush().await { + Operation::DelayNs(ns) => match bus.flush().await { Err(e) => Err(e), Ok(()) => { - self.delay.delay_us(*us).await; + self.delay.delay_ns(*ns).await; Ok(()) } }, |