epio
A cycle-accurate RP2350 PIO emulator
Loading...
Searching...
No Matches
Functions
apio Integration API

Functions for creating an epio instance from apio state. More...

Functions

EPIO_EXPORT epio_tepio_from_apio (void)
 Create an epio instance configured from the current apio state.
 
EPIO_EXPORT int epio_disassemble_sm (epio_t *epio, uint8_t block, uint8_t sm, char *buffer, size_t buffer_size)
 Disassemble the instructions of a state machine.
 

Detailed Description

Functions for creating an epio instance from apio state.

Function Documentation

◆ epio_disassemble_sm()

EPIO_EXPORT int epio_disassemble_sm ( epio_t epio,
uint8_t  block,
uint8_t  sm,
char *  buffer,
size_t  buffer_size 
)

Disassemble the instructions of a state machine.

Parameters
epioThe epio instance.
blockPIO block number.
smState machine number.
bufferBuffer to store the disassembled instructions.
buffer_sizeSize of the buffer.
Returns
Number of characters written to the buffer. 0 indicates a failure, for example no debug information available for the specified SM. -1 indicates the buffer was too small to hold the full disassembly.

◆ epio_from_apio()

EPIO_EXPORT epio_t * epio_from_apio ( void  )

Create an epio instance configured from the current apio state.

Reads the PIO program, SM configuration, and GPIO state assembled by apio and uses it to initialise and return a fully configured epio instance. This is the recommended entry point when using epio with apio.

Only available when APIO_EMULATION is defined (i.e. on non-RP2350 hosts).

Returns
Pointer to the configured epio instance, or NULL on failure.
See also
epio_init(), epio_free()