summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2019-11-13 20:56:31 +0100
committerGravatar Emil Fresk <emil.fresk@gmail.com> 2019-11-13 21:19:59 +0100
commit2441b7e38978f3fa8d555ee85f2632176e0a2c86 (patch)
tree52b6d88a5eea85a12a37c0d7a208b5a9e2b75a4c /src/lib.rs
parent72e84cb297ef06d9496d18402bc8ea2d88cd1665 (diff)
downloadrtic-2441b7e38978f3fa8d555ee85f2632176e0a2c86.tar.gz
rtic-2441b7e38978f3fa8d555ee85f2632176e0a2c86.tar.zst
rtic-2441b7e38978f3fa8d555ee85f2632176e0a2c86.zip
Minor docs update to monotonic
Diffstat (limited to '')
-rw-r--r--src/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d661c54f..614ba853 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -128,10 +128,12 @@ pub struct Fraction {
/// A monotonic clock / counter
pub trait Monotonic {
- /// A measurement of this clock
+ /// A measurement of this clock, use `CYCCNT` as a reference implementation for `Instant`.
+ /// Note that the Instant must be a signed value such as `i32`.
type Instant: Copy + Ord + Sub;
- /// The ratio between the SysTick (system timer) frequency and this clock frequency
+ /// The ratio between the system timer (SysTick) frequency and this clock frequency, i.e.
+ /// `Monotonic clock * Fraction = System clock`
///
/// The ratio must be expressed in *reduced* `Fraction` form to prevent overflows. That is
/// `2 / 3` instead of `4 / 6`