Provide BOOT-triggered USB CDC maintenance mode for file updates, plus onboard LED activity flashes and enhanced display status information.
14 lines
437 B
Python
14 lines
437 B
Python
"""Select USB HID or local USB-REPL maintenance mode before main.py."""
|
|
|
|
import maintenance
|
|
|
|
# Press BOOT during this short window after a normal reset to retain the stock
|
|
# USB CDC REPL. Holding BOOT while resetting still enters ESP download mode.
|
|
maintenance.check_button()
|
|
|
|
if not maintenance.active:
|
|
from hid import initialise
|
|
|
|
# Keep the configured USB device and its callbacks alive for the session.
|
|
hid = initialise()
|