drivers: i2c: make DMA config field conditional on I2C
This commit updates I2C_DMA_DATA_INIT() macro to use
IF_ENABLED(DT_INST_DMAS_HAS_NAME(...), (...)),
so that the DMA configuration field is only generated if the
corresponding DMA property exists in the Device Tree.
This prevents macro expansion errors and allows a mix of I2C
peripherals with and without DMA support in the same build.
Signed-off-by:
Khaoula Bidani <khaoula.bidani-ext@st.com>
Loading
Please sign in to comment