|
Zephyr API Documentation 4.3.0-rc1
A Scalable Open Source RTOS
|
Interfaces for Raspberry Pi Pico Programmable I/O (PIO). More...
Files | |
| file | pio_rpi_pico.h |
| Header file for Raspberry Pi Pico PIO driver. | |
Macros | |
| #define | RPI_PICO_PIO_DEFINE_PROGRAM(name, wrap_target, wrap, ...) |
| Utility macro to define a PIO program. | |
| #define | RPI_PICO_PIO_GET_WRAP_TARGET(name) |
| Utility macro to get the wrap target of a program. | |
| #define | RPI_PICO_PIO_GET_WRAP(name) |
| Utility macro to get the wrap source of a program. | |
| #define | RPI_PICO_PIO_GET_PROGRAM(name) |
| Utility macro to get a pointer to a PIO program. | |
| #define | DT_RPI_PICO_PIO_PIN_BY_NAME(node_id, p_name, p_idx, g_name, g_idx) |
| Get a pin number from a pinctrl / group name and index. | |
| #define | DT_INST_RPI_PICO_PIO_PIN_BY_NAME(inst, p_name, p_idx, g_name, g_idx) |
| Get a pin number from a pinctrl / group name and index. | |
| #define | DT_INST_PIO_PIN_BY_NAME(inst, name) |
| Get the pin number of a pin by its name. | |
Functions | |
| PIO | pio_rpi_pico_get_pio (const struct device *dev) |
| Get PIO object. | |
| int | pio_rpi_pico_allocate_sm (const struct device *dev, size_t *sm) |
| Allocate a state machine. | |
Interfaces for Raspberry Pi Pico Programmable I/O (PIO).
| #define DT_INST_PIO_PIN_BY_NAME | ( | inst, | |
| name ) |
#include <zephyr/drivers/misc/pio_rpi_pico/pio_rpi_pico.h>
Get the pin number of a pin by its name.
| inst | instance number |
| name | name of the pin (e.g. tx, rx, sck). |
| #define DT_INST_RPI_PICO_PIO_PIN_BY_NAME | ( | inst, | |
| p_name, | |||
| p_idx, | |||
| g_name, | |||
| g_idx ) |
#include <zephyr/drivers/misc/pio_rpi_pico/pio_rpi_pico.h>
Get a pin number from a pinctrl / group name and index.
| inst | instance number |
| p_name | pinctrl name |
| p_idx | pinctrl index |
| g_name | group name |
| g_idx | group index |
| #define DT_RPI_PICO_PIO_PIN_BY_NAME | ( | node_id, | |
| p_name, | |||
| p_idx, | |||
| g_name, | |||
| g_idx ) |
#include <zephyr/drivers/misc/pio_rpi_pico/pio_rpi_pico.h>
Get a pin number from a pinctrl / group name and index.
Example devicetree fragment(s):
Example usage:
| node_id | node identifier |
| p_name | pinctrl name |
| p_idx | pinctrl index |
| g_name | group name |
| g_idx | group index |
| #define RPI_PICO_PIO_DEFINE_PROGRAM | ( | name, | |
| wrap_target, | |||
| wrap, | |||
| ... ) |
#include <zephyr/drivers/misc/pio_rpi_pico/pio_rpi_pico.h>
Utility macro to define a PIO program.
The program is a list of 16 bit instructions, generated by the pioasm tool.
| name | Name of the program. |
| wrap_target | Wrap target as specified by the PIO program. |
| wrap | Wrap source as specified by the PIO program. |
| ... | Comma separated list of PIO instructions. |
| #define RPI_PICO_PIO_GET_PROGRAM | ( | name | ) |
#include <zephyr/drivers/misc/pio_rpi_pico/pio_rpi_pico.h>
Utility macro to get a pointer to a PIO program.
| name | Name of the program. |
| #define RPI_PICO_PIO_GET_WRAP | ( | name | ) |
#include <zephyr/drivers/misc/pio_rpi_pico/pio_rpi_pico.h>
Utility macro to get the wrap source of a program.
| name | Name of the program. |
| #define RPI_PICO_PIO_GET_WRAP_TARGET | ( | name | ) |
#include <zephyr/drivers/misc/pio_rpi_pico/pio_rpi_pico.h>
Utility macro to get the wrap target of a program.
| name | Name of the program. |
#include <zephyr/drivers/misc/pio_rpi_pico/pio_rpi_pico.h>
Allocate a state machine.
| dev | Pointer to device structure for rpi_pio device instance |
| sm | Pointer to store allocated state machine |
| 0 | on success |
| -EBUSY | if no state machines were available |
|
inline |
#include <zephyr/drivers/misc/pio_rpi_pico/pio_rpi_pico.h>
Get PIO object.
| dev | Pointer to device structure for rpi_pio device instance |