Loading...
Searching...
No Matches
pio_program Struct Reference

PIO program definition. More...

#include <pio.h>

Data Fields

const uint16_t * instructions
 the array of length encoded instructions that make up the program
uint8_t length
 the number of instructions in instructions (also the amount of instruction memory the program occupies)
int8_t origin
 the required load offset in PIO instruction memory, or -1 if the program is relocatable and may be loaded at any offset
uint8_t pio_version
 the minimum PIO hardware version the program requires (0 for any PIO); loading a program that requires a newer version than the target PIO fails with PICO_ERROR_VERSION_MISMATCH

Detailed Description

PIO program definition.

This structure describes a PIO program: the array of encoded instructions plus the metadata needed to load it onto a PIO instance. It is the type emitted by the pioasm tool (as <program_name>_program) and consumed by pio_add_program, pio_can_add_program and related functions. It may also be populated by hand when assembling programs at runtime with the helpers in pio_instructions.h.


The documentation for this struct was generated from the following file: