Skip to content
Commit e8457de6 authored by Mehdi Zemzem's avatar Mehdi Zemzem Committed by Maureen Helm
Browse files

drivers: sensor: iis2dh: Add macro DT_DRV_COMPAT to iis2dh_trigger.c



Without this define, the structure iis2dh_device_config
is defined incorrectly.

The structure is defined in iis2dh.h file as follows:
struct iis2dh_device_config {
	struct spi_dt_spec spi;
	struct i2c_dt_spec i2c;
	uint8_t pm;
	struct gpio_dt_spec int_gpio;
};

without the macro

the structure is defined as
struct iis2dh_device_config {
 uint8_t pm;
 struct gpio_dt_spec int_gpio;
};

which results in accessing the wrong data when
calling iis2dh_init_interrupt
function (or any other functions in this file)

Signed-off-by: default avatarMehdi Zemzem <mehdi.zemzem2@gmail.com>
parent a5f2b6bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment