We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is_multiple_of
1 parent 181e667 commit 08893aaCopy full SHA for 08893aa
rtic-monotonics/src/systick.rs
@@ -74,7 +74,7 @@ impl SystickBackend {
74
/// Use the prelude macros instead.
75
pub fn _start(mut systick: SYST, sysclk: u32, timer_hz: u32) {
76
assert!(
77
- (sysclk % timer_hz) == 0,
+ sysclk.is_multiple_of(timer_hz),
78
"timer_hz cannot evenly divide sysclk! Please adjust the timer or sysclk frequency."
79
);
80
let reload = sysclk / timer_hz - 1;
0 commit comments