4328b2c75f
While working on the [online pioasm](https://wokwi.com/tools/pioasm), I found several PIO instructions that result in invalid python code. Here is a small program that demonstrate the issue: ``` .program python_issue push block wait 0 irq 1 rel irq clear 1 rel ``` And the resulting Python program: ```python # -------------------------------------------------- # # This file is autogenerated by pioasm; do not edit! # # -------------------------------------------------- # import rp2 from machine import Pin # ----------- # # python_test # # ----------- # @rp2.asm_pio() def python_test(): wrap_target() push(, block) # 0 wait(0, irq, 1 rel) # 1 irq(clear 1 rel) # 2 wrap() ``` After this fix, the above program compiles to a valid python syntax: ```python # -------------------------------------------------- # # This file is autogenerated by pioasm; do not edit! # # -------------------------------------------------- # import rp2 from machine import Pin # ----------- # # python_test # # ----------- # @rp2.asm_pio() def python_test(): wrap_target() push(block) # 0 wait(0, irq, rel(1)) # 1 irq(clear, rel(1)) # 2 wrap() ``` |
||
---|---|---|
.. | ||
gen | ||
ada_output.cpp | ||
c_sdk_output.cpp | ||
CMakeLists.txt | ||
hex_output.cpp | ||
lexer.ll | ||
main.cpp | ||
output_format.h | ||
parser.yy | ||
pio_assembler.cpp | ||
pio_assembler.h | ||
pio_disassembler.cpp | ||
pio_disassembler.h | ||
pio_types.h | ||
python_output.cpp |