Good day
I have followed this link:
to develop a new device binding.
My dts file looks like this:
&i2c1 {
compatible = "nordic,nrf-twim";
status = "okay";
pinctrl-0 = <&i2c1_default>;
pinctrl-1 = <&i2c1_sleep>;
pinctrl-names = "default", "sleep";
pcf85063a@51 {
compatible = "nxp,pcf85063a";
reg = <0x51>;
};
lis2dh: lis2dh@18 {
compatible = "st,lis2dh";
reg = <0x18>;
irq-gpios = <&gpio0 4 0>;
};
st25dv04k: st25dv04k@17 {
compatible = "st,st25dv04k";
reg = <0x17>;
int-gpios = <&gpio0 19 0>;
};
};
my st,st25dv04k.yaml file looks like this:
description: | STM NFC tag used through i2c compatible: "st,st25dv04k" include: i2c-device.yaml properties: int-gpios: type: phandle-array required: true
In my main.c file, I am able to to this :
const struct device *i2c_dev = DEVICE_DT_GET(DT_NODELABEL(st25dv04k));
and the program builds. However, when I attempt to use the device, such as
if (!device_is_ready(i2c_dev)) {
printk("st25dv04k isn't ready!");
}
the device cannot build and I get the error:
\main.c:42: undefined reference to `__device_dts_ord_106'
Please assist.
Kind regards,
Hassan