zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.65k stars 6.52k forks source link

rpi_pico: Making possible to set the initial state of PIO pins with pinctrl #69714

Open soburi opened 7 months ago

soburi commented 7 months ago

I want to initialize PIO output and side set pins, but That is not possible with the current pinctrl.

Settings must be made before gpio_set_function.

MicroPython implementation is good example. https://github.com/micropython/micropython/blob/bc424ddc4165ffd8203b4e781f7c686598601e15/ports/rp2/rp2_pio.c#L226-L233

nordicjm commented 7 months ago

Note: initial state should be set using gpio-hogs