diff options
| author | Finomnis <Finomnis@users.noreply.github.com> | 2024-04-11 00:00:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-10 22:00:38 +0000 |
| commit | 8c23e178f3838bcdd13662a2ffefd39ec144e869 (patch) | |
| tree | f2d2cefcd6bb2876e74ee6035b5489a4a2d9590f /rtic-monotonics/src/lib.rs | |
| parent | e4cc5fd17b8a2df332af0ee25c8bd7092e66afb0 (diff) | |
Monotonic rewrite (#874)
* Rework timer_queue and monotonic architecture
Goals:
* make Monotonic purely internal
* make Monotonic purely tick passed, no fugit involved
* create a wrapper struct in the user's code via a macro that then
converts the "now" from the tick based monotonic to a fugit based
timestamp
We need to proxy the delay functions of the timer queue anyway,
so we could simply perform the conversion in those proxy functions.
* Update cargo.lock
* Update readme of rtic-time
* CI: ESP32: Redact esp_image: Too volatile
* Fixup: Changelog double entry rebase mistake
---------
Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
Diffstat (limited to 'rtic-monotonics/src/lib.rs')
| -rw-r--r-- | rtic-monotonics/src/lib.rs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/rtic-monotonics/src/lib.rs b/rtic-monotonics/src/lib.rs index 6dc703e..65180b1 100644 --- a/rtic-monotonics/src/lib.rs +++ b/rtic-monotonics/src/lib.rs @@ -21,14 +21,18 @@ //! `Available on crate features X only` tag are available on any `nrf52*` feature. //! // To build these docs correctly: -// RUSTFLAGS="--cfg docsrs" cargo doc --featuers cortex-m-systick,rp2040,nrf52840 +// RUSTFLAGS="--cfg docsrs" cargo +nightly doc --features thumbv7-backend,cortex-m-systick,rp2040,nrf52840,imxrt_gpt1,imxrt_gpt2,imxrt-ral/imxrt1011,stm32h725ag,stm32_tim2,stm32_tim3,stm32_tim4,stm32_tim5,stm32_tim15 #![no_std] #![deny(missing_docs)] #![allow(incomplete_features)] #![cfg_attr(docsrs, feature(doc_cfg))] -pub use rtic_time::{Monotonic, TimeoutError, TimerQueue}; +pub use fugit; +pub use rtic_time::{ + self, monotonic::TimerQueueBasedMonotonic, timer_queue::TimerQueueBackend, Monotonic, + TimeoutError, +}; #[cfg(feature = "cortex-m-systick")] pub mod systick; @@ -92,13 +96,3 @@ pub(crate) unsafe fn set_monotonic_prio( nvic.set_priority(interrupt, hw_prio); } - -/// This marker is implemented on an interrupt token to enforce that the right tokens -/// are given to the correct monotonic implementation. -/// -/// This trait is implemented by this crate and not intended for user implementation. -/// -/// # Safety -/// -/// This is only safely implemented by this crate. -pub unsafe trait InterruptToken<Periperhal> {} |
