INNER CODE UNIT · Python

get_platformio_env

xoseperez/espurna · code/ota.py:400

def get_platformio_env(arduino_core, size):
    prefix = "esp8266"
    if not size in [1, 2, 4]:
        raise ValueError(
            "Board memory size can only be one of: 1 for 1M, 2 for 2M, 4 for 4M"
        )
    core = ""
    if arduino_core != "current":
        core = "-{}".format(arduino_core)
    return "{prefix}-{size:d}m{core}-base".format(prefix=prefix, core=core, size=size)


def main(args):

    print()
    print(DESCRIPTION)
    print()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…