Skip to content

Commit 149aed1

Browse files
committed
add linemagic --bootloader option
closes #18 Signed-off-by: Jos Verlinde <[email protected]>
1 parent 56056ae commit 149aed1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/micropython_magic/octarine.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ def micropython(self, line: str, cell: str = ""):
222222
@argument("--reset", "--soft-reset", action="store_true", help="reset device.")
223223
@argument("--hard-reset", action="store_true", help="reset device.")
224224
@argument("--info", action="store_true", help="get boardinfo from device")
225+
@argument("--bootloader", action="store_true", help="make the device enter its bootloader")
226+
225227
@output_can_be_silenced
226228
def mpy_line(self, line: str):
227229
"""
@@ -258,6 +260,8 @@ def mpy_line(self, line: str):
258260
self.hard_reset()
259261
elif args.reset:
260262
self.soft_reset()
263+
elif args.bootloader:
264+
self.MCU.run_cmd("bootloader")
261265

262266
# processing
263267
if args.list:

0 commit comments

Comments
 (0)