32bitSaviour
32bitSaviour
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?
Something like
#define MELTA_SPI_DEVICE_INIT(inst, child) \
{ \
.reg = DT_PROP(child, reg), \
.spi_max_freq = DT_PROP(child, spi_max_frequency), \
.spi_cs_delay = DT_PROP(child, spi_cs_delay), \
.word_length = DT_PROP(child, word_length), \
},
#define MELTA_SPI_DEVICE_INIT(inst, child) \
{ \
.reg = DT_PROP(child, reg), \
.spi_max_freq = DT_PROP(child, spi_max_frequency), \
.spi_cs_delay = DT_PROP(child, spi_cs_delay), \
.word_length = DT_PROP(child, word_length), \
},
19 replies