toggle quoted messageShow quoted text
Thanks Erwan for the reply. I checked the "dts/bindings/sensor/"
dir to get an idea.
If I get it right I need to create the files "xxx,codec1.yaml"
I don't like to dirty the zephyr source tree because I think
mixing own stuff and official stuff will create problems on the
long run. So how I do create an own "dts/bindings" binding dir and
include it into the zephyr build process?
I was checking for a zephyr related yaml doc. I put on the search
of official documentation page, but got no
There is a YAML spec (https://yaml.org/spec/1.2/spec.html) but I
misses the structure and keywords zephyr is using. Any idea were
to search for it? - or maybe a simple explained example
On 07/01/2019 09:26, Erwan Gouriou
To generate #define's from dt, you need to
provide the matching yaml binding to indicate how fields
should be decided, this should be done under dts/bindings/...
Generated #define's will be available in build
directory, under zephyr/include/generated/generated_...
You should be able to use them as you wish.
To make your driver somewhat generic (ie not
depending on the node address, you'll need to provide
intermediate #define in dts_fixup.h file (under soc/ or
For more information, you can check in various
drivers how DT_xxxx constants are used
Le ven. 4 janv. 2019 à 17:30, Stefan Jaritz
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
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
How Zephyr connects the c code of the dts, kernel, drivers,
Any help is welcome!