From ecda2a1d08af7c226c87c5bd40fc5d634a4b06a9 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 4 Jun 2019 11:06:01 +0000 Subject: Blink all LEDs at 1 Hz if any board is run as __main__. --- nmigen_boards/tinyfpga_bx.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nmigen_boards/tinyfpga_bx.py') diff --git a/nmigen_boards/tinyfpga_bx.py b/nmigen_boards/tinyfpga_bx.py index 087f6d9..3793a58 100644 --- a/nmigen_boards/tinyfpga_bx.py +++ b/nmigen_boards/tinyfpga_bx.py @@ -61,3 +61,8 @@ class TinyFPGABXPlatform(LatticeICE40Platform): tinyprog = os.environ.get("TINYPROG", "tinyprog") with products.extract("{}.bin".format(name)) as bitstream_filename: subprocess.run([tinyprog, "-p", bitstream_filename], check=True) + + +if __name__ == "__main__": + from ._blinky import build_and_program + build_and_program(TinyFPGABXPlatform) -- cgit v1.2.3