summaryrefslogtreecommitdiff
path: root/stmhal/wdt.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-09-04 00:12:48 +1000
committerDamien George <damien.p.george@gmail.com>2016-09-04 00:12:48 +1000
commit76c366df56ad64eae3b021304954954e663bf1df (patch)
tree5bdb15118451f7eee439b5145f5075fd051baa1b /stmhal/wdt.h
parentf7c461152364650b71231387c3f80b37277c9161 (diff)
stmhal: Add machine.WDT class.
Usage: import machine wdt = machine.WDT(0, 5000) # 5 second timeout wdt.feed() Thanks to Moritz for the initial implementation.
Diffstat (limited to 'stmhal/wdt.h')
-rw-r--r--stmhal/wdt.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/stmhal/wdt.h b/stmhal/wdt.h
new file mode 100644
index 000000000..362d6ef68
--- /dev/null
+++ b/stmhal/wdt.h
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2016 Damien P. George
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+extern const mp_obj_type_t pyb_wdt_type;