Skip to content

Commit 90875db

Browse files
committed
Fix time types in independent_watchdog #2
1 parent 57931ca commit 90875db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/independent_watchdog.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ impl IndependentWatchdog {
100100
.write(|w| w.win().bits(Self::MAX_COUNTER_VALUE as u16));
101101

102102
// Calculate the counter values
103-
let reload_value = (max_window_time.ticks() / 1000) * (Self::CLOCK_SPEED / 1000)
103+
let reload_value = max_window_time.to_millis() * (Self::CLOCK_SPEED / 1000)
104104
/ Self::get_prescaler_divider(prescaler);
105-
let window_value = (min_window_time.ticks() / 1000) * (Self::CLOCK_SPEED / 1000)
105+
let window_value = min_window_time.to_millis() * (Self::CLOCK_SPEED / 1000)
106106
/ Self::get_prescaler_divider(prescaler);
107107

108108
// Set the reload value

0 commit comments

Comments
 (0)