-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hardware-watchdog abstraction. #8
Conversation
That's a feature that was introduced in a later SDK version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I think I prefer System over Hardware, but it is nice to have an abstraction for this so it can be tested better.
src/provider.toit
Outdated
import log | ||
import monitor | ||
import system.services show ServiceProvider ServiceResource ServiceHandler | ||
import .api.service | ||
import .esp32 show HardwareWatchdogEsp32 | ||
|
||
interface HardwareWatchdog: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure hardware is a great name here given that this can be mocked, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed back to "system" (SystemWatchdog
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks even better!
Not sure if I missed more of the 'hardware' references...
Co-authored-by: Kasper Lund <[email protected]>
Fix last reference.
Thanks. one reference to "hardware" was left. |
No description provided.