Struct pio::Program

source · []
pub struct Program<const PROGRAM_SIZE: usize> {
    pub code: ArrayVec<u16, PROGRAM_SIZE>,
    pub origin: Option<u8>,
    pub wrap: Wrap,
    pub side_set: SideSet,
}
Expand description

Program ready to be executed by PIO hardware.

Fields

code: ArrayVec<u16, PROGRAM_SIZE>

Assembled program code.

origin: Option<u8>

Offset at which the program must be loaded.

Most often 0 if defined. This might be needed when using data based JMPs.

wrap: Wrap

Wrapping behavior for this program.

side_set: SideSet

Side-set info for this program.

Implementations

Set the program loading location.

If None, the program can be loaded at any location in the instruction memory.

Set the wrapping of the program.

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.