diff options
| author | whitequark <whitequark@whitequark.org> | 2019-06-04 11:06:01 +0000 |
|---|---|---|
| committer | whitequark <whitequark@whitequark.org> | 2019-06-04 11:06:01 +0000 |
| commit | ecda2a1d08af7c226c87c5bd40fc5d634a4b06a9 (patch) | |
| tree | 116b3064d2f1bcaac57fdcc4f823805aca4825c8 /nmigen_boards/icestick.py | |
| parent | 50403d6846ede8fac502fc919bae91d74875cb72 (diff) | |
Blink all LEDs at 1 Hz if any board is run as __main__.
Diffstat (limited to 'nmigen_boards/icestick.py')
| -rw-r--r-- | nmigen_boards/icestick.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nmigen_boards/icestick.py b/nmigen_boards/icestick.py index 1fe7954..fa58df4 100644 --- a/nmigen_boards/icestick.py +++ b/nmigen_boards/icestick.py @@ -61,3 +61,8 @@ class ICEStickPlatform(LatticeICE40Platform): iceprog = os.environ.get("ICEPROG", "iceprog") with products.extract("{}.bin".format(name)) as bitstream_filename: subprocess.run([iceprog, bitstream_filename], check=True) + + +if __name__ == "__main__": + from ._blinky import build_and_program + build_and_program(ICEStickPlatform) |
