circuitpython/tests/wipy/reset/reset.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
342 B
Python
Raw Normal View History

"""
2015-09-26 16:55:24 -04:00
Reset script for the cc3200 boards
This is needed to force the board to reboot
with the default WLAN AP settings
"""
2015-09-26 16:55:24 -04:00
2015-09-27 07:45:48 -04:00
from machine import WDT
2015-09-26 16:55:24 -04:00
import time
2015-09-27 07:45:48 -04:00
import os
mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
raise Exception("Board not supported!")
2015-09-26 16:55:24 -04:00
wdt = WDT(timeout=1000)
print(wdt)
time.sleep_ms(900)