It’s implied but not made explicit that hal_watchdog_init sets up a re-occuring watchdog, not a one time use one (who wants a one time use watchdog….). This should be made explicit though.
Also, it would be nice if the watchdog module could tell you if a recent reset was caused by the watchdog. I could imagine this functionality being in the startup module instead however. *m Mathew Calmer, R&D Director of Software and Firmware Please note my new email address: [email protected] ExploraMed NC7 201 San Antonio Circle, Suite 172. Mountain View, CA 94040 206 228 4665 | mcalmer@exploramednc7<mailto:[email protected]>.com<mailto:[email protected]> This e-mail may contain information that is privileged, confidential, proprietary, or otherwise exempt from disclosure under applicable law. If you have received this message in error, please advise the sender by return e-mail, delete it from your mailbox and don’t disclose the information. Thank you. > On Aug 29, 2016, at 4:40 PM, marko kiiskila > <[email protected]><mailto:[email protected]%3E> 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. ________________________________
