def boot(mw, transport, args): bl = MW.Bootloader() bl.start() sleep(1) bl.deselect(0) while MW.ok(): sleep(0.25) bl.bootload() bl.stop() return 0
def ls(mw, transport, args): bl = MW.Bootloader() bl.start() sleep(1) if args.interactive: while MW.ok(): print("------------------------") for k in bl.getSlaves(): print(("%08X" % k) + ', ' + bl._slavesTypes[k] + ', ' + bl._slavesNames[k]) pass bl.clear() sleep(2) else: sleep(3) for k in bl.getSlaves(): print("%08X" % k) bl.stop() return 0