diff --git a/drivers/sensor/examplesensor/examplesensor.c b/drivers/sensor/examplesensor/examplesensor.c index 2443948..83cd4cb 100644 --- a/drivers/sensor/examplesensor/examplesensor.c +++ b/drivers/sensor/examplesensor/examplesensor.c @@ -26,7 +26,7 @@ static int examplesensor_sample_fetch(const struct device *dev, const struct examplesensor_config *config = dev->config; struct examplesensor_data *data = dev->data; - data->state = gpio_pin_get(config->input.port, config->input.pin); + data->state = gpio_pin_get_dt(&config->input); return 0; }