Hi,
I'm on NCS 1.4.2 and working on a custom hardware based on nrf52840dk. We have a Lis2Dh12 3 axis accelerometer on our board and our manufacturing team wants to substitute it for the lis2dw12 accelerometer. I know I can create multiple build configurations for the 2 different configurations but since we will have to support both in the field I would like to know if:
There is anyway to have one overlay and build configuration and for it to support both hardware variants i.e. the lis2dh12 and the lis2dw12. They are similar devices and the application we use them for is supported by both accelerometers. I've attached the relevant parts of my .overlay file
/ {
aliases {
lis2dh12-1 = &acc_lis2dh_spi;
};
};
&spi1 {
status = "okay";
compatible = "nordic,nrf-spi";
sck-pin = <0x23>;
mosi-pin = <0x24>;
miso-pin = <0x25>;
cs-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
acc_lis2dh_spi: lis2dh@0 {
compatible = "st,lis2dh";
reg = <0>;
spi-max-frequency = <10000000>;
irq-gpios = <&gpio1 2 1>;
label = "LIS2DH";
};
};