Simon's Watchdog code from http://mbed.org/forum/mbed/topic/508/

Committer:
tylerjw
Date:
Tue Jul 24 23:11:37 2012 +0000
Revision:
0:daae6c64fbdf
simple watchdog

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tylerjw 0:daae6c64fbdf 1 /* Copyright (c) 2012 Tyler Weaver, MIT License
tylerjw 0:daae6c64fbdf 2 *
tylerjw 0:daae6c64fbdf 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
tylerjw 0:daae6c64fbdf 4 * and associated documentation files (the "Software"), to deal in the Software without restriction,
tylerjw 0:daae6c64fbdf 5 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
tylerjw 0:daae6c64fbdf 6 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
tylerjw 0:daae6c64fbdf 7 * furnished to do so, subject to the following conditions:
tylerjw 0:daae6c64fbdf 8 *
tylerjw 0:daae6c64fbdf 9 * The above copyright notice and this permission notice shall be included in all copies or
tylerjw 0:daae6c64fbdf 10 * substantial portions of the Software.
tylerjw 0:daae6c64fbdf 11 *
tylerjw 0:daae6c64fbdf 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
tylerjw 0:daae6c64fbdf 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
tylerjw 0:daae6c64fbdf 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
tylerjw 0:daae6c64fbdf 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
tylerjw 0:daae6c64fbdf 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
tylerjw 0:daae6c64fbdf 17 */
tylerjw 0:daae6c64fbdf 18
tylerjw 0:daae6c64fbdf 19 #include "mbed.h"
tylerjw 0:daae6c64fbdf 20
tylerjw 0:daae6c64fbdf 21 /**
tylerjw 0:daae6c64fbdf 22 Watchdog timer
tylerjw 0:daae6c64fbdf 23 simple implementation gotten from mbed
tylerjw 0:daae6c64fbdf 24 @author unknown
tylerjw 0:daae6c64fbdf 25 */
tylerjw 0:daae6c64fbdf 26 class Watchdog {
tylerjw 0:daae6c64fbdf 27 public:
tylerjw 0:daae6c64fbdf 28 void kick(float); // init watchdog to number of seconds
tylerjw 0:daae6c64fbdf 29 void kick(); // kick the dog
tylerjw 0:daae6c64fbdf 30 };