melta101
DIIDevHeads IoT Integration Server
•Created by melta101 on 12/23/2024 in #📦-middleware-and-os
How to Configure DTS and Struct for SPI Controller Driver with Child Nodes in Zephyr?
the define macros should look like this
#define SPI_OMAP_DEVICE_INIT(inst) \
static const struct spi_cs_omap_config spi_cs_omapconfig##inst[] = SPI_SENSOR_CONFIG_ARRAY(inst); \
static struct spi_omap_config spi_omapconfig##inst = { \
DEVICE_MMIO_NAMED_ROM_INIT(DT_INST_REG_ADDR(inst)), \
.irq = DT_INST_IRQN(inst), \
.cs_config = spi_cs_omapconfig##inst, \
};
if i am not wrong
19 replies