mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-24 02:49:34 +01:00
Merge #271
271: Minor docs update to monotonic r=japaric a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
This commit is contained in:
commit
e28294b220
1 changed files with 4 additions and 2 deletions
|
@ -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`
|
||||
|
|
Loading…
Reference in a new issue