kmk_firmware/util/bootloader.py
2019-07-24 23:03:13 -07:00

11 lines
197 B
Python

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