Closed kevinjwalters closed 2 years ago
This may require additional code in the RP2040 CircuitPython code to distinguish between optional and non-optional side
sets, cf https://github.com/micropython/micropython/blob/046164098337cc79dd0f6c710f49bdf6765aa711/ports/rp2/rp2_pio.c#L511-L522
I just spent a few hours to find this again (with examples the same as #21) - including disassembling. Can we put a notice for this in https://circuitpython.readthedocs.io/en/latest/shared-bindings/rp2pio/index.html?#rp2pio.StateMac?
@dannystaple I don't think the CircuitPython doc should be updated for it because the issue is this library. I think it should work on the CP side. Instead, an error could be thrown by PIOASM if .side_set is in the assembly.
I'm working on this now because it's needed for UART TX.
Ah, that is even better. Let me know if you need a PR tested - I can give it a go.
The optional
opt
flag for .side_set is not currently implemented in the assembler. This is used in some of the common PIO examples and an example in section 3.5.4 of the RP2040 data sheet.