Added circuitpython support to utils

This commit is contained in:
Kyle Brown 2018-09-25 18:23:24 -07:00
parent 97f70d7a13
commit 14233b77d3
2 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,8 @@
import machine
try:
import machine
machine.bootloader()
machine.bootloader()
except ImportError:
import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.BOOTLOADER)
microcontroller.reset()

View File

@ -1,3 +1,7 @@
import machine
try:
import machine
machine.reset()
machine.reset()
except ImportError:
import microcontroller
microcontroller.reset()