Пример #1
0
def load_plugin():
    add_micropython_backend("CircuitPython", CircuitPythonProxy, 
                            "CircuitPython (generic)", CircuitPythonConfigPage)
    
    get_workbench().add_command("installcp", "device", "Install CircuitPython firmware ...",
                                lambda: show_dialog(FlashingDialog()),
                                group=40)
Пример #2
0
def load_plugin():
    add_micropython_backend("pyboard", PyboardProxy, "MicroPython on pyboard",
                            PyboardConfigPage)
    get_workbench().add_command(
        "uploadmicropythonpyboard",
        "device",
        "Instructions for installing MicroPython to pyboard ...",
        select_and_upload_micropython,
        group=40)
Пример #3
0
def load_plugin():
    add_micropython_backend("M5Stack", M5StackProxy, "MicroPython on M5Stack",
                            M5StackConfigPage)

    def open_m5burner():
        dlg = M5Burner(get_workbench())
        ui_utils.show_dialog(dlg)

    get_workbench().add_command("m5burner",
                                "device",
                                "Open M5Burner...",
                                open_m5burner,
                                group=40)
Пример #4
0
def load_plugin():
    add_micropython_backend(
        "ESP32",
        ESP32Proxy,
        "MicroPython (ESP32)",
        ESP32ConfigPage,
        sort_key="32",
        write_block_size=255,
        write_block_delay=0.5,
    )
    add_micropython_backend(
        "ESP8266", ESP8266Proxy, "MicroPython (ESP8266)", ESP8266ConfigPage, sort_key="33"
    )
Пример #5
0
def load_plugin():
    add_micropython_backend("CalliopeMini", CalliopeMiniProxy,
                            "MicroPython on Calliope mini",
                            CalliopeMiniConfigPage)

    firmware_dir = os.path.join(os.path.dirname(__file__), "firmware")
    for name in sorted(os.listdir(firmware_dir)):
        if name.endswith(".hex"):

            def action(hex_path=os.path.join(firmware_dir, name)):
                flash_the_firmware(hex_path)

            get_workbench().add_command("uploadmicropythoncalliope" + name,
                                        "device",
                                        "Install %s to Calliope Mini" %
                                        name[:-4].replace("_", " "),
                                        action,
                                        group=40)