mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 21:05:35 +01:00
Use is_multiple_of
This commit is contained in:
parent
96b5a81779
commit
266ddd1b11
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ impl SystickBackend {
|
||||||
/// Use the prelude macros instead.
|
/// Use the prelude macros instead.
|
||||||
pub fn _start(mut systick: SYST, sysclk: u32, timer_hz: u32) {
|
pub fn _start(mut systick: SYST, sysclk: u32, timer_hz: u32) {
|
||||||
assert!(
|
assert!(
|
||||||
(sysclk % timer_hz) == 0,
|
sysclk.is_multiple_of(timer_hz),
|
||||||
"timer_hz cannot evenly divide sysclk! Please adjust the timer or sysclk frequency."
|
"timer_hz cannot evenly divide sysclk! Please adjust the timer or sysclk frequency."
|
||||||
);
|
);
|
||||||
let reload = sysclk / timer_hz - 1;
|
let reload = sysclk / timer_hz - 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue