Skip to content

Commit

Permalink
Timer: Use multiplication in assert instead of division.
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Niehusmann <jan@gondor.com>
  • Loading branch information
ithinuel and jannic committed Aug 18, 2023
1 parent f933b0c commit bc3add6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rp2040-hal/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ impl Timer {
clocks: &ReferenceClock,
) -> Self {
assert_eq!(
clocks.freq().to_Hz() / u32::from(watchdog.cycles_per_ticks()),
1_000_000
clocks.freq().to_Hz(),
1_000_000 * u32::from(watchdog.cycles_per_ticks())
);
timer.reset_bring_down(resets);
timer.reset_bring_up(resets);
Expand Down

0 comments on commit bc3add6

Please sign in to comment.