9#ifndef ZEPHYR_DRIVERS_MISC_PIO_PICO_RPI_PIO_PICO_RPI_H_
10#define ZEPHYR_DRIVERS_MISC_PIO_PICO_RPI_PIO_PICO_RPI_H_
14#include <hardware/pio.h>
25#define RPI_PICO_PIO_DEFINE_PROGRAM(name, wrap_target, wrap, ...) \
26 static const uint32_t name ## _wrap_target = wrap_target; \
27 static const uint32_t name ## _wrap = wrap; \
28 static const uint16_t name ## _program_instructions[] = { \
31 static const struct pio_program name ## _program = { \
32 .instructions = name ## _program_instructions, \
33 .length = ARRAY_SIZE(name ## _program_instructions), \
42#define RPI_PICO_PIO_GET_WRAP_TARGET(name) name ## _wrap_target
49#define RPI_PICO_PIO_GET_WRAP(name) name ## _wrap
56#define RPI_PICO_PIO_GET_PROGRAM(name) &name ## _program
103#define DT_RPI_PICO_PIO_PIN_BY_NAME(node_id, p_name, p_idx, g_name, g_idx) \
104 RP2_GET_PIN_NUM(DT_PROP_BY_IDX( \
105 DT_CHILD(DT_PINCTRL_BY_NAME(node_id, p_name, p_idx), g_name), pinmux, g_idx))
119#define DT_INST_RPI_PICO_PIO_PIN_BY_NAME(inst, p_name, p_idx, g_name, g_idx) \
120 DT_RPI_PICO_PIO_PIN_BY_NAME(DT_DRV_INST(inst), p_name, p_idx, g_name, g_idx)
128#define DT_INST_PIO_PIN_BY_NAME(inst, name) \
129 DT_PIO_PIN_BY_NAME(DT_DRV_INST(inst), name)
GPIO Devicetree macro public API header file.
int pio_rpi_pico_allocate_sm(const struct device *dev, size_t *sm)
Allocate a state machine.
PIO pio_rpi_pico_get_pio(const struct device *dev)
Get PIO object.
Runtime device structure (in ROM) per driver instance.
Definition: device.h:399