[riot-notifications] [RIOT-OS/RIOT] drivers/include: add header definition for wdt (#11527)

Francisco notifications at github.com
Thu Jun 13 13:53:51 CEST 2019


fjmolinas commented on this pull request.



> + * |----------------------------------------------------|
+ *
+ *                           x(ms)
+ * |---------------------------| - - - - - - -  - - - - |
+ *
+ *                             ^
+ *                             |
+ *                        wdt_kick()
+ * 
+ * WINDOWED operation
+ * ==================
+ *
+ *    wdt_setup_reboot(MIN_TIME, MAX_TIME);
+ *    wdt_start();
+ *
+ *    // x < (MAX_TIME - MIN_TIME)

I guess I can move the comment out of the code snippet to have this:

```
 * In the code snippet and diagram ```time``` is an arbitrary value such that
 * ```time < MAX_TIME```.
 *
 * @verbatim
 * 0(ms)                                            MAX_TIME(ms)
 * |----------------------------------------------------|
 *
 *                          time(ms)
 * |---------------------------| - - - - - - -  - - - - |
 *
 *                             ^
 *                             |
 *                        wdt_kick()
 * @endverbatim
 * 
 * ~~~~~~~~~~~~~~~~~~~~~~~~ {.c}
 * #include <stdio.h>
 *
 * #include "periph/wdt.h"
 * #include "xtimer.h"
 *
 * int main(void)
 * {
 *     wdt_setup_reboot(0, MAX_TIME);
 *     wdt_start();
 *
 *     while (1) {
 *         xtimer_usleep(time);
 *         wdt_kick();
 *     }
 *     return 0;
 * }
 * ~~~~~~~~~~~~~~~~~~~~~~~~
```
 Would that also be ok with you @benpicco ? (I changed x to time)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11527#discussion_r293338541
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190613/93ed3e59/attachment.html>


More information about the notifications mailing list