You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that the functions of the traits only get &self and not &mut self. I think it makes more sense to use &mut self, because you "change" the timer when you call pause()...
For example:
pubtraitTimer{/// A time unit that can be converted into a human time unit (e.g. seconds)typeTime;/// Returns the current timeoutfnget_timeout(&self) -> Self::Time;/// Pauses the timerfnpause(&self);/// Restarts the timer count to zerofnrestart(&self);/// Resumes the timer countfnresume(&self);/// Sets a new timeoutfnset_timeout<T>(&self,timeout:T)whereT:Into<Self::Time>;/// "Waits" until the timer times outfnwait(&self) -> nb::Result<(), !>;}
The text was updated successfully, but these errors were encountered:
We could use https://github.com/japaric/embedded-hal for our hal implementation.
The problem is that the functions of the traits only get &self and not &mut self. I think it makes more sense to use &mut self, because you "change" the timer when you call pause()...
For example:
The text was updated successfully, but these errors were encountered: