Kinsey Moore started a new discussion: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/120#note_109924


I think this has just about all the right parts to implement full watchdog 
functionality, but they're in a slightly odd form.

I would expect these functions to be available:
* init (in this case it would do nothing, so not necessary for this 
implementation)
* start (turn on the watchdog/begin the counter at the desired value)
* stop (turn off the watchdog)
* reload (often called petting the watchdog or tickling the watchdog, it 
appears this currently also serves the role of the start function)
* get_remaining_time (get_timeleft in your code, not always available depending 
on the implementation)

I would expect to call them in this order:
* init
* start
* reload
* reload
* ...
* reload
* stop

The documentation for get_timeleft should specify whether the return value is 
valid when the watchdog has been stopped.

reset_system is unnecessary since it is such a thin wrapper around reload.

Once you've done some rework on this, the header file should contain a brief 
example of expected usage.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/120#note_109924
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to