9 lines
195 B
Python
9 lines
195 B
Python
try:
|
|
import machine
|
|
machine.bootloader()
|
|
|
|
except ImportError:
|
|
import microcontroller
|
|
microcontroller.on_next_reset(microcontroller.RunMode.BOOTLOADER)
|
|
microcontroller.reset()
|