Struct pio::Assembler

source ·
pub struct Assembler<const PROGRAM_SIZE: usize> { /* private fields */ }
Expand description

A PIO Assembler. See chapter three of the RP2040 Datasheet.

Implementations§

Create a new Assembler.

Create a new Assembler with SideSet settings.

Assemble the program into PIO instructions.

Assemble the program into Program.

The program contains the instructions and side-set info set. You can directly compile into a program with correct wrapping with Self::assemble_with_wrap, or you can set the wrapping after the compilation with Program::set_wrap.

Assemble the program into Program with wrapping.

Takes pair of labels controlling the wrapping. The first label is the source (top) of the wrap while the second label is the target (bottom) of the wrap. The source label should be positioned after the instruction from which the wrapping happens.

Get the offset of a label in the program.

Create a new unbound Label.

Create a new label bound to given offset.

Bind label to the current instruction position.

Emit a jmp instruction to label for condition.

Emit a jmp instruction to label for condition.

Emit a jmp instruction to label for condition.

Emit a jmp instruction to label for condition.

Emit a wait instruction with polarity from source with index which may be relative.

Emit a wait instruction with polarity from source with index which may be relative.

Emit a wait instruction with polarity from source with index which may be relative.

Emit a wait instruction with polarity from source with index which may be relative.

Emit an in instruction from source with bit_count.

Emit an in instruction from source with bit_count.

Emit an in instruction from source with bit_count.

Emit an in instruction from source with bit_count.

Emit an out instruction to source with bit_count.

Emit an out instruction to source with bit_count.

Emit an out instruction to source with bit_count.

Emit an out instruction to source with bit_count.

Emit a push instruction with if_full and block.

Emit a push instruction with if_full and block.

Emit a push instruction with if_full and block.

Emit a push instruction with if_full and block.

Emit a pull instruction with if_empty and block.

Emit a pull instruction with if_empty and block.

Emit a pull instruction with if_empty and block.

Emit a pull instruction with if_empty and block.

Emit a mov instruction to destination using op from source.

Emit a mov instruction to destination using op from source.

Emit a mov instruction to destination using op from source.

Emit a mov instruction to destination using op from source.

Emit an irq instruction using clear and wait with index which may be relative.

Emit an irq instruction using clear and wait with index which may be relative.

Emit an irq instruction using clear and wait with index which may be relative.

Emit an irq instruction using clear and wait with index which may be relative.

Emit a set instruction

Emit a set instruction

Emit a set instruction

Emit a set instruction

Emit a mov instruction from Y to Y without operation effectively acting as a nop instruction.

Emit a mov instruction from Y to Y without operation effectively acting as a nop instruction.

Emit a mov instruction from Y to Y without operation effectively acting as a nop instruction.

Emit a mov instruction from Y to Y without operation effectively acting as a nop instruction.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.