set overflow amount should take a mut self

This commit is contained in:
Gwilym Kuiper 2021-11-18 22:14:59 +00:00
parent 20511843ca
commit 8ef46279c8

View file

@ -60,7 +60,7 @@ impl<const N: usize> Timer<N> {
Self {} Self {}
} }
pub fn set_overflow_amount(&self, n: u16) { pub fn set_overflow_amount(&mut self, n: u16) {
let count_up_value = 0u16.wrapping_sub(n); let count_up_value = 0u16.wrapping_sub(n);
self.data_register().set(count_up_value); self.data_register().set(count_up_value);
} }