Add maintenance mode and board status indicators
Provide BOOT-triggered USB CDC maintenance mode for file updates, plus onboard LED activity flashes and enhanced display status information.
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
"""Configure native USB HID before MicroPython starts main.py."""
|
||||
"""Select USB HID or local USB-REPL maintenance mode before main.py."""
|
||||
|
||||
from hid import initialise
|
||||
import maintenance
|
||||
|
||||
# Keep the configured USB device and its callbacks alive for the whole session.
|
||||
hid = initialise()
|
||||
# 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()
|
||||
|
||||
Reference in New Issue
Block a user