Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

SDK • Re: PIO wait/jmp requires explicit GPIO function setup – documentation misleading?

$
0
0
Ah, that explains my observation. The comment on pio.h:

Code:

/*! \brief Setup the function select for a GPIO to use output from the given PIO instance *  \ingroup hardware_pio * * PIO appears as an alternate function in the GPIO muxing, just like an SPI * or UART. This function configures that multiplexing to connect a given PIO * instance to a GPIO. Note that this is not necessary for a state machine to * be able to read the *input* value from a GPIO, but only for it to set the * output value or output enable. * * \param pio The PIO instance; e.g. \ref pio0 or \ref pio1 * \param pin the GPIO pin whose function select to set */static inline void pio_gpio_init(PIO pio, uint pin) {    check_pio_param(pio);    valid_params_if(HARDWARE_PIO, pin < NUM_BANK0_GPIOS);    gpio_set_function(pin, PIO_FUNCSEL_NUM(pio, pin));}
completely misled me.

Statistics: Posted by derGerd — Wed Oct 29, 2025 3:19 pm



Viewing all articles
Browse latest Browse all 8082

Trending Articles