Added clarifying comment

This commit is contained in:
Dion Dokter 2023-10-02 21:41:30 +02:00
parent 137e47f98d
commit a9dc887060

View File

@ -29,10 +29,17 @@ pub(crate) mod sealed {
Self::regs().cr1().modify(|r| r.set_cen(false));
}
/// Reset the counter value to 0
fn reset(&mut self) {
Self::regs().cnt().write(|r| r.set_cnt(0));
}
/// Set the frequency of how many times per second the timer counts up to the max value or down to 0.
///
/// This means that in the default edge-aligned mode,
/// the timer counter will wrap around at the same frequency as is being set.
/// In center-aligned mode (which not all timers support), the wrap-around frequency is effectively halved
/// because it needs to count up and down.
fn set_frequency(&mut self, frequency: Hertz) {
let f = frequency.0;
let timer_f = Self::frequency().0;
@ -515,9 +522,5 @@ foreach_interrupt! {
crate::pac::$inst
}
}
};
}