Skip to content

Commit 08893aa

Browse files
committed
Use is_multiple_of
1 parent 181e667 commit 08893aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rtic-monotonics/src/systick.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl SystickBackend {
7474
/// Use the prelude macros instead.
7575
pub fn _start(mut systick: SYST, sysclk: u32, timer_hz: u32) {
7676
assert!(
77-
(sysclk % timer_hz) == 0,
77+
sysclk.is_multiple_of(timer_hz),
7878
"timer_hz cannot evenly divide sysclk! Please adjust the timer or sysclk frequency."
7979
);
8080
let reload = sysclk / timer_hz - 1;

0 commit comments

Comments
 (0)