diff options
| author | Daniel Campora <daniel@wipy.io> | 2015-09-13 17:06:12 +0200 |
|---|---|---|
| committer | Daniel Campora <daniel@wipy.io> | 2015-09-16 10:10:29 +0200 |
| commit | 41f6948545c8f5909413badbef2dcd5794598bf0 (patch) | |
| tree | 312b4f2024d943560844c1ca0fc5c59a6c588155 /tests | |
| parent | 8332044f754aa0743fb38404dae55508a0550e6a (diff) | |
cc3200: New WDT API.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/wipy/wdt.py | 37 | ||||
| -rw-r--r-- | tests/wipy/wdt.py.exp | 7 |
2 files changed, 44 insertions, 0 deletions
diff --git a/tests/wipy/wdt.py b/tests/wipy/wdt.py new file mode 100644 index 000000000..9be6293b0 --- /dev/null +++ b/tests/wipy/wdt.py @@ -0,0 +1,37 @@ +''' +WDT test for the CC3200 based boards +''' + +from pyb import WDT + +# test the invalid cases first +try: + wdt = WDT(1) +except Exception: + print("Exception") + +try: + wdt = WDT(0, 500) +except Exception: + print("Exception") + +try: + wdt = WDT(1, timeout=2000) +except Exception: + print("Exception") + +wdt = WDT(timeout=1000) +print(wdt) + +try: + wdt = WDT(0, timeout=2000) +except Exception: + print("Exception") + +pyb.delay(500) +wdt.feed() +print(wdt) +pyb.delay(900) +wdt.feed() +print(wdt) +pyb.delay(950) diff --git a/tests/wipy/wdt.py.exp b/tests/wipy/wdt.py.exp new file mode 100644 index 000000000..71f5e13b5 --- /dev/null +++ b/tests/wipy/wdt.py.exp @@ -0,0 +1,7 @@ +Exception +Exception +Exception +<WDT> +Exception +<WDT> +<WDT> |
