PIO functions

The PIO (Programmable I/O) functions provide access to the Raspberry Pi Pico's PIO hardware for advanced I/O operations.

Register Reading Functions

PIO (FSTAT pio)

returns the value of the FSTAT register for the pio specified

PIO (FDEBUG pio)

returns the value of the FSDEBUG register for the pio specified

PIO (FLEVEL pio)

returns the value of the FLEVEL register for the pio specified

DMX Functions

PIO(DMX RX)

Returns the current data item being read by the PIO.

PIO(DMX TX)

Returns the current data item being written by the PIO.

Helper Functions for INIT MACHINE

PIO (EXECCTRL jmp_pin ,wrap_target, wrap [,side_pindir] [,side_en])

helper function to calculate the value of execctrl for the INIT MACHINE command

PIO (PINCTRL no_side_set_pins [,no_set_pins] [,no_out_pins] [,IN base] [,side_set_base] [,set_base][, out_base])

helper function to calculate the value of pinctrl for the INIT MACHINE command. Note: The pin parameters must be formatted as GPn.

PIO (SHIFTCTRL push_threshold [,pull_threshold] [,autopush] [,autopull] [,in_shiftdir] [,out_shiftdir] [,fjoin_tx] [,fjoin_rx])

helper function to calculate the value of shiftctrl for the INIT MACHINE command.