extern const struct pbl_intc sym##_intc; \
static struct pbl_gpio_qemu_state sym##_qemu_state; \
PBL_DEVICE_STATE_DEFINE(sym); \
PBL_INTC_STATE_DEFINE(sym##_intc, _num_pins); \
.port =
PBL_GPIO_PORT_INIT(sym, _name, pbl_gpio_qemu_init,
nullptr, &pbl_gpio_qemu_port_ops, \
_num_pins, &sym##_intc), \
.base = (_base), \
.irq = (_irq), \
.state = &sym##_qemu_state, \
}; \
PBL_DEVICE_INSTANCE(sym##_intc,
struct pbl_gpio_qemu_intc,
struct pbl_intc, intc){ \
.intc =
PBL_INTC_INIT(sym##_intc, _name
"_intc",
nullptr, &sym##_inst.port.dev, \
&pbl_gpio_qemu_intc_ops), \
.port = &sym##_inst, \
}; \
PBL_IRQ_CONNECT_NUM(_irq, CONFIG_GPIO_QEMU_IRQ_PRIO, pbl_gpio_qemu_irq_handler, &sym##_inst, 0)
QEMU GPIO port.
Definition qemu.h:31
A GPIO controller.
Definition gpio.h:101
#define PBL_GPIO_PORT_INIT(sym, _name, _init, _parent, _ops, _num_pins, _intc)
Initializer for a struct pbl_gpio_port.
Definition gpio.h:123
An interrupt controller.
Definition intc.h:89
#define PBL_INTC_INIT(sym, _name, _init, _parent, _ops)
Initializer for the struct pbl_intc of controller sym.
Definition intc.h:123
Define a QEMU GPIO port and its interrupt controller, sym_intc.