Should we have init(), enable(), disable() and tickle()? I imagine
there are places you are going to want to disable the watchdog and
re-enable it, but not reprogram how long the expiry should be?
sterling
On 29 Aug 2016, at 16:40, marko kiiskila wrote:
Hi,
I was going to add support for hardware watchdog(s).
The API I was thinking would be pretty simple.
The first user for this would be the sanity task.
—8<---
/*
* Set the watchdog time to fire no sooner than 'expire_secs' seconds
from now.
*/
int hal_watchdog_init(int expire_secs);
/*
* Tickles the watchdog. Needs to be done before 'expire_secs' fires.
*/
int hal_watchdog_tickle(void);
/*
* Stops the watchdog.
*/
int hal_watchdog_stop(void);
—8<———
Let me know if this doesn’t seem right.