drivers: sensor: Place API into iterable section
Add wrapper DEVICE_API macro to all sensor_driver_api instances. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
8c9a2b2e82
commit
a553af738d
205 changed files with 227 additions and 215 deletions
|
@ -114,7 +114,7 @@ static int a01nyub_sample_fetch(const struct device *dev, enum sensor_channel ch
|
|||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api a01nyub_api_funcs = {
|
||||
static DEVICE_API(sensor, a01nyub_api_funcs) = {
|
||||
.sample_fetch = a01nyub_sample_fetch,
|
||||
.channel_get = a01nyub_channel_get,
|
||||
};
|
||||
|
|
|
@ -505,7 +505,7 @@ static int adltc2990_channel_get(const struct device *dev, enum sensor_channel c
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api adltc2990_driver_api = {
|
||||
static DEVICE_API(sensor, adltc2990_driver_api) = {
|
||||
.sample_fetch = adltc2990_sample_fetch,
|
||||
.channel_get = adltc2990_channel_get,
|
||||
};
|
||||
|
|
|
@ -276,7 +276,7 @@ static int adt7310_init(const struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api adt7310_driver_api = {
|
||||
static DEVICE_API(sensor, adt7310_driver_api) = {
|
||||
.attr_set = adt7310_attr_set,
|
||||
.sample_fetch = adt7310_sample_fetch,
|
||||
.channel_get = adt7310_channel_get,
|
||||
|
|
|
@ -144,7 +144,7 @@ static int adt7420_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api adt7420_driver_api = {
|
||||
static DEVICE_API(sensor, adt7420_driver_api) = {
|
||||
.attr_set = adt7420_attr_set,
|
||||
.sample_fetch = adt7420_sample_fetch,
|
||||
.channel_get = adt7420_channel_get,
|
||||
|
|
|
@ -383,7 +383,7 @@ static int adxl345_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api adxl345_api_funcs = {
|
||||
static DEVICE_API(sensor, adxl345_api_funcs) = {
|
||||
.attr_set = adxl345_attr_set,
|
||||
.sample_fetch = adxl345_sample_fetch,
|
||||
.channel_get = adxl345_channel_get,
|
||||
|
|
|
@ -654,7 +654,7 @@ static int adxl362_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api adxl362_api_funcs = {
|
||||
static DEVICE_API(sensor, adxl362_api_funcs) = {
|
||||
.attr_set = adxl362_attr_set,
|
||||
.sample_fetch = adxl362_sample_fetch,
|
||||
.channel_get = adxl362_channel_get,
|
||||
|
|
|
@ -940,7 +940,7 @@ static int adxl367_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api adxl367_api_funcs = {
|
||||
static DEVICE_API(sensor, adxl367_api_funcs) = {
|
||||
.attr_set = adxl367_attr_set,
|
||||
.sample_fetch = adxl367_sample_fetch,
|
||||
.channel_get = adxl367_channel_get,
|
||||
|
|
|
@ -692,7 +692,7 @@ static int adxl372_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api adxl372_api_funcs = {
|
||||
static DEVICE_API(sensor, adxl372_api_funcs) = {
|
||||
.attr_set = adxl372_attr_set,
|
||||
.sample_fetch = adxl372_sample_fetch,
|
||||
.channel_get = adxl372_channel_get,
|
||||
|
|
|
@ -76,7 +76,7 @@ static int sb_tsi_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api sb_tsi_driver_api = {
|
||||
static DEVICE_API(sensor, sb_tsi_driver_api) = {
|
||||
.sample_fetch = sb_tsi_sample_fetch,
|
||||
.channel_get = sb_tsi_channel_get,
|
||||
};
|
||||
|
|
|
@ -127,7 +127,7 @@ int amg88xx_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api amg88xx_driver_api = {
|
||||
static DEVICE_API(sensor, amg88xx_driver_api) = {
|
||||
#ifdef CONFIG_AMG88XX_TRIGGER
|
||||
.attr_set = amg88xx_attr_set,
|
||||
.trigger_set = amg88xx_trigger_set,
|
||||
|
|
|
@ -81,7 +81,7 @@ static int as5600_initialize(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api as5600_driver_api = {
|
||||
static DEVICE_API(sensor, as5600_driver_api) = {
|
||||
.sample_fetch = as5600_fetch,
|
||||
.channel_get = as5600_get,
|
||||
};
|
||||
|
|
|
@ -93,7 +93,7 @@ static int iaqcore_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api iaq_core_driver_api = {
|
||||
static DEVICE_API(sensor, iaq_core_driver_api) = {
|
||||
.sample_fetch = iaqcore_sample_fetch,
|
||||
.channel_get = iaqcore_channel_get,
|
||||
};
|
||||
|
|
|
@ -304,7 +304,7 @@ static int ccs811_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api ccs811_driver_api = {
|
||||
static DEVICE_API(sensor, ccs811_driver_api) = {
|
||||
#ifdef CONFIG_CCS811_TRIGGER
|
||||
.attr_set = ccs811_attr_set,
|
||||
.trigger_set = ccs811_trigger_set,
|
||||
|
|
|
@ -260,7 +260,7 @@ static int ens210_wait_boot(const struct device *dev)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api en210_driver_api = {
|
||||
static DEVICE_API(sensor, en210_driver_api) = {
|
||||
.sample_fetch = ens210_sample_fetch,
|
||||
.channel_get = ens210_channel_get,
|
||||
};
|
||||
|
|
|
@ -241,7 +241,7 @@ static int tcs3400_sensor_setup(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api tcs3400_api = {
|
||||
static DEVICE_API(sensor, tcs3400_api) = {
|
||||
.sample_fetch = tcs3400_sample_fetch,
|
||||
.channel_get = tcs3400_channel_get,
|
||||
.attr_set = tcs3400_attr_set,
|
||||
|
|
|
@ -387,7 +387,7 @@ static int tmd2620_pm_action(const struct device *dev, enum pm_device_action act
|
|||
}
|
||||
#endif
|
||||
|
||||
static const struct sensor_driver_api tmd2620_driver_api = {
|
||||
static DEVICE_API(sensor, tmd2620_driver_api) = {
|
||||
.sample_fetch = tmd2620_sample_fetch,
|
||||
.channel_get = tmd2620_channel_get,
|
||||
#ifdef CONFIG_TMD2620_TRIGGER
|
||||
|
|
|
@ -335,7 +335,7 @@ static int tsl2540_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api tsl2540_driver_api = {
|
||||
static DEVICE_API(sensor, tsl2540_driver_api) = {
|
||||
.sample_fetch = tsl2540_sample_fetch,
|
||||
.channel_get = tsl2540_channel_get,
|
||||
.attr_set = tsl2540_attr_set,
|
||||
|
|
|
@ -245,7 +245,7 @@ static int tsl2561_channel_get(const struct device *dev, enum sensor_channel cha
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api tsl2561_driver_api = {
|
||||
static DEVICE_API(sensor, tsl2561_driver_api) = {
|
||||
.sample_fetch = tsl2561_sample_fetch,
|
||||
.channel_get = tsl2561_channel_get
|
||||
};
|
||||
|
|
|
@ -477,7 +477,7 @@ static int tsl2591_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api tsl2591_driver_api = {
|
||||
static DEVICE_API(sensor, tsl2591_driver_api) = {
|
||||
#ifdef CONFIG_TSL2591_TRIGGER
|
||||
.trigger_set = tsl2591_trigger_set,
|
||||
#endif
|
||||
|
|
|
@ -118,8 +118,10 @@ static int ags10_init(const struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api ags10_api = {.sample_fetch = ags10_sample_fetch,
|
||||
.channel_get = ags10_channel_get};
|
||||
static DEVICE_API(sensor, ags10_api) = {
|
||||
.sample_fetch = ags10_sample_fetch,
|
||||
.channel_get = ags10_channel_get,
|
||||
};
|
||||
|
||||
#define AGS10_INIT(n) \
|
||||
static struct ags10_data ags10_data_##n; \
|
||||
|
|
|
@ -230,7 +230,7 @@ static int dht_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api dht_api = {
|
||||
static DEVICE_API(sensor, dht_api) = {
|
||||
.sample_fetch = &dht_sample_fetch,
|
||||
.channel_get = &dht_channel_get,
|
||||
};
|
||||
|
|
|
@ -307,8 +307,10 @@ static int dht20_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api dht20_driver_api = {.sample_fetch = dht20_sample_fetch,
|
||||
.channel_get = dht20_channel_get};
|
||||
static DEVICE_API(sensor, dht20_driver_api) = {
|
||||
.sample_fetch = dht20_sample_fetch,
|
||||
.channel_get = dht20_channel_get,
|
||||
};
|
||||
|
||||
#define DT_DRV_COMPAT aosong_dht20
|
||||
#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)
|
||||
|
|
|
@ -226,7 +226,7 @@ static int apds9253_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api apds9253_driver_api = {
|
||||
static DEVICE_API(sensor, apds9253_driver_api) = {
|
||||
.sample_fetch = &apds9253_sample_fetch,
|
||||
.channel_get = &apds9253_channel_get,
|
||||
};
|
||||
|
|
|
@ -348,7 +348,7 @@ static int apds9306_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api apds9306_driver_api = {
|
||||
static DEVICE_API(sensor, apds9306_driver_api) = {
|
||||
.attr_set = apds9306_attr_set,
|
||||
.attr_get = apds9306_attr_get,
|
||||
.sample_fetch = apds9306_sample_fetch,
|
||||
|
|
|
@ -466,7 +466,7 @@ static int apds9960_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api apds9960_driver_api = {
|
||||
static DEVICE_API(sensor, apds9960_driver_api) = {
|
||||
.sample_fetch = &apds9960_sample_fetch,
|
||||
.channel_get = &apds9960_channel_get,
|
||||
#ifdef CONFIG_APDS9960_TRIGGER
|
||||
|
|
|
@ -86,7 +86,7 @@ static int ak8975_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api ak8975_driver_api = {
|
||||
static DEVICE_API(sensor, ak8975_driver_api) = {
|
||||
.sample_fetch = ak8975_sample_fetch,
|
||||
.channel_get = ak8975_channel_get,
|
||||
};
|
||||
|
|
|
@ -237,7 +237,7 @@ static int akm09918c_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api akm09918c_driver_api = {
|
||||
static DEVICE_API(sensor, akm09918c_driver_api) = {
|
||||
.sample_fetch = akm09918c_sample_fetch,
|
||||
.channel_get = akm09918c_channel_get,
|
||||
.attr_get = akm09918c_attr_get,
|
||||
|
|
|
@ -106,7 +106,7 @@ static int bma280_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api bma280_driver_api = {
|
||||
static DEVICE_API(sensor, bma280_driver_api) = {
|
||||
#if CONFIG_BMA280_TRIGGER
|
||||
.attr_set = bma280_attr_set,
|
||||
.trigger_set = bma280_trigger_set,
|
||||
|
|
|
@ -683,7 +683,7 @@ static int bma4xx_get_decoder(const struct device *dev, const struct sensor_deco
|
|||
* Sensor driver API
|
||||
*/
|
||||
|
||||
static const struct sensor_driver_api bma4xx_driver_api = {
|
||||
static DEVICE_API(sensor, bma4xx_driver_api) = {
|
||||
.attr_set = bma4xx_attr_set,
|
||||
.submit = bma4xx_submit,
|
||||
.get_decoder = bma4xx_get_decoder,
|
||||
|
|
|
@ -464,7 +464,7 @@ static int bmc150_magn_attr_set(const struct device *dev,
|
|||
}
|
||||
#endif
|
||||
|
||||
static const struct sensor_driver_api bmc150_magn_api_funcs = {
|
||||
static DEVICE_API(sensor, bmc150_magn_api_funcs) = {
|
||||
#if defined(BMC150_MAGN_SET_ATTR)
|
||||
.attr_set = bmc150_magn_attr_set,
|
||||
#endif
|
||||
|
|
|
@ -254,7 +254,7 @@ static int bme280_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api bme280_api_funcs = {
|
||||
static DEVICE_API(sensor, bme280_api_funcs) = {
|
||||
.sample_fetch = bme280_sample_fetch,
|
||||
.channel_get = bme280_channel_get,
|
||||
#ifdef CONFIG_SENSOR_ASYNC_API
|
||||
|
|
|
@ -478,7 +478,7 @@ static int bme680_init(const struct device *dev)
|
|||
return pm_device_driver_init(dev, bme680_pm_control);
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api bme680_api_funcs = {
|
||||
static DEVICE_API(sensor, bme680_api_funcs) = {
|
||||
.sample_fetch = bme680_sample_fetch,
|
||||
.channel_get = bme680_channel_get,
|
||||
};
|
||||
|
|
|
@ -272,7 +272,7 @@ static int bmg160_channel_get(const struct device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api bmg160_api = {
|
||||
static DEVICE_API(sensor, bmg160_api) = {
|
||||
.attr_set = bmg160_attr_set,
|
||||
#ifdef CONFIG_BMG160_TRIGGER
|
||||
.trigger_set = bmg160_trigger_set,
|
||||
|
|
|
@ -536,7 +536,7 @@ static int bmi08x_accel_pm_action(const struct device *dev, enum pm_device_actio
|
|||
}
|
||||
#endif /* CONFIG_PM_DEVICE */
|
||||
|
||||
static const struct sensor_driver_api bmi08x_api = {
|
||||
static DEVICE_API(sensor, bmi08x_api) = {
|
||||
.attr_set = bmi08x_attr_set,
|
||||
#ifdef CONFIG_BMI08X_ACCEL_TRIGGER
|
||||
.trigger_set = bmi08x_trigger_set_acc,
|
||||
|
|
|
@ -348,7 +348,7 @@ static int bmi08x_gyro_pm_action(const struct device *dev, enum pm_device_action
|
|||
}
|
||||
#endif /* CONFIG_PM_DEVICE */
|
||||
|
||||
static const struct sensor_driver_api bmi08x_api = {
|
||||
static DEVICE_API(sensor, bmi08x_api) = {
|
||||
.attr_set = bmi08x_attr_set,
|
||||
#ifdef CONFIG_BMI08X_GYRO_TRIGGER
|
||||
.trigger_set = bmi08x_trigger_set_gyr,
|
||||
|
|
|
@ -1009,7 +1009,7 @@ static int bmi160_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api bmi160_api = {
|
||||
static DEVICE_API(sensor, bmi160_api) = {
|
||||
.attr_set = bmi160_attr_set,
|
||||
.attr_get = bmi160_attr_get,
|
||||
#ifdef CONFIG_BMI160_TRIGGER
|
||||
|
|
|
@ -769,7 +769,7 @@ static int bmi270_init(const struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api bmi270_driver_api = {
|
||||
static DEVICE_API(sensor, bmi270_driver_api) = {
|
||||
.sample_fetch = bmi270_sample_fetch,
|
||||
.channel_get = bmi270_channel_get,
|
||||
.attr_set = bmi270_attr_set,
|
||||
|
|
|
@ -1106,7 +1106,7 @@ static int bosch_bmi323_driver_api_channel_get(const struct device *dev, enum se
|
|||
return ret;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api bosch_bmi323_api = {
|
||||
static DEVICE_API(sensor, bosch_bmi323_api) = {
|
||||
.attr_set = bosch_bmi323_driver_api_attr_set,
|
||||
.attr_get = bosch_bmi323_driver_api_attr_get,
|
||||
.trigger_set = bosch_bmi323_driver_api_trigger_set,
|
||||
|
|
|
@ -489,7 +489,7 @@ static int bmm150_attr_set(const struct device *dev,
|
|||
}
|
||||
#endif
|
||||
|
||||
static const struct sensor_driver_api bmm150_api_funcs = {
|
||||
static DEVICE_API(sensor, bmm150_api_funcs) = {
|
||||
#if defined(BMM150_SET_ATTR_REP)
|
||||
.attr_set = bmm150_attr_set,
|
||||
#endif
|
||||
|
|
|
@ -417,7 +417,7 @@ static int bmp180_pm_action(const struct device *dev,
|
|||
}
|
||||
#endif /* CONFIG_PM_DEVICE */
|
||||
|
||||
static const struct sensor_driver_api bmp180_api = {
|
||||
static DEVICE_API(sensor, bmp180_api) = {
|
||||
.attr_set = bmp180_attr_set,
|
||||
.sample_fetch = bmp180_sample_fetch,
|
||||
.channel_get = bmp180_channel_get,
|
||||
|
|
|
@ -458,7 +458,7 @@ static int bmp388_pm_action(const struct device *dev,
|
|||
}
|
||||
#endif /* CONFIG_PM_DEVICE */
|
||||
|
||||
static const struct sensor_driver_api bmp388_api = {
|
||||
static DEVICE_API(sensor, bmp388_api) = {
|
||||
.attr_set = bmp388_attr_set,
|
||||
#ifdef CONFIG_BMP388_TRIGGER
|
||||
.trigger_set = bmp388_trigger_set,
|
||||
|
|
|
@ -540,9 +540,11 @@ static int bmp581_init(const struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api bmp581_driver_api = {.sample_fetch = bmp581_sample_fetch,
|
||||
static DEVICE_API(sensor, bmp581_driver_api) = {
|
||||
.sample_fetch = bmp581_sample_fetch,
|
||||
.channel_get = bmp581_channel_get,
|
||||
.attr_set = bmp581_attr_set};
|
||||
.attr_set = bmp581_attr_set,
|
||||
};
|
||||
|
||||
#define BMP581_CONFIG(i) \
|
||||
static const struct bmp581_config bmp581_config_##i = { \
|
||||
|
|
|
@ -71,7 +71,7 @@ static int get(const struct device *dev, enum sensor_channel chan, struct sensor
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api current_api = {
|
||||
static DEVICE_API(sensor, current_api) = {
|
||||
.sample_fetch = fetch,
|
||||
.channel_get = get,
|
||||
};
|
||||
|
|
|
@ -122,7 +122,7 @@ static int tach_kb1200_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api tach_kb1200_driver_api = {
|
||||
static DEVICE_API(sensor, tach_kb1200_driver_api) = {
|
||||
.sample_fetch = tach_kb1200_sample_fetch,
|
||||
.channel_get = tach_kb1200_channel_get,
|
||||
};
|
||||
|
|
|
@ -175,7 +175,7 @@ static int ens160_attr_set(const struct device *dev, enum sensor_channel chan,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api ens160_driver_api = {
|
||||
static DEVICE_API(sensor, ens160_driver_api) = {
|
||||
.sample_fetch = ens160_sample_fetch,
|
||||
.channel_get = ens160_channel_get,
|
||||
.attr_set = ens160_attr_set,
|
||||
|
|
|
@ -61,7 +61,7 @@ static int esp32_temp_channel_get(const struct device *dev, enum sensor_channel
|
|||
return sensor_value_from_double(val, data->temp_out);
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api esp32_temp_driver_api = {
|
||||
static DEVICE_API(sensor, esp32_temp_driver_api) = {
|
||||
.sample_fetch = esp32_temp_sample_fetch,
|
||||
.channel_get = esp32_temp_channel_get,
|
||||
};
|
||||
|
|
|
@ -357,7 +357,7 @@ static int pcnt_esp32_trigger_set(const struct device *dev, const struct sensor_
|
|||
}
|
||||
#endif /* CONFIG_PCNT_ESP32_TRIGGER */
|
||||
|
||||
static const struct sensor_driver_api pcnt_esp32_api = {
|
||||
static DEVICE_API(sensor, pcnt_esp32_api) = {
|
||||
.sample_fetch = pcnt_esp32_sample_fetch,
|
||||
.channel_get = pcnt_esp32_channel_get,
|
||||
.attr_set = pcnt_esp32_attr_set,
|
||||
|
|
|
@ -327,7 +327,7 @@ static int explorir_m_channel_get(const struct device *dev, enum sensor_channel
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api explorir_m_api_funcs = {
|
||||
static DEVICE_API(sensor, explorir_m_api_funcs) = {
|
||||
.attr_set = explorir_m_attr_set,
|
||||
.attr_get = explorir_m_attr_get,
|
||||
.sample_fetch = explorir_m_sample_fetch,
|
||||
|
|
|
@ -143,7 +143,7 @@ static int f75303_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api f75303_driver_api = {
|
||||
static DEVICE_API(sensor, f75303_driver_api) = {
|
||||
.sample_fetch = f75303_sample_fetch,
|
||||
.channel_get = f75303_channel_get,
|
||||
};
|
||||
|
|
|
@ -417,7 +417,7 @@ static int fcx_mldx5_channel_get(const struct device *dev, enum sensor_channel c
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api fcx_mldx5_api_funcs = {
|
||||
static DEVICE_API(sensor, fcx_mldx5_api_funcs) = {
|
||||
.attr_get = fcx_mldx5_attr_get,
|
||||
.sample_fetch = fcx_mldx5_sample_fetch,
|
||||
.channel_get = fcx_mldx5_channel_get,
|
||||
|
|
|
@ -1168,7 +1168,7 @@ static int grow_r502a_init(const struct device *dev)
|
|||
return fps_init(dev);
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api grow_r502a_api = {
|
||||
static DEVICE_API(sensor, grow_r502a_api) = {
|
||||
.sample_fetch = grow_r502a_sample_fetch,
|
||||
.channel_get = grow_r502a_channel_get,
|
||||
.attr_set = grow_r502a_attr_set,
|
||||
|
|
|
@ -165,7 +165,7 @@ static int hcsr04_channel_get(const struct device *dev, enum sensor_channel chan
|
|||
return sensor_value_from_milli(val, distance_mm);
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api hcsr04_driver_api = {
|
||||
static DEVICE_API(sensor, hcsr04_driver_api) = {
|
||||
.sample_fetch = hcsr04_sample_fetch,
|
||||
.channel_get = hcsr04_channel_get
|
||||
};
|
||||
|
|
|
@ -78,7 +78,7 @@ static int hmc5883l_sample_fetch(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api hmc5883l_driver_api = {
|
||||
static DEVICE_API(sensor, hmc5883l_driver_api) = {
|
||||
#if CONFIG_HMC5883L_TRIGGER
|
||||
.trigger_set = hmc5883l_trigger_set,
|
||||
#endif
|
||||
|
|
|
@ -127,7 +127,7 @@ static int mpr_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api mpr_api_funcs = {
|
||||
static DEVICE_API(sensor, mpr_api_funcs) = {
|
||||
.sample_fetch = mpr_sample_fetch,
|
||||
.channel_get = mpr_channel_get,
|
||||
};
|
||||
|
|
|
@ -177,7 +177,7 @@ static int sm351lt_attr_get(const struct device *dev,
|
|||
}
|
||||
#endif
|
||||
|
||||
static const struct sensor_driver_api sm351lt_api_funcs = {
|
||||
static DEVICE_API(sensor, sm351lt_api_funcs) = {
|
||||
.sample_fetch = sm351lt_sample_fetch,
|
||||
.channel_get = sm351lt_channel_get,
|
||||
#if CONFIG_SM351LT_TRIGGER
|
||||
|
|
|
@ -275,7 +275,7 @@ static int hp206c_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api hp206c_api = {
|
||||
static DEVICE_API(sensor, hp206c_api) = {
|
||||
.attr_set = hp206c_attr_set,
|
||||
.sample_fetch = hp206c_adc_acquire,
|
||||
.channel_get = hp206c_channel_get,
|
||||
|
|
|
@ -709,7 +709,7 @@ static int dps310_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api dps310_api_funcs = {
|
||||
static DEVICE_API(sensor, dps310_api_funcs) = {
|
||||
.sample_fetch = dps310_sample_fetch,
|
||||
.channel_get = dps310_channel_get,
|
||||
};
|
||||
|
|
|
@ -64,7 +64,7 @@ static int tle9104_diagnostics_channel_get(const struct device *dev, enum sensor
|
|||
}
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api tle9104_diagnostics_driver_api = {
|
||||
static DEVICE_API(sensor, tle9104_diagnostics_driver_api) = {
|
||||
.sample_fetch = tle9104_diagnostics_sample_fetch,
|
||||
.channel_get = tle9104_diagnostics_channel_get,
|
||||
};
|
||||
|
|
|
@ -57,7 +57,7 @@ static int xmc4xxx_temp_channel_get(const struct device *dev, enum sensor_channe
|
|||
return sensor_value_from_double(val, data->temp_out);
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api xmc4xxx_temp_driver_api = {
|
||||
static DEVICE_API(sensor, xmc4xxx_temp_driver_api) = {
|
||||
.sample_fetch = xmc4xxx_temp_sample_fetch,
|
||||
.channel_get = xmc4xxx_temp_channel_get,
|
||||
};
|
||||
|
|
|
@ -98,7 +98,7 @@ static int ist8310_channel_get(const struct device *dev, enum sensor_channel cha
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api ist8310_api_funcs = {
|
||||
static DEVICE_API(sensor, ist8310_api_funcs) = {
|
||||
.sample_fetch = ist8310_sample_fetch,
|
||||
.channel_get = ist8310_channel_get,
|
||||
};
|
||||
|
|
|
@ -213,7 +213,7 @@ static int tach_it8xxx2_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api tach_it8xxx2_driver_api = {
|
||||
static DEVICE_API(sensor, tach_it8xxx2_driver_api) = {
|
||||
.sample_fetch = tach_it8xxx2_sample_fetch,
|
||||
.channel_get = tach_it8xxx2_channel_get,
|
||||
};
|
||||
|
|
|
@ -352,7 +352,7 @@ static int vcmp_it8xxx2_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api vcmp_ite_it8xxx2_api = {
|
||||
static DEVICE_API(sensor, vcmp_ite_it8xxx2_api) = {
|
||||
.attr_set = vcmp_ite_it8xxx2_attr_set,
|
||||
.trigger_set = vcmp_ite_it8xxx2_trigger_set,
|
||||
.channel_get = vcmp_it8xxx2_channel_get,
|
||||
|
|
|
@ -89,7 +89,7 @@ static int jc42_channel_get(const struct device *dev, enum sensor_channel chan,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api jc42_api_funcs = {
|
||||
static DEVICE_API(sensor, jc42_api_funcs) = {
|
||||
.sample_fetch = jc42_sample_fetch,
|
||||
.channel_get = jc42_channel_get,
|
||||
#ifdef CONFIG_JC42_TRIGGER
|
||||
|
|
|
@ -65,7 +65,7 @@ static int lm35_channel_get(const struct device *dev, enum sensor_channel chan,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api lm35_driver_api = {
|
||||
static DEVICE_API(sensor, lm35_driver_api) = {
|
||||
.sample_fetch = lm35_sample_fetch,
|
||||
.channel_get = lm35_channel_get,
|
||||
};
|
||||
|
|
|
@ -306,7 +306,7 @@ static int lm75_channel_get(const struct device *dev, enum sensor_channel chan,
|
|||
}
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api lm75_driver_api = {
|
||||
static DEVICE_API(sensor, lm75_driver_api) = {
|
||||
.attr_set = lm75_attr_set,
|
||||
.attr_get = lm75_attr_get,
|
||||
#if LM75_TRIGGER_SUPPORT
|
||||
|
|
|
@ -298,7 +298,7 @@ static int lm77_channel_get(const struct device *dev, enum sensor_channel chan,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api lm77_driver_api = {
|
||||
static DEVICE_API(sensor, lm77_driver_api) = {
|
||||
.attr_set = lm77_attr_set,
|
||||
.attr_get = lm77_attr_get,
|
||||
#if LM77_TRIGGER_SUPPORT
|
||||
|
|
|
@ -135,7 +135,7 @@ static int ltrf216a_channel_get(const struct device *dev, enum sensor_channel ch
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api ltrf216a_driver_api = {
|
||||
static DEVICE_API(sensor, ltrf216a_driver_api) = {
|
||||
.sample_fetch = ltrf216a_sample_fetch,
|
||||
.channel_get = ltrf216a_channel_get,
|
||||
};
|
||||
|
|
|
@ -310,7 +310,7 @@ int ds18b20_attr_set(const struct device *dev, enum sensor_channel chan,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api ds18b20_driver_api = {
|
||||
static DEVICE_API(sensor, ds18b20_driver_api) = {
|
||||
.attr_set = ds18b20_attr_set,
|
||||
.sample_fetch = ds18b20_sample_fetch,
|
||||
.channel_get = ds18b20_channel_get,
|
||||
|
|
|
@ -469,7 +469,7 @@ static int max17055_gauge_init(const struct device *dev)
|
|||
return max17055_reg_write(dev, STATUS, tmp);
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api max17055_battery_driver_api = {
|
||||
static DEVICE_API(sensor, max17055_battery_driver_api) = {
|
||||
.sample_fetch = max17055_sample_fetch,
|
||||
.channel_get = max17055_channel_get,
|
||||
};
|
||||
|
|
|
@ -363,7 +363,7 @@ static int max17262_gauge_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api max17262_battery_driver_api = {
|
||||
static DEVICE_API(sensor, max17262_battery_driver_api) = {
|
||||
.sample_fetch = max17262_sample_fetch,
|
||||
.channel_get = max17262_channel_get,
|
||||
};
|
||||
|
|
|
@ -88,7 +88,7 @@ static int max30101_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api max30101_driver_api = {
|
||||
static DEVICE_API(sensor, max30101_driver_api) = {
|
||||
.sample_fetch = max30101_sample_fetch,
|
||||
.channel_get = max30101_channel_get,
|
||||
};
|
||||
|
|
|
@ -49,7 +49,7 @@ static int max31790_fan_fault_channel_get(const struct device *dev, enum sensor_
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api max31790_fan_fault_api = {
|
||||
static DEVICE_API(sensor, max31790_fan_fault_api) = {
|
||||
.sample_fetch = max31790_fan_fault_sample_fetch,
|
||||
.channel_get = max31790_fan_fault_channel_get,
|
||||
};
|
||||
|
|
|
@ -105,7 +105,7 @@ static int max31790_fan_speed_channel_get(const struct device *dev, enum sensor_
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api max31790_fan_speed_api = {
|
||||
static DEVICE_API(sensor, max31790_fan_speed_api) = {
|
||||
.sample_fetch = max31790_fan_speed_sample_fetch,
|
||||
.channel_get = max31790_fan_speed_channel_get,
|
||||
};
|
||||
|
|
|
@ -103,7 +103,7 @@ static int max31855_channel_get(const struct device *dev, enum sensor_channel ch
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api max31855_api = {
|
||||
static DEVICE_API(sensor, max31855_api) = {
|
||||
.sample_fetch = max31855_sample_fetch,
|
||||
.channel_get = max31855_channel_get,
|
||||
};
|
||||
|
|
|
@ -302,7 +302,7 @@ static int max31865_attr_set(const struct device *dev, enum sensor_channel chan,
|
|||
}
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api max31865_api_funcs = {
|
||||
static DEVICE_API(sensor, max31865_api_funcs) = {
|
||||
.sample_fetch = max31865_sample_fetch,
|
||||
.channel_get = max31865_channel_get,
|
||||
.attr_set = max31865_attr_set,
|
||||
|
|
|
@ -237,7 +237,7 @@ static int max31875_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api max31875_driver_api = {
|
||||
static DEVICE_API(sensor, max31875_driver_api) = {
|
||||
.attr_set = max31875_attr_set,
|
||||
.sample_fetch = max31875_sample_fetch,
|
||||
.channel_get = max31875_channel_get,
|
||||
|
|
|
@ -165,7 +165,7 @@ static int max44009_channel_get(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api max44009_driver_api = {
|
||||
static DEVICE_API(sensor, max44009_driver_api) = {
|
||||
.attr_set = max44009_attr_set,
|
||||
.sample_fetch = max44009_sample_fetch,
|
||||
.channel_get = max44009_channel_get,
|
||||
|
|
|
@ -82,7 +82,7 @@ static int max6675_channel_get(const struct device *dev, enum sensor_channel cha
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api max6675_api = {
|
||||
static DEVICE_API(sensor, max6675_api) = {
|
||||
.sample_fetch = &max6675_sample_fetch,
|
||||
.channel_get = &max6675_channel_get,
|
||||
};
|
||||
|
|
|
@ -310,7 +310,7 @@ static int ms5607_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api ms5607_api_funcs = {
|
||||
static DEVICE_API(sensor, ms5607_api_funcs) = {
|
||||
.attr_set = ms5607_attr_set,
|
||||
.sample_fetch = ms5607_sample_fetch,
|
||||
.channel_get = ms5607_channel_get,
|
||||
|
|
|
@ -263,7 +263,7 @@ static int ms5837_attr_set(const struct device *dev, enum sensor_channel chan,
|
|||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api ms5837_api_funcs = {
|
||||
static DEVICE_API(sensor, ms5837_api_funcs) = {
|
||||
.attr_set = ms5837_attr_set,
|
||||
.sample_fetch = ms5837_sample_fetch,
|
||||
.channel_get = ms5837_channel_get,
|
||||
|
|
|
@ -285,7 +285,7 @@ static int mc3419_init(const struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api mc3419_api = {
|
||||
static DEVICE_API(sensor, mc3419_api) = {
|
||||
.attr_set = mc3419_attr_set,
|
||||
#if defined(CONFIG_MC3419_TRIGGER)
|
||||
.trigger_set = mc3419_trigger_set,
|
||||
|
|
|
@ -439,7 +439,7 @@ static int mmc56x3_attr_get(const struct device *dev, enum sensor_channel chan,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api mmc56x3_api_funcs = {
|
||||
static DEVICE_API(sensor, mmc56x3_api_funcs) = {
|
||||
.sample_fetch = mmc56x3_sample_fetch,
|
||||
.channel_get = mmc56x3_channel_get,
|
||||
.attr_get = mmc56x3_attr_get,
|
||||
|
|
|
@ -247,7 +247,7 @@ static int mhz19b_sample_fetch(const struct device *dev, enum sensor_channel cha
|
|||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api mhz19b_api_funcs = {
|
||||
static DEVICE_API(sensor, mhz19b_api_funcs) = {
|
||||
.attr_set = mhz19b_attr_set,
|
||||
.attr_get = mhz19b_attr_get,
|
||||
.sample_fetch = mhz19b_sample_fetch,
|
||||
|
|
|
@ -177,7 +177,7 @@ static int tach_xec_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api tach_xec_driver_api = {
|
||||
static DEVICE_API(sensor, tach_xec_driver_api) = {
|
||||
.sample_fetch = tach_xec_sample_fetch,
|
||||
.channel_get = tach_xec_channel_get,
|
||||
};
|
||||
|
|
|
@ -104,7 +104,7 @@ static int mcp9600_channel_get(const struct device *dev, enum sensor_channel cha
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api mcp9600_api = {
|
||||
static DEVICE_API(sensor, mcp9600_api) = {
|
||||
.sample_fetch = mcp9600_sample_fetch,
|
||||
.channel_get = mcp9600_channel_get,
|
||||
};
|
||||
|
|
|
@ -91,7 +91,7 @@ static int get(const struct device *dev, enum sensor_channel chan, struct sensor
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api mcp970x_api = {
|
||||
static DEVICE_API(sensor, mcp970x_api) = {
|
||||
.sample_fetch = fetch,
|
||||
.channel_get = get,
|
||||
};
|
||||
|
|
|
@ -63,7 +63,7 @@ static int tcn75a_channel_get(const struct device *dev, enum sensor_channel chan
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api tcn75a_api = {
|
||||
static DEVICE_API(sensor, tcn75a_api) = {
|
||||
.sample_fetch = &tcn75a_sample_fetch,
|
||||
.channel_get = &tcn75a_channel_get,
|
||||
#ifdef CONFIG_TCN75A_TRIGGER
|
||||
|
|
|
@ -80,7 +80,7 @@ static int nct75_channel_get(const struct device *dev, enum sensor_channel chan,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api nct75_api = {
|
||||
static DEVICE_API(sensor, nct75_api) = {
|
||||
.sample_fetch = nct75_sample_fetch,
|
||||
.channel_get = nct75_channel_get,
|
||||
};
|
||||
|
|
|
@ -661,7 +661,7 @@ int npm1300_charger_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api npm1300_charger_battery_driver_api = {
|
||||
static DEVICE_API(sensor, npm1300_charger_battery_driver_api) = {
|
||||
.sample_fetch = npm1300_charger_sample_fetch,
|
||||
.channel_get = npm1300_charger_channel_get,
|
||||
.attr_set = npm1300_charger_attr_set,
|
||||
|
|
|
@ -186,7 +186,7 @@ static void qdec_nrfx_gpio_ctrl(const struct device *dev, bool enable)
|
|||
}
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api qdec_nrfx_driver_api = {
|
||||
static DEVICE_API(sensor, qdec_nrfx_driver_api) = {
|
||||
.sample_fetch = qdec_nrfx_sample_fetch,
|
||||
.channel_get = qdec_nrfx_channel_get,
|
||||
.trigger_set = qdec_nrfx_trigger_set,
|
||||
|
|
|
@ -104,7 +104,7 @@ static void temp_nrf5_isr(const void *arg)
|
|||
k_sem_give(&data->device_sync_sem);
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api temp_nrf5_driver_api = {
|
||||
static DEVICE_API(sensor, temp_nrf5_driver_api) = {
|
||||
.sample_fetch = temp_nrf5_sample_fetch,
|
||||
.channel_get = temp_nrf5_channel_get,
|
||||
};
|
||||
|
|
|
@ -281,7 +281,7 @@ static int temp_nrfs_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api temp_nrfs_drv_api = {
|
||||
static DEVICE_API(sensor, temp_nrfs_drv_api) = {
|
||||
#ifdef CONFIG_TEMP_NRFS_TRIGGER
|
||||
.attr_set = api_sensor_attr_set,
|
||||
.trigger_set = api_sensor_trigger_set,
|
||||
|
|
|
@ -87,7 +87,7 @@ static int ntc_thermistor_channel_get(const struct device *dev, enum sensor_chan
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api ntc_thermistor_driver_api = {
|
||||
static DEVICE_API(sensor, ntc_thermistor_driver_api) = {
|
||||
.sample_fetch = ntc_thermistor_sample_fetch,
|
||||
.channel_get = ntc_thermistor_channel_get,
|
||||
};
|
||||
|
|
|
@ -243,7 +243,7 @@ static int adc_cmp_npcx_channel_get(const struct device *dev,
|
|||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api adc_cmp_npcx_api = {
|
||||
static DEVICE_API(sensor, adc_cmp_npcx_api) = {
|
||||
.attr_set = adc_cmp_npcx_attr_set,
|
||||
.attr_get = adc_cmp_npcx_attr_get,
|
||||
.trigger_set = adc_cmp_npcx_trigger_set,
|
||||
|
|
|
@ -363,7 +363,7 @@ static int tach_npcx_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api tach_npcx_driver_api = {
|
||||
static DEVICE_API(sensor, tach_npcx_driver_api) = {
|
||||
.sample_fetch = tach_npcx_sample_fetch,
|
||||
.channel_get = tach_npcx_channel_get,
|
||||
};
|
||||
|
|
|
@ -437,7 +437,7 @@ static int fxas21002_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api fxas21002_driver_api = {
|
||||
static DEVICE_API(sensor, fxas21002_driver_api) = {
|
||||
.sample_fetch = fxas21002_sample_fetch,
|
||||
.channel_get = fxas21002_channel_get,
|
||||
#if CONFIG_FXAS21002_TRIGGER
|
||||
|
|
|
@ -580,7 +580,7 @@ static int fxls8974_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api fxls8974_driver_api = {
|
||||
static DEVICE_API(sensor, fxls8974_driver_api) = {
|
||||
.sample_fetch = fxls8974_sample_fetch,
|
||||
.channel_get = fxls8974_channel_get,
|
||||
.attr_set = fxls8974_attr_set,
|
||||
|
|
|
@ -656,7 +656,7 @@ static int fxos8700_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api fxos8700_driver_api = {
|
||||
static DEVICE_API(sensor, fxos8700_driver_api) = {
|
||||
.sample_fetch = fxos8700_sample_fetch,
|
||||
.channel_get = fxos8700_channel_get,
|
||||
.attr_set = fxos8700_attr_set,
|
||||
|
|
|
@ -520,7 +520,7 @@ static int mcux_acmp_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api mcux_acmp_driver_api = {
|
||||
static DEVICE_API(sensor, mcux_acmp_driver_api) = {
|
||||
.attr_set = mcux_acmp_attr_set,
|
||||
.attr_get = mcux_acmp_attr_get,
|
||||
#ifdef CONFIG_SENSOR_MCUX_ACMP_TRIGGER
|
||||
|
|
|
@ -398,7 +398,7 @@ static int mcux_lpcmp_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct sensor_driver_api mcux_lpcmp_driver_api = {
|
||||
static DEVICE_API(sensor, mcux_lpcmp_driver_api) = {
|
||||
.attr_set = mcux_lpcmp_attr_set,
|
||||
.attr_get = mcux_lpcmp_attr_get,
|
||||
#ifdef CONFIG_MCUX_LPCMP_TRIGGER
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue