kmk_firmware/util/bootloader.py
2018-10-11 12:37:06 -07:00

9 lines
195 B
Python

try:
import machine
machine.bootloader()
except ImportError:
import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.BOOTLOADER)
microcontroller.reset()