mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-06-03 21:01:17 +08:00
Add bootloadHID support to qmk flash (#26053)
Some checks failed
Update API Data / api_data (push) Has been cancelled
Essential files modified / tag (push) Has been cancelled
CLI CI / test (push) Has been cancelled
Update develop after master merge / develop_update (push) Has been cancelled
Generate Docs / generate (push) Has been cancelled
Lint Format / lint (push) Has been cancelled
Regenerate Files / regen (push) Has been cancelled
Unit Tests / test (push) Has been cancelled
Some checks failed
Update API Data / api_data (push) Has been cancelled
Essential files modified / tag (push) Has been cancelled
CLI CI / test (push) Has been cancelled
Update develop after master merge / develop_update (push) Has been cancelled
Generate Docs / generate (push) Has been cancelled
Lint Format / lint (push) Has been cancelled
Regenerate Files / regen (push) Has been cancelled
Unit Tests / test (push) Has been cancelled
This commit is contained in:
parent
01e30d407c
commit
5629ecf5ff
@ -136,6 +136,10 @@ def _find_serial_port(vid, pid):
|
||||
return None
|
||||
|
||||
|
||||
def _flash_bootloadhid(file):
|
||||
cli.run(['bootloadHID', '-r', file], capture_output=False)
|
||||
|
||||
|
||||
def _flash_caterina(details, file):
|
||||
port = _find_serial_port(details[0], details[1])
|
||||
if port:
|
||||
@ -218,6 +222,8 @@ def flasher(mcu, file):
|
||||
time.sleep(1)
|
||||
if bl == 'atmel-dfu':
|
||||
_flash_atmel_dfu(details, file)
|
||||
elif bl == 'bootloadhid':
|
||||
_flash_bootloadhid(file)
|
||||
elif bl == 'caterina':
|
||||
if _flash_caterina(details, file):
|
||||
return (True, "The Caterina bootloader was found but is not writable. Check 'qmk doctor' output for advice.")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user