adafruit_pioasm

Simple assembler to convert pioasm to bytes

  • Author(s): Scott Shawcroft

class adafruit_pioasm.Program(text_program: str, *, build_debuginfo=False)

Encapsulates a program’s instruction stream and configuration flags

Example:

program = adafruit_pioasm.Program(...)
state_machine = rp2pio.StateMachine(program.assembled, ..., **program.pio_kwargs)

Converts pioasm text to encoded instruction bytes

print_c_program(name, qualifier='const')

Print the program into a C program snippet

adafruit_pioasm.assemble(program_text: str) array

Converts pioasm text to encoded instruction bytes

In new code, prefer to use the Program class so that the extra arguments such as the details about side-set pins can be easily passsed to the StateMachine constructor.

adafruit_pioasm.mov_splitter(string, maxsplit=0)

Split string by the occurrences of pattern.

adafruit_pioasm.splitter(string, maxsplit=0)

Split string by the occurrences of pattern.