adafruit / Adafruit_CircuitPython_PIOASM

Simple assembler to convert pioasm to bytes
MIT License
27 stars 17 forks source link

Support for PIO side_set Pin Direction #69

Open jchawks opened 1 month ago

jchawks commented 1 month ago

Currently the PIO Exec register configuration bit SIDE_EN is supported in the parser, but not support for SIDE_PINDIR: This means that in the line .side_set 1 opt pindirs the opt token is recognized but not pindirs:

    ...       elif line.startswith(".side_set"):
                sideset_count = int(line.split()[1], 0)
                sideset_enable = "opt" in line
            elif line.endswith(":"): 
           ...

If a sideset_dir variable is added, that can apply to the delay limit adjustment too, currently: max_delay = 2 ** (5 - sideset_count - sideset_enable) - 1
Additional detail in the request for the corresponding CP StateMachine() support is here, [https://github.com/adafruit/circuitpython/issues/9630]