I like to create an user app that uses 2 IC connected via I2C with my MCU. Doing this is a bit tricky because I am missing some documentation, that is describing how the whole process goes.
My setup is simple:
1.) custom board based on the stm32f412RG
1.1) the IC are connected via I2C
1.2) dts changes:
status = "ok";
clock-frequency = <I2C_BITRATE_FAST>;
compatible = "xxx,codec1";
reg = <0x48>;
label = "codec1";
compatible = "xxx,codec2";
reg = <0x46>;
label = "codec2";
readAddr = <0x8F>;
writeAddr = <0x8E>;
2.) user app
2.1) custom driver (codec1.c and codec2.c)
How can I get the value of the I2C slave address from the dts inside of my source code?
How can I find and access the c-files after the dts compilation?
How Zephyr connects the c code of the dts, kernel, drivers, user drivers and app?
Any help is welcome!