diff options
author | 2019-06-24 14:09:12 +0200 | |
---|---|---|
committer | 2019-06-24 14:09:12 +0200 | |
commit | 596cf585ea8dc278d88e0652dffbacbc75de04c6 (patch) | |
tree | 147bad178f15a7e7a91d847f39d501ecc1051821 /src/lib.rs | |
parent | 4e51bb68b976c6bb6a9a989dc560d2a8123a84ca (diff) | |
download | rtic-596cf585ea8dc278d88e0652dffbacbc75de04c6.tar.gz rtic-596cf585ea8dc278d88e0652dffbacbc75de04c6.tar.zst rtic-596cf585ea8dc278d88e0652dffbacbc75de04c6.zip |
Monotonic trait is safe; add MultiCore trait
Diffstat (limited to '')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -117,7 +117,7 @@ impl From<cortex_m::Peripherals> for Peripherals { } /// A monotonic clock / counter -pub unsafe trait Monotonic { +pub trait Monotonic { /// A measurement of this clock type Instant: Copy + Ord + Sub; @@ -134,6 +134,9 @@ pub unsafe trait Monotonic { fn zero() -> Self::Instant; } +/// A marker trait that indicates that it is correct to use this type in multi-core context +pub trait MultiCore {} + /// Sets the given `interrupt` as pending /// /// This is a convenience function around |