diff --git a/include/zephyr/dt-bindings/sensor/adxl345.h b/include/zephyr/dt-bindings/sensor/adxl345.h index a69b0af4f5af6..3c26e6332fe12 100644 --- a/include/zephyr/dt-bindings/sensor/adxl345.h +++ b/include/zephyr/dt-bindings/sensor/adxl345.h @@ -3,25 +3,33 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for ADXL345 Devicetree constants + * @ingroup adxl345_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX345_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX345_H_ /** - * @defgroup adxl345 ADXL345 DT Options - * @ingroup sensor_interface + * @defgroup adxl345_interface ADXL345 + * @ingroup sensor_interface_ext + * @brief Analog Devices ADXL345 3-axis accelerometer * @{ */ /** - * @defgroup adxl345_odr Output Rate options + * @defgroup adxl345_odr Output Data Rate options * @{ */ -#define ADXL345_DT_ODR_12_5 7 -#define ADXL345_DT_ODR_25 8 -#define ADXL345_DT_ODR_50 9 -#define ADXL345_DT_ODR_100 10 -#define ADXL345_DT_ODR_200 11 -#define ADXL345_DT_ODR_400 12 +#define ADXL345_DT_ODR_12_5 7 /**< 12.5 Hz */ +#define ADXL345_DT_ODR_25 8 /**< 25 Hz */ +#define ADXL345_DT_ODR_50 9 /**< 50 Hz */ +#define ADXL345_DT_ODR_100 10 /**< 100 Hz */ +#define ADXL345_DT_ODR_200 11 /**< 200 Hz */ +#define ADXL345_DT_ODR_400 12 /**< 400 Hz */ /** @} */ /** @} */ diff --git a/include/zephyr/dt-bindings/sensor/adxl362.h b/include/zephyr/dt-bindings/sensor/adxl362.h index 2c16cf1d418a4..9a0c73438243a 100644 --- a/include/zephyr/dt-bindings/sensor/adxl362.h +++ b/include/zephyr/dt-bindings/sensor/adxl362.h @@ -3,12 +3,20 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for ADXL362 Devicetree constants + * @ingroup adxl362_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX362_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX362_H_ /** - * @defgroup adxl362 ADXL362 DT Options - * @ingroup sensor_interface + * @defgroup adxl362_interface ADXL362 + * @ingroup sensor_interface_ext + * @brief ADXL362 3-axis accelerometer * @{ */ @@ -16,10 +24,10 @@ * @defgroup adxl362_fifo_mode FIFO mode options * @{ */ -#define ADXL362_FIFO_MODE_DISABLED 0x0 -#define ADXL362_FIFO_MODE_OLDEST_SAVED 0x1 -#define ADXL362_FIFO_MODE_STREAM 0x2 -#define ADXL362_FIFO_MODE_TRIGGERED 0x3 +#define ADXL362_FIFO_MODE_DISABLED 0x0 /**< FIFO disabled */ +#define ADXL362_FIFO_MODE_OLDEST_SAVED 0x1 /**< Oldest saved mode */ +#define ADXL362_FIFO_MODE_STREAM 0x2 /**< Stream mode */ +#define ADXL362_FIFO_MODE_TRIGGERED 0x3 /**< Triggered mode */ /** @} */ diff --git a/include/zephyr/dt-bindings/sensor/adxl367.h b/include/zephyr/dt-bindings/sensor/adxl367.h index 314d54dc49d5d..d9a7efeb3d094 100644 --- a/include/zephyr/dt-bindings/sensor/adxl367.h +++ b/include/zephyr/dt-bindings/sensor/adxl367.h @@ -3,12 +3,19 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for ADXL367 Devicetree constants + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX367_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX367_H_ /** - * @defgroup adxl367 ADXL367 DT Options - * @ingroup sensor_interface + * @defgroup adxl367_interface ADXL367 + * @ingroup sensor_interface_ext + * @brief ADXL367 3-axis accelerometer * @{ */ @@ -16,10 +23,10 @@ * @defgroup adxl367_fifo_mode FIFO mode options * @{ */ -#define ADXL367_FIFO_MODE_DISABLED 0x0 -#define ADXL367_FIFO_MODE_OLDEST_SAVED 0x1 -#define ADXL367_FIFO_MODE_STREAM 0x2 -#define ADXL367_FIFO_MODE_TRIGGERED 0x3 +#define ADXL367_FIFO_MODE_DISABLED 0x0 /**< FIFO disabled */ +#define ADXL367_FIFO_MODE_OLDEST_SAVED 0x1 /**< Oldest saved mode */ +#define ADXL367_FIFO_MODE_STREAM 0x2 /**< Stream mode */ +#define ADXL367_FIFO_MODE_TRIGGERED 0x3 /**< Triggered mode */ /** @} */ /** @} */ diff --git a/include/zephyr/dt-bindings/sensor/adxl372.h b/include/zephyr/dt-bindings/sensor/adxl372.h index 6901c5cf19e79..a5947d4f4b3f2 100644 --- a/include/zephyr/dt-bindings/sensor/adxl372.h +++ b/include/zephyr/dt-bindings/sensor/adxl372.h @@ -3,12 +3,20 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for ADXL372 Devicetree constants + * @ingroup adxl372_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX372_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX372_H_ /** - * @defgroup adxl372 ADXL372 DT Options - * @ingroup sensor_interface + * @defgroup adxl372_interface ADXL372 + * @ingroup sensor_interface_ext + * @brief ADXL372 3-axis accelerometer * @{ */ @@ -17,10 +25,10 @@ * @{ */ -#define ADXL372_FIFO_MODE_BYPASSED 0x0 -#define ADXL372_FIFO_MODE_STREAMED 0x1 -#define ADXL372_FIFO_MODE_TRIGGERED 0x2 -#define ADXL372_FIFO_MODE_OLD_SAVED 0x3 +#define ADXL372_FIFO_MODE_BYPASSED 0x0 /**< FIFO disabled */ +#define ADXL372_FIFO_MODE_STREAMED 0x1 /**< Stream mode */ +#define ADXL372_FIFO_MODE_TRIGGERED 0x2 /**< Triggered mode */ +#define ADXL372_FIFO_MODE_OLD_SAVED 0x3 /**< Oldest saved mode */ /** @} */ diff --git a/include/zephyr/dt-bindings/sensor/afbr_s50.h b/include/zephyr/dt-bindings/sensor/afbr_s50.h index a6c51a0ec029e..dfd8c8bad72e2 100644 --- a/include/zephyr/dt-bindings/sensor/afbr_s50.h +++ b/include/zephyr/dt-bindings/sensor/afbr_s50.h @@ -4,32 +4,63 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for AFBR-S50 Devicetree constants + * @ingroup afbr_s50_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_BRCM_AFBR_S50_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_BRCM_AFBR_S50_H_ /** - * @name afbr_s50 Dual Frequency Mode Settings + * @defgroup afbr_s50_interface AFBR-S50 + * @ingroup sensor_interface_ext + * @brief AFBR-S50 3D ToF sensor * @{ */ -#define AFBR_S50_DT_DFM_MODE_OFF 0 -#define AFBR_S50_DT_DFM_MODE_4X 1 -#define AFBR_S50_DT_DFM_MODE_8X 2 + +/** + * @name Dual Frequency Mode Settings + * + * Dual Frequency Mode is a feature that allows the sensor to use two different modulation + * frequencies for the same measurement. This is useful to reduce the noise in the measurement. + * + * @{ + */ +#define AFBR_S50_DT_DFM_MODE_OFF 0 /**< Off (single-frequency mode) */ +#define AFBR_S50_DT_DFM_MODE_4X 1 /**< x4 mode */ +#define AFBR_S50_DT_DFM_MODE_8X 2 /**< x8 mode */ /** @} */ /** - * @name afbr_s50 Measurement Modes + * @name Measurement Modes * @{ */ + +/** Short range mode */ #define AFBR_S50_DT_MODE_SHORT_RANGE 1 +/** Long range mode */ #define AFBR_S50_DT_MODE_LONG_RANGE 2 +/** High speed short range mode */ #define AFBR_S50_DT_MODE_HIGH_SPEED_SHORT_RANGE 5 +/** High speed long range mode */ #define AFBR_S50_DT_MODE_HIGH_SPEED_LONG_RANGE 6 +/** High precision short range mode */ #define AFBR_S50_DT_MODE_HIGH_PRECISION_SHORT_RANGE 9 +/** Short range mode (laser class 2) */ #define AFBR_S50_DT_MODE_SHORT_RANGE_LASER_CLASS_2 129 +/** Long range mode (laser class 2) */ #define AFBR_S50_DT_MODE_LONG_RANGE_LASER_CLASS_2 130 +/** High speed short range mode (laser class 2) */ #define AFBR_S50_DT_MODE_HIGH_SPEED_SHORT_RANGE_LASER_CLASS_2 133 +/** High speed long range mode (laser class 2) */ #define AFBR_S50_DT_MODE_HIGH_SPEED_LONG_RANGE_LASER_CLASS_2 134 +/** High precision short range mode (laser class 2) */ #define AFBR_S50_DT_MODE_HIGH_PRECISION_SHORT_RANGE_LASER_CLASS_2 137 /** @} */ +/** @} */ + #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_BRCM_AFBR_S50_H_ */ diff --git a/include/zephyr/dt-bindings/sensor/apds9253.h b/include/zephyr/dt-bindings/sensor/apds9253.h index 0768ec4ff9e93..607a3ba3236c0 100644 --- a/include/zephyr/dt-bindings/sensor/apds9253.h +++ b/include/zephyr/dt-bindings/sensor/apds9253.h @@ -5,51 +5,103 @@ * SPDX-License-Identifier: Apache-2.0 */ +/** + * @file + * @brief Header file for APDS9253 Devicetree constants + * @ingroup apds9253_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_APDS9253_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_APDS9253_H_ +/** + * @defgroup apds9253_interface APDS9253 + * @ingroup sensor_interface_ext + * @brief APDS9253 ambient light RGB & IR sensor + * @{ + */ + #include /** - * @name apds9253 resolution channel references + * @name APDS9253 Resolution and Integration Time Settings + * @brief ADC resolution and integration time configuration constants + * + * These constants define the ADC resolution (13-20 bits) and corresponding + * integration times (3.125ms - 400ms). Higher resolution provides better + * accuracy but requires longer integration times. + * * @{ */ +/** 20-bit resolution with 400ms integration time (highest accuracy) */ #define APDS9253_RESOLUTION_20BIT_400MS 0 +/** 19-bit resolution with 200ms integration time */ #define APDS9253_RESOLUTION_19BIT_200MS BIT(4) -#define APDS9253_RESOLUTION_18BIT_100MS BIT(5) /* default */ +/** 18-bit resolution with 100ms integration time (default) */ +#define APDS9253_RESOLUTION_18BIT_100MS BIT(5) +/** 17-bit resolution with 50ms integration time */ #define APDS9253_RESOLUTION_17BIT_50MS (BIT(5) | BIT(4)) +/** 16-bit resolution with 25ms integration time */ #define APDS9253_RESOLUTION_16BIT_25MS BIT(6) +/** 13-bit resolution with 3ms integration time (fastest response) */ #define APDS9253_RESOLUTION_13BIT_3MS (BIT(6) | BIT(4)) /** @} */ /** - * @name apds9253 measurement rate + * @name APDS9253 Measurement Rate Settings + * @brief Periodic measurement timing configuration constants + + * These constants control the timing of periodic measurements in active mode. + * The measurement rate determines how frequently new sensor readings are taken. + * * @{ */ +/** Measurement every 2 seconds - lowest power consumption */ #define APDS9253_MEASUREMENT_RATE_2000MS (BIT(2) | BIT(1) | BIT(0)) +/** Measurement every 1 second */ #define APDS9253_MEASUREMENT_RATE_1000MS (BIT(2) | BIT(0)) +/** Measurement every 500ms */ #define APDS9253_MEASUREMENT_RATE_500MS BIT(2) +/** Measurement every 200ms */ #define APDS9253_MEASUREMENT_RATE_200MS (BIT(1) | BIT(0)) -#define APDS9253_MEASUREMENT_RATE_100MS BIT(1) /* default */ +/** Measurement every 100ms (default) */ +#define APDS9253_MEASUREMENT_RATE_100MS BIT(1) +/** Measurement every 50ms */ #define APDS9253_MEASUREMENT_RATE_50MS BIT(0) +/** Measurement every 25ms */ #define APDS9253_MEASUREMENT_RATE_25MS 0 /** @} */ /** - * @name apds9253 gain range + * @name APDS9253 Analog Gain Range Settings + * @brief Sensor sensitivity and dynamic range configuration constants + * + * These constants configure the analog gain of the light sensor, affecting + * the sensitivity and dynamic range. Higher gain provides better sensitivity + * for low-light conditions but reduces the maximum measurable light intensity. + * * @{ */ +/** Gain factor 18× - highest sensitivity (max lux ~7,700) */ #define APDS9253_GAIN_RANGE_18 BIT(2) +/** Gain factor 9× */ #define APDS9253_GAIN_RANGE_9 (BIT(1) | BIT(0)) +/** Gain factor 6× */ #define APDS9253_GAIN_RANGE_6 BIT(1) -#define APDS9253_GAIN_RANGE_3 BIT(0) /* default */ +/** Gain factor 3× (default) */ +#define APDS9253_GAIN_RANGE_3 BIT(0) +/** Gain factor 1× - lowest sensitivity (max lux ~144,000 lux)*/ #define APDS9253_GAIN_RANGE_1 0 /** @} */ +/** + * @} + */ + #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_APDS9253_H_*/ diff --git a/include/zephyr/dt-bindings/sensor/bq274xx.h b/include/zephyr/dt-bindings/sensor/bq274xx.h index 9e8c259068ec8..d6037b1d4d685 100644 --- a/include/zephyr/dt-bindings/sensor/bq274xx.h +++ b/include/zephyr/dt-bindings/sensor/bq274xx.h @@ -11,17 +11,45 @@ * Datasheet: https://www.ti.com/lit/gpn/bq27427 * Technical reference manual: https://www.ti.com/lit/pdf/sluucd5 */ + +/** + * @file + * @brief Header file for BQ274XX Devicetree constants + * @ingroup bq274xx_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_BQ274XX_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_BQ274XX_H_ -/* Chemistry IDs for BQ27427 */ -#define BQ27427_CHEM_ID_A 0x3230 -#define BQ27427_CHEM_ID_B 0x1202 -#define BQ27427_CHEM_ID_C 0x3142 +/** + * @brief BQ274XX Fuel Gauge + * @defgroup bq274xx_interface BQ274XX + * @ingroup sensor_interface_ext + * @{ + */ + +/** + * @name Chemistry profiles for BQ27427 + * @{ + */ +#define BQ27427_CHEM_ID_A 0x3230 /**< Profile A (4.35 V Li-ion) */ +#define BQ27427_CHEM_ID_B 0x1202 /**< Profile B (4.2 V Li-ion) */ +#define BQ27427_CHEM_ID_C 0x3142 /**< Profile C (4.4 V Li-ion) */ +/** @} */ + +/** + * @name Chemistry profiles for BQ27421 variants + * @{ + */ +#define BQ27421_G1A_CHEM_ID 0x0128 /**< Profile A (4.2 V maximum charge voltage) */ +#define BQ27421_G1B_CHEM_ID 0x0312 /**< Profile B (4.3 to 4.35 V maximum charge voltage) */ +#define BQ27421_G1D_CHEM_ID 0x3142 /**< Profile D (4.3 to 4.4 V maximum charge voltage) */ +/** + * @} + */ -/* Chemistry IDs for BQ27421 variants */ -#define BQ27421_G1A_CHEM_ID 0x0128 -#define BQ27421_G1B_CHEM_ID 0x0312 -#define BQ27421_G1D_CHEM_ID 0x3142 + /** + * @} + */ #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_BQ274XX_H_ */ diff --git a/include/zephyr/dt-bindings/sensor/icm42686.h b/include/zephyr/dt-bindings/sensor/icm42686.h index 62994cf0cb438..7c6293d057af8 100644 --- a/include/zephyr/dt-bindings/sensor/icm42686.h +++ b/include/zephyr/dt-bindings/sensor/icm42686.h @@ -4,97 +4,105 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for ICM42686 Devicetree constants + * @ingroup icm42686_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_TDK_ICM42686P_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_TDK_ICM42686P_H_ #include "icm4268x.h" /** - * @defgroup ICM42686 Invensense (TDK) ICM42686 DT Options - * @ingroup sensor_interface + * @brief Invensense (TDK) ICM42686 6-axis motion tracking device + * @defgroup icm42686_interface ICM42686 + * @ingroup sensor_interface_ext * @{ */ /** - * @defgroup ICM42686_ACCEL_POWER_MODES Accelerometer power modes + * @defgroup icm42686_accel_power_modes Accelerometer power modes * @{ */ -#define ICM42686_DT_ACCEL_OFF ICM4268X_DT_ACCEL_OFF -#define ICM42686_DT_ACCEL_LP ICM4268X_DT_ACCEL_LP -#define ICM42686_DT_ACCEL_LN ICM4268X_DT_ACCEL_LN +#define ICM42686_DT_ACCEL_OFF ICM4268X_DT_ACCEL_OFF /**< Off */ +#define ICM42686_DT_ACCEL_LP ICM4268X_DT_ACCEL_LP /**< Low Power */ +#define ICM42686_DT_ACCEL_LN ICM4268X_DT_ACCEL_LN /**< Low Noise */ /** @} */ /** - * @defgroup ICM42686_GYRO_POWER_MODES Gyroscope power modes + * @defgroup icm42686_gyro_power_modes Gyroscope power modes * @{ */ -#define ICM42686_DT_GYRO_OFF ICM4268X_DT_GYRO_OFF -#define ICM42686_DT_GYRO_STANDBY ICM4268X_DT_GYRO_STANDBY -#define ICM42686_DT_GYRO_LN ICM4268X_DT_GYRO_LN +#define ICM42686_DT_GYRO_OFF ICM4268X_DT_GYRO_OFF /**< Off */ +#define ICM42686_DT_GYRO_STANDBY ICM4268X_DT_GYRO_STANDBY /**< Standby */ +#define ICM42686_DT_GYRO_LN ICM4268X_DT_GYRO_LN /**< Low Noise */ /** @} */ /** * @defgroup ICM42686_ACCEL_SCALE Accelerometer scale options * @{ */ -#define ICM42686_DT_ACCEL_FS_32 0 -#define ICM42686_DT_ACCEL_FS_16 1 -#define ICM42686_DT_ACCEL_FS_8 2 -#define ICM42686_DT_ACCEL_FS_4 3 -#define ICM42686_DT_ACCEL_FS_2 4 +#define ICM42686_DT_ACCEL_FS_32 0 /**< 32 g */ +#define ICM42686_DT_ACCEL_FS_16 1 /**< 16 g */ +#define ICM42686_DT_ACCEL_FS_8 2 /**< 8 g */ +#define ICM42686_DT_ACCEL_FS_4 3 /**< 4 g */ +#define ICM42686_DT_ACCEL_FS_2 4 /**< 2 g */ /** @} */ /** * @defgroup ICM42686_GYRO_SCALE Gyroscope scale options * @{ */ -#define ICM42686_DT_GYRO_FS_4000 0 -#define ICM42686_DT_GYRO_FS_2000 1 -#define ICM42686_DT_GYRO_FS_1000 2 -#define ICM42686_DT_GYRO_FS_500 3 -#define ICM42686_DT_GYRO_FS_250 4 -#define ICM42686_DT_GYRO_FS_125 5 -#define ICM42686_DT_GYRO_FS_62_5 6 -#define ICM42686_DT_GYRO_FS_31_25 7 +#define ICM42686_DT_GYRO_FS_4000 0 /**< 4000 dps */ +#define ICM42686_DT_GYRO_FS_2000 1 /**< 2000 dps */ +#define ICM42686_DT_GYRO_FS_1000 2 /**< 1000 dps */ +#define ICM42686_DT_GYRO_FS_500 3 /**< 500 dps */ +#define ICM42686_DT_GYRO_FS_250 4 /**< 250 dps */ +#define ICM42686_DT_GYRO_FS_125 5 /**< 125 dps */ +#define ICM42686_DT_GYRO_FS_62_5 6 /**< 62.5 dps */ +#define ICM42686_DT_GYRO_FS_31_25 7 /**< 31.25 dps */ /** @} */ /** * @defgroup ICM42686_ACCEL_DATA_RATE Accelerometer data rate options * @{ */ -#define ICM42686_DT_ACCEL_ODR_32000 ICM4268X_DT_ACCEL_ODR_32000 -#define ICM42686_DT_ACCEL_ODR_16000 ICM4268X_DT_ACCEL_ODR_16000 -#define ICM42686_DT_ACCEL_ODR_8000 ICM4268X_DT_ACCEL_ODR_8000 -#define ICM42686_DT_ACCEL_ODR_4000 ICM4268X_DT_ACCEL_ODR_4000 -#define ICM42686_DT_ACCEL_ODR_2000 ICM4268X_DT_ACCEL_ODR_2000 -#define ICM42686_DT_ACCEL_ODR_1000 ICM4268X_DT_ACCEL_ODR_1000 -#define ICM42686_DT_ACCEL_ODR_200 ICM4268X_DT_ACCEL_ODR_200 -#define ICM42686_DT_ACCEL_ODR_100 ICM4268X_DT_ACCEL_ODR_100 -#define ICM42686_DT_ACCEL_ODR_50 ICM4268X_DT_ACCEL_ODR_50 -#define ICM42686_DT_ACCEL_ODR_25 ICM4268X_DT_ACCEL_ODR_25 -#define ICM42686_DT_ACCEL_ODR_12_5 ICM4268X_DT_ACCEL_ODR_12_5 -#define ICM42686_DT_ACCEL_ODR_6_25 ICM4268X_DT_ACCEL_ODR_6_25 -#define ICM42686_DT_ACCEL_ODR_3_125 ICM4268X_DT_ACCEL_ODR_3_125 -#define ICM42686_DT_ACCEL_ODR_1_5625 ICM4268X_DT_ACCEL_ODR_1_5625 -#define ICM42686_DT_ACCEL_ODR_500 ICM4268X_DT_ACCEL_ODR_500 +#define ICM42686_DT_ACCEL_ODR_32000 ICM4268X_DT_ACCEL_ODR_32000 /**< 32 kHz */ +#define ICM42686_DT_ACCEL_ODR_16000 ICM4268X_DT_ACCEL_ODR_16000 /**< 16 kHz */ +#define ICM42686_DT_ACCEL_ODR_8000 ICM4268X_DT_ACCEL_ODR_8000 /**< 8 kHz */ +#define ICM42686_DT_ACCEL_ODR_4000 ICM4268X_DT_ACCEL_ODR_4000 /**< 4 kHz */ +#define ICM42686_DT_ACCEL_ODR_2000 ICM4268X_DT_ACCEL_ODR_2000 /**< 2 kHz */ +#define ICM42686_DT_ACCEL_ODR_1000 ICM4268X_DT_ACCEL_ODR_1000 /**< 1 kHz */ +#define ICM42686_DT_ACCEL_ODR_200 ICM4268X_DT_ACCEL_ODR_200 /**< 200 Hz */ +#define ICM42686_DT_ACCEL_ODR_100 ICM4268X_DT_ACCEL_ODR_100 /**< 100 Hz */ +#define ICM42686_DT_ACCEL_ODR_50 ICM4268X_DT_ACCEL_ODR_50 /**< 50 Hz */ +#define ICM42686_DT_ACCEL_ODR_25 ICM4268X_DT_ACCEL_ODR_25 /**< 25 Hz */ +#define ICM42686_DT_ACCEL_ODR_12_5 ICM4268X_DT_ACCEL_ODR_12_5 /**< 12.5 Hz */ +#define ICM42686_DT_ACCEL_ODR_6_25 ICM4268X_DT_ACCEL_ODR_6_25 /**< 6.25 Hz */ +#define ICM42686_DT_ACCEL_ODR_3_125 ICM4268X_DT_ACCEL_ODR_3_125 /**< 3.125 Hz */ +#define ICM42686_DT_ACCEL_ODR_1_5625 ICM4268X_DT_ACCEL_ODR_1_5625 /**< 1.5625 Hz */ +#define ICM42686_DT_ACCEL_ODR_500 ICM4268X_DT_ACCEL_ODR_500 /**< 500 Hz */ /** @} */ /** - * @defgroup ICM42686_GYRO_DATA_RATE Gyroscope data rate options + * @defgroup icm42686_gyro_data_rate Gyroscope data rate options * @{ */ -#define ICM42686_DT_GYRO_ODR_32000 ICM4268X_DT_GYRO_ODR_32000 -#define ICM42686_DT_GYRO_ODR_16000 ICM4268X_DT_GYRO_ODR_16000 -#define ICM42686_DT_GYRO_ODR_8000 ICM4268X_DT_GYRO_ODR_8000 -#define ICM42686_DT_GYRO_ODR_4000 ICM4268X_DT_GYRO_ODR_4000 -#define ICM42686_DT_GYRO_ODR_2000 ICM4268X_DT_GYRO_ODR_2000 -#define ICM42686_DT_GYRO_ODR_1000 ICM4268X_DT_GYRO_ODR_1000 -#define ICM42686_DT_GYRO_ODR_200 ICM4268X_DT_GYRO_ODR_200 -#define ICM42686_DT_GYRO_ODR_100 ICM4268X_DT_GYRO_ODR_100 -#define ICM42686_DT_GYRO_ODR_50 ICM4268X_DT_GYRO_ODR_50 -#define ICM42686_DT_GYRO_ODR_25 ICM4268X_DT_GYRO_ODR_25 -#define ICM42686_DT_GYRO_ODR_12_5 ICM4268X_DT_GYRO_ODR_12_5 -#define ICM42686_DT_GYRO_ODR_500 ICM4268X_DT_GYRO_ODR_500 +#define ICM42686_DT_GYRO_ODR_32000 ICM4268X_DT_GYRO_ODR_32000 /**< 32 kHz */ +#define ICM42686_DT_GYRO_ODR_16000 ICM4268X_DT_GYRO_ODR_16000 /**< 16 kHz */ +#define ICM42686_DT_GYRO_ODR_8000 ICM4268X_DT_GYRO_ODR_8000 /**< 8 kHz */ +#define ICM42686_DT_GYRO_ODR_4000 ICM4268X_DT_GYRO_ODR_4000 /**< 4 kHz */ +#define ICM42686_DT_GYRO_ODR_2000 ICM4268X_DT_GYRO_ODR_2000 /**< 2 kHz */ +#define ICM42686_DT_GYRO_ODR_1000 ICM4268X_DT_GYRO_ODR_1000 /**< 1 kHz */ +#define ICM42686_DT_GYRO_ODR_200 ICM4268X_DT_GYRO_ODR_200 /**< 200 Hz */ +#define ICM42686_DT_GYRO_ODR_100 ICM4268X_DT_GYRO_ODR_100 /**< 100 Hz */ +#define ICM42686_DT_GYRO_ODR_50 ICM4268X_DT_GYRO_ODR_50 /**< 50 Hz */ +#define ICM42686_DT_GYRO_ODR_25 ICM4268X_DT_GYRO_ODR_25 /**< 25 Hz */ +#define ICM42686_DT_GYRO_ODR_12_5 ICM4268X_DT_GYRO_ODR_12_5 /**< 12.5 Hz */ +#define ICM42686_DT_GYRO_ODR_500 ICM4268X_DT_GYRO_ODR_500 /**< 500 Hz */ /** @} */ /** @} */ diff --git a/include/zephyr/dt-bindings/sensor/icm42688.h b/include/zephyr/dt-bindings/sensor/icm42688.h index d87bec09281bf..0f03efcf6d92a 100644 --- a/include/zephyr/dt-bindings/sensor/icm42688.h +++ b/include/zephyr/dt-bindings/sensor/icm42688.h @@ -4,14 +4,22 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for ICM42688 Devicetree constants + * @ingroup icm42688_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_TDK_ICM42688P_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_TDK_ICM42688P_H_ #include "icm4268x.h" /** - * @defgroup icm42688 Invensense (TDK) ICM42688 DT Options - * @ingroup sensor_interface + * @brief Invensense (TDK) ICM42688 6-axis motion tracking device + * @defgroup icm42688_interface ICM42688 + * @ingroup sensor_interface_ext * @{ */ @@ -19,81 +27,81 @@ * @defgroup icm42688_accel_power_modes Accelerometer power modes * @{ */ -#define ICM42688_DT_ACCEL_OFF ICM4268X_DT_ACCEL_OFF -#define ICM42688_DT_ACCEL_LP ICM4268X_DT_ACCEL_LP -#define ICM42688_DT_ACCEL_LN ICM4268X_DT_ACCEL_LN +#define ICM42688_DT_ACCEL_OFF ICM4268X_DT_ACCEL_OFF /**< Off */ +#define ICM42688_DT_ACCEL_LP ICM4268X_DT_ACCEL_LP /**< Low Power */ +#define ICM42688_DT_ACCEL_LN ICM4268X_DT_ACCEL_LN /**< Low Noise */ /** @} */ /** * @defgroup icm42688_gyro_power_modes Gyroscope power modes * @{ */ -#define ICM42688_DT_GYRO_OFF ICM4268X_DT_GYRO_OFF -#define ICM42688_DT_GYRO_STANDBY ICM4268X_DT_GYRO_STANDBY -#define ICM42688_DT_GYRO_LN ICM4268X_DT_GYRO_LN +#define ICM42688_DT_GYRO_OFF ICM4268X_DT_GYRO_OFF /**< Off */ +#define ICM42688_DT_GYRO_STANDBY ICM4268X_DT_GYRO_STANDBY /**< Standby */ +#define ICM42688_DT_GYRO_LN ICM4268X_DT_GYRO_LN /**< Low Noise */ /** @} */ /** * @defgroup icm42688_accel_scale Accelerometer scale options * @{ */ -#define ICM42688_DT_ACCEL_FS_16 0 -#define ICM42688_DT_ACCEL_FS_8 1 -#define ICM42688_DT_ACCEL_FS_4 2 -#define ICM42688_DT_ACCEL_FS_2 3 +#define ICM42688_DT_ACCEL_FS_16 0 /**< 16 g */ +#define ICM42688_DT_ACCEL_FS_8 1 /**< 8 g */ +#define ICM42688_DT_ACCEL_FS_4 2 /**< 4 g */ +#define ICM42688_DT_ACCEL_FS_2 3 /**< 2 g */ /** @} */ /** * @defgroup icm42688_gyro_scale Gyroscope scale options * @{ */ -#define ICM42688_DT_GYRO_FS_2000 0 -#define ICM42688_DT_GYRO_FS_1000 1 -#define ICM42688_DT_GYRO_FS_500 2 -#define ICM42688_DT_GYRO_FS_250 3 -#define ICM42688_DT_GYRO_FS_125 4 -#define ICM42688_DT_GYRO_FS_62_5 5 -#define ICM42688_DT_GYRO_FS_31_25 6 -#define ICM42688_DT_GYRO_FS_15_625 7 +#define ICM42688_DT_GYRO_FS_2000 0 /**< 2000 dps */ +#define ICM42688_DT_GYRO_FS_1000 1 /**< 1000 dps */ +#define ICM42688_DT_GYRO_FS_500 2 /**< 500 dps */ +#define ICM42688_DT_GYRO_FS_250 3 /**< 250 dps */ +#define ICM42688_DT_GYRO_FS_125 4 /**< 125 dps */ +#define ICM42688_DT_GYRO_FS_62_5 5 /**< 62.5 dps */ +#define ICM42688_DT_GYRO_FS_31_25 6 /**< 31.25 dps */ +#define ICM42688_DT_GYRO_FS_15_625 7 /**< 15.625 dps */ /** @} */ /** * @defgroup icm42688_accel_data_rate Accelerometer data rate options * @{ */ -#define ICM42688_DT_ACCEL_ODR_32000 ICM4268X_DT_ACCEL_ODR_32000 -#define ICM42688_DT_ACCEL_ODR_16000 ICM4268X_DT_ACCEL_ODR_16000 -#define ICM42688_DT_ACCEL_ODR_8000 ICM4268X_DT_ACCEL_ODR_8000 -#define ICM42688_DT_ACCEL_ODR_4000 ICM4268X_DT_ACCEL_ODR_4000 -#define ICM42688_DT_ACCEL_ODR_2000 ICM4268X_DT_ACCEL_ODR_2000 -#define ICM42688_DT_ACCEL_ODR_1000 ICM4268X_DT_ACCEL_ODR_1000 -#define ICM42688_DT_ACCEL_ODR_200 ICM4268X_DT_ACCEL_ODR_200 -#define ICM42688_DT_ACCEL_ODR_100 ICM4268X_DT_ACCEL_ODR_100 -#define ICM42688_DT_ACCEL_ODR_50 ICM4268X_DT_ACCEL_ODR_50 -#define ICM42688_DT_ACCEL_ODR_25 ICM4268X_DT_ACCEL_ODR_25 -#define ICM42688_DT_ACCEL_ODR_12_5 ICM4268X_DT_ACCEL_ODR_12_5 -#define ICM42688_DT_ACCEL_ODR_6_25 ICM4268X_DT_ACCEL_ODR_6_25 -#define ICM42688_DT_ACCEL_ODR_3_125 ICM4268X_DT_ACCEL_ODR_3_125 -#define ICM42688_DT_ACCEL_ODR_1_5625 ICM4268X_DT_ACCEL_ODR_1_5625 -#define ICM42688_DT_ACCEL_ODR_500 ICM4268X_DT_ACCEL_ODR_500 +#define ICM42688_DT_ACCEL_ODR_32000 ICM4268X_DT_ACCEL_ODR_32000 /**< 32 kHz */ +#define ICM42688_DT_ACCEL_ODR_16000 ICM4268X_DT_ACCEL_ODR_16000 /**< 16 kHz */ +#define ICM42688_DT_ACCEL_ODR_8000 ICM4268X_DT_ACCEL_ODR_8000 /**< 8 kHz */ +#define ICM42688_DT_ACCEL_ODR_4000 ICM4268X_DT_ACCEL_ODR_4000 /**< 4 kHz */ +#define ICM42688_DT_ACCEL_ODR_2000 ICM4268X_DT_ACCEL_ODR_2000 /**< 2 kHz */ +#define ICM42688_DT_ACCEL_ODR_1000 ICM4268X_DT_ACCEL_ODR_1000 /**< 1 kHz */ +#define ICM42688_DT_ACCEL_ODR_200 ICM4268X_DT_ACCEL_ODR_200 /**< 200 Hz */ +#define ICM42688_DT_ACCEL_ODR_100 ICM4268X_DT_ACCEL_ODR_100 /**< 100 Hz */ +#define ICM42688_DT_ACCEL_ODR_50 ICM4268X_DT_ACCEL_ODR_50 /**< 50 Hz */ +#define ICM42688_DT_ACCEL_ODR_25 ICM4268X_DT_ACCEL_ODR_25 /**< 25 Hz */ +#define ICM42688_DT_ACCEL_ODR_12_5 ICM4268X_DT_ACCEL_ODR_12_5 /**< 12.5 Hz */ +#define ICM42688_DT_ACCEL_ODR_6_25 ICM4268X_DT_ACCEL_ODR_6_25 /**< 6.25 Hz */ +#define ICM42688_DT_ACCEL_ODR_3_125 ICM4268X_DT_ACCEL_ODR_3_125 /**< 3.125 Hz */ +#define ICM42688_DT_ACCEL_ODR_1_5625 ICM4268X_DT_ACCEL_ODR_1_5625 /**< 1.5625 Hz */ +#define ICM42688_DT_ACCEL_ODR_500 ICM4268X_DT_ACCEL_ODR_500 /**< 500 Hz */ /** @} */ /** * @defgroup icm42688_gyro_data_rate Gyroscope data rate options * @{ */ -#define ICM42688_DT_GYRO_ODR_32000 ICM4268X_DT_GYRO_ODR_32000 -#define ICM42688_DT_GYRO_ODR_16000 ICM4268X_DT_GYRO_ODR_16000 -#define ICM42688_DT_GYRO_ODR_8000 ICM4268X_DT_GYRO_ODR_8000 -#define ICM42688_DT_GYRO_ODR_4000 ICM4268X_DT_GYRO_ODR_4000 -#define ICM42688_DT_GYRO_ODR_2000 ICM4268X_DT_GYRO_ODR_2000 -#define ICM42688_DT_GYRO_ODR_1000 ICM4268X_DT_GYRO_ODR_1000 -#define ICM42688_DT_GYRO_ODR_200 ICM4268X_DT_GYRO_ODR_200 -#define ICM42688_DT_GYRO_ODR_100 ICM4268X_DT_GYRO_ODR_100 -#define ICM42688_DT_GYRO_ODR_50 ICM4268X_DT_GYRO_ODR_50 -#define ICM42688_DT_GYRO_ODR_25 ICM4268X_DT_GYRO_ODR_25 -#define ICM42688_DT_GYRO_ODR_12_5 ICM4268X_DT_GYRO_ODR_12_5 -#define ICM42688_DT_GYRO_ODR_500 ICM4268X_DT_GYRO_ODR_500 +#define ICM42688_DT_GYRO_ODR_32000 ICM4268X_DT_GYRO_ODR_32000 /**< 32 kHz */ +#define ICM42688_DT_GYRO_ODR_16000 ICM4268X_DT_GYRO_ODR_16000 /**< 16 kHz */ +#define ICM42688_DT_GYRO_ODR_8000 ICM4268X_DT_GYRO_ODR_8000 /**< 8 kHz */ +#define ICM42688_DT_GYRO_ODR_4000 ICM4268X_DT_GYRO_ODR_4000 /**< 4 kHz */ +#define ICM42688_DT_GYRO_ODR_2000 ICM4268X_DT_GYRO_ODR_2000 /**< 2 kHz */ +#define ICM42688_DT_GYRO_ODR_1000 ICM4268X_DT_GYRO_ODR_1000 /**< 1 kHz */ +#define ICM42688_DT_GYRO_ODR_200 ICM4268X_DT_GYRO_ODR_200 /**< 200 Hz */ +#define ICM42688_DT_GYRO_ODR_100 ICM4268X_DT_GYRO_ODR_100 /**< 100 Hz */ +#define ICM42688_DT_GYRO_ODR_50 ICM4268X_DT_GYRO_ODR_50 /**< 50 Hz */ +#define ICM42688_DT_GYRO_ODR_25 ICM4268X_DT_GYRO_ODR_25 /**< 25 Hz */ +#define ICM42688_DT_GYRO_ODR_12_5 ICM4268X_DT_GYRO_ODR_12_5 /**< 12.5 Hz */ +#define ICM42688_DT_GYRO_ODR_500 ICM4268X_DT_GYRO_ODR_500 /**< 500 Hz */ /** @} */ /** @} */ diff --git a/include/zephyr/dt-bindings/sensor/icm45686.h b/include/zephyr/dt-bindings/sensor/icm45686.h index 11bf790c822f3..ec75757c4019b 100644 --- a/include/zephyr/dt-bindings/sensor/icm45686.h +++ b/include/zephyr/dt-bindings/sensor/icm45686.h @@ -5,17 +5,25 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for ICM45686 Devicetree constants + * @ingroup icm45686_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_TDK_ICM45686_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_TDK_ICM45686_H_ /** - * @defgroup ICM45686 Invensense (TDK) ICM45686 DT Options + * @brief Invensense (TDK) ICM45686 6-axis motion tracking device + * @defgroup icm45686_interface ICM45686 * @ingroup sensor_interface * @{ */ /** - * @defgroup ICM45686_ACCEL_POWER_MODES Accelerometer power modes + * @defgroup icm45686_accel_power_modes Accelerometer power modes * @{ */ #define ICM45686_DT_ACCEL_OFF 0 @@ -24,7 +32,7 @@ /** @} */ /** - * @defgroup ICM45686_GYRO_POWER_MODES Gyroscope power modes + * @defgroup icm45686_gyro_power_modes Gyroscope power modes * @{ */ #define ICM45686_DT_GYRO_OFF 0 @@ -34,7 +42,7 @@ /** @} */ /** - * @defgroup ICM45686_ACCEL_SCALE Accelerometer scale options + * @defgroup icm45686_accel_scale Accelerometer scale options * @{ */ #define ICM45686_DT_ACCEL_FS_32 0 @@ -45,7 +53,7 @@ /** @} */ /** - * @defgroup ICM45686_GYRO_SCALE Gyroscope scale options + * @defgroup icm45686_gyro_scale Gyroscope scale options * @{ */ #define ICM45686_DT_GYRO_FS_4000 0 @@ -60,7 +68,7 @@ /** @} */ /** - * @defgroup ICM45686_ACCEL_DATA_RATE Accelerometer data rate options + * @defgroup icm45686_accel_data_rate Accelerometer data rate options * @{ */ #define ICM45686_DT_ACCEL_ODR_6400 3 /* LN-mode only */ @@ -79,7 +87,7 @@ /** @} */ /** - * @defgroup ICM45686_GYRO_DATA_RATE Gyroscope data rate options + * @defgroup icm45686_gyro_data_rate Gyroscope data rate options * @{ */ #define ICM45686_DT_GYRO_ODR_6400 3 /* LN-mode only */ @@ -98,7 +106,7 @@ /** @} */ /** - * @defgroup ICM45686_GYRO_LPF Gyroscope Low-pass Filtering options + * @defgroup icm45686_gyro_lpf Gyroscope Low-pass Filtering options * @{ */ #define ICM45686_DT_GYRO_LPF_BW_OFF 0 @@ -111,7 +119,7 @@ /** @} */ /** - * @defgroup ICM45686_ACCEL_LPF Accelerometer Low-pass Filtering options + * @defgroup icm45686_accel_lpf Accelerometer Low-pass Filtering options * @{ */ #define ICM45686_DT_ACCEL_LPF_BW_OFF 0 diff --git a/include/zephyr/dt-bindings/sensor/iis2dlpc.h b/include/zephyr/dt-bindings/sensor/iis2dlpc.h index abf6df1cc4436..17b31b1614341 100644 --- a/include/zephyr/dt-bindings/sensor/iis2dlpc.h +++ b/include/zephyr/dt-bindings/sensor/iis2dlpc.h @@ -3,40 +3,80 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for IIS2DLPC Devicetree constants + * @ingroup iis2dlpc_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ST_IIS2DLPC_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_ST_IIS2DLPC_H_ -/* power-modes */ -#define IIS2DLPC_DT_LP_M1 0 -#define IIS2DLPC_DT_LP_M2 1 -#define IIS2DLPC_DT_LP_M3 2 -#define IIS2DLPC_DT_LP_M4 3 -#define IIS2DLPC_DT_HP_MODE 4 - -/* Filter bandwidth */ -#define IIS2DLPC_DT_FILTER_BW_ODR_DIV_2 0 -#define IIS2DLPC_DT_FILTER_BW_ODR_DIV_4 1 -#define IIS2DLPC_DT_FILTER_BW_ODR_DIV_10 2 -#define IIS2DLPC_DT_FILTER_BW_ODR_DIV_20 3 - -/* Tap mode */ -#define IIS2DLPC_DT_SINGLE_TAP 0 -#define IIS2DLPC_DT_SINGLE_DOUBLE_TAP 1 - -/* Free-Fall threshold */ -#define IIS2DLPC_DT_FF_THRESHOLD_156_mg 0 -#define IIS2DLPC_DT_FF_THRESHOLD_219_mg 1 -#define IIS2DLPC_DT_FF_THRESHOLD_250_mg 2 -#define IIS2DLPC_DT_FF_THRESHOLD_312_mg 3 -#define IIS2DLPC_DT_FF_THRESHOLD_344_mg 4 -#define IIS2DLPC_DT_FF_THRESHOLD_406_mg 5 -#define IIS2DLPC_DT_FF_THRESHOLD_469_mg 6 -#define IIS2DLPC_DT_FF_THRESHOLD_500_mg 7 - -/* wakeup duration */ -#define IIS2DLPC_DT_WAKEUP_1_ODR 0 -#define IIS2DLPC_DT_WAKEUP_2_ODR 1 -#define IIS2DLPC_DT_WAKEUP_3_ODR 2 -#define IIS2DLPC_DT_WAKEUP_4_ODR 3 +/** + * @defgroup iis2dlpc_interface IIS2DLPC + * @ingroup sensor_interface_ext + * @brief IIS2DLPC 3-axis accelerometer + * @{ + */ + +/** + * @name Power modes + * @{ + */ +#define IIS2DLPC_DT_LP_M1 0 /**< Low Power Mode 1 */ +#define IIS2DLPC_DT_LP_M2 1 /**< Low Power Mode 2 */ +#define IIS2DLPC_DT_LP_M3 2 /**< Low Power Mode 3 */ +#define IIS2DLPC_DT_LP_M4 3 /**< Low Power Mode 4 */ +#define IIS2DLPC_DT_HP_MODE 4 /**< High Performance Mode */ +/** @} */ + +/** + * @name Filter bandwidth + * + * Low-pass cutoff selection as a fraction of ODR. + * @{ + */ +#define IIS2DLPC_DT_FILTER_BW_ODR_DIV_2 0 /**< ODR/2 */ +#define IIS2DLPC_DT_FILTER_BW_ODR_DIV_4 1 /**< ODR/4 */ +#define IIS2DLPC_DT_FILTER_BW_ODR_DIV_10 2 /**< ODR/10 */ +#define IIS2DLPC_DT_FILTER_BW_ODR_DIV_20 3 /**< ODR/20 */ +/** @} */ + +/** + * @name Tap mode + * @{ + */ +#define IIS2DLPC_DT_SINGLE_TAP 0 /**< Single-tap only */ +#define IIS2DLPC_DT_SINGLE_DOUBLE_TAP 1 /**< Single-tap and double-tap */ +/** @} */ + +/** + * @name Free-Fall threshold + * @{ + */ +#define IIS2DLPC_DT_FF_THRESHOLD_156_mg 0 /**< 156 mg */ +#define IIS2DLPC_DT_FF_THRESHOLD_219_mg 1 /**< 219 mg */ +#define IIS2DLPC_DT_FF_THRESHOLD_250_mg 2 /**< 250 mg */ +#define IIS2DLPC_DT_FF_THRESHOLD_312_mg 3 /**< 312 mg */ +#define IIS2DLPC_DT_FF_THRESHOLD_344_mg 4 /**< 344 mg */ +#define IIS2DLPC_DT_FF_THRESHOLD_406_mg 5 /**< 406 mg */ +#define IIS2DLPC_DT_FF_THRESHOLD_469_mg 6 /**< 469 mg */ +#define IIS2DLPC_DT_FF_THRESHOLD_500_mg 7 /**< 500 mg */ +/** @} */ + +/** + * @name Wakeup duration + * @{ + */ +#define IIS2DLPC_DT_WAKEUP_1_ODR 0 /**< 1/ODR */ +#define IIS2DLPC_DT_WAKEUP_2_ODR 1 /**< 2/ODR */ +#define IIS2DLPC_DT_WAKEUP_3_ODR 2 /**< 3/ODR */ +#define IIS2DLPC_DT_WAKEUP_4_ODR 3 /**< 4/ODR */ +/** @} */ + +/** + * @} + */ #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ST_IIS2DLPC_H_ */ diff --git a/include/zephyr/dt-bindings/sensor/iis2iclx.h b/include/zephyr/dt-bindings/sensor/iis2iclx.h index 544486e0984dc..20eecfb14c73b 100644 --- a/include/zephyr/dt-bindings/sensor/iis2iclx.h +++ b/include/zephyr/dt-bindings/sensor/iis2iclx.h @@ -3,23 +3,49 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for IIS2ICLX Devicetree constants + * @ingroup iis2iclx_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ST_IIS2ICLX_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_ST_IIS2ICLX_H_ -/* Accel range */ -#define IIS2ICLX_DT_FS_500mG 0 -#define IIS2ICLX_DT_FS_3G 1 -#define IIS2ICLX_DT_FS_1G 2 -#define IIS2ICLX_DT_FS_2G 3 +/** + * @defgroup iis2iclx_interface IIS2ICLX + * @ingroup sensor_interface_ext + * @brief IIS2ICLX 2-axis accelerometer + * @{ + */ -/* Accel Data rates */ -#define IIS2ICLX_DT_ODR_OFF 0x0 -#define IIS2ICLX_DT_ODR_12Hz5 0x1 -#define IIS2ICLX_DT_ODR_26H 0x2 -#define IIS2ICLX_DT_ODR_52Hz 0x3 -#define IIS2ICLX_DT_ODR_104Hz 0x4 -#define IIS2ICLX_DT_ODR_208Hz 0x5 -#define IIS2ICLX_DT_ODR_416Hz 0x6 -#define IIS2ICLX_DT_ODR_833Hz 0x7 +/** + * @name Accelerometer range + * @{ + */ +#define IIS2ICLX_DT_FS_500mG 0 /**< 500 mg */ +#define IIS2ICLX_DT_FS_3G 1 /**< 3 g */ +#define IIS2ICLX_DT_FS_1G 2 /**< 1 g */ +#define IIS2ICLX_DT_FS_2G 3 /**< 2 g */ +/** @} */ + +/** + * @name Accelerometer output data rates + * @{ + */ +#define IIS2ICLX_DT_ODR_OFF 0x0 /**< Off */ +#define IIS2ICLX_DT_ODR_12Hz5 0x1 /**< 12.5 Hz */ +#define IIS2ICLX_DT_ODR_26H 0x2 /**< 26 Hz */ +#define IIS2ICLX_DT_ODR_52Hz 0x3 /**< 52 Hz */ +#define IIS2ICLX_DT_ODR_104Hz 0x4 /**< 104 Hz */ +#define IIS2ICLX_DT_ODR_208Hz 0x5 /**< 208 Hz */ +#define IIS2ICLX_DT_ODR_416Hz 0x6 /**< 416 Hz */ +#define IIS2ICLX_DT_ODR_833Hz 0x7 /**< 833 Hz */ +/** @} */ + +/** + * @} + */ #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ST_IIS2ICLX_H_ */ diff --git a/include/zephyr/dt-bindings/sensor/ina226.h b/include/zephyr/dt-bindings/sensor/ina226.h index 9efd704eb9da4..1c6d67629b5d4 100644 --- a/include/zephyr/dt-bindings/sensor/ina226.h +++ b/include/zephyr/dt-bindings/sensor/ina226.h @@ -4,42 +4,80 @@ * SPDX-License-Identifier: Apache-2.0 */ +/** + * @file + * @brief Header file for INA226 Devicetree constants + * @ingroup ina226_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_INA226_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_INA226_H_ +/** + * @defgroup ina226_interface INA226 + * @ingroup sensor_interface_ext + * @brief Texas Instruments INA226 Bidirectional Current and Power Monitor + * @{ + */ + #include -/* Reset Mode. */ -#define INA226_RST_NORMAL_OPERATION 0x00 -#define INA226_RST_SYSTEM_RESET 0x01 - -/* Averaging Mode. */ -#define INA226_AVG_MODE_1 0x00 -#define INA226_AVG_MODE_4 0x01 -#define INA226_AVG_MODE_16 0x02 -#define INA226_AVG_MODE_64 0x03 -#define INA226_AVG_MODE_128 0x04 -#define INA226_AVG_MODE_256 0x05 -#define INA226_AVG_MODE_512 0x06 -#define INA226_AVG_MODE_1024 0x07 - -/* Conversion time for bus and shunt voltage in micro-seconds. */ -#define INA226_CONV_TIME_140 0x00 -#define INA226_CONV_TIME_204 0x01 -#define INA226_CONV_TIME_332 0x02 -#define INA226_CONV_TIME_588 0x03 -#define INA226_CONV_TIME_1100 0x04 -#define INA226_CONV_TIME_2116 0x05 -#define INA226_CONV_TIME_4156 0x06 -#define INA226_CONV_TIME_8244 0x07 - -/* Operating Mode. */ -#define INA226_OPER_MODE_POWER_DOWN 0x00 -#define INA226_OPER_MODE_SHUNT_VOLTAGE_TRIG 0x01 -#define INA226_OPER_MODE_BUS_VOLTAGE_TRIG 0x02 -#define INA226_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG 0x03 -#define INA226_OPER_MODE_SHUNT_VOLTAGE_CONT 0x05 -#define INA226_OPER_MODE_BUS_VOLTAGE_CONT 0x06 -#define INA226_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT 0x07 +/** + * @name Reset Modes + * @{ + */ +#define INA226_RST_NORMAL_OPERATION 0x00 /**< Normal Operation */ +#define INA226_RST_SYSTEM_RESET 0x01 /**< System Reset */ +/** @} */ + +/** + * @name Averaging Modes + * + * @{ + */ +#define INA226_AVG_MODE_1 0x00 /**< 1 sample */ +#define INA226_AVG_MODE_4 0x01 /**< 4 samples */ +#define INA226_AVG_MODE_16 0x02 /**< 16 samples */ +#define INA226_AVG_MODE_64 0x03 /**< 64 samples */ +#define INA226_AVG_MODE_128 0x04 /**< 128 samples */ +#define INA226_AVG_MODE_256 0x05 /**< 256 samples */ +#define INA226_AVG_MODE_512 0x06 /**< 512 samples */ +#define INA226_AVG_MODE_1024 0x07 /**< 1024 samples */ +/** @} */ + +/** + * @name Conversion Time for Bus and Shunt Voltage + * @{ + */ +#define INA226_CONV_TIME_140 0x00 /**< 140 μs */ +#define INA226_CONV_TIME_204 0x01 /**< 204 μs */ +#define INA226_CONV_TIME_332 0x02 /**< 332 μs */ +#define INA226_CONV_TIME_588 0x03 /**< 588 μs */ +#define INA226_CONV_TIME_1100 0x04 /**< 1.1 ms */ +#define INA226_CONV_TIME_2116 0x05 /**< 2.116 ms */ +#define INA226_CONV_TIME_4156 0x06 /**< 4.156 ms */ +#define INA226_CONV_TIME_8244 0x07 /**< 8.244 ms */ +/** @} */ + +/** + * @name Operating Modes + * @{ + */ +#define INA226_OPER_MODE_POWER_DOWN 0x00 /**< Power-Down (or Shutdown) */ +#define INA226_OPER_MODE_SHUNT_VOLTAGE_TRIG 0x01 /**< Shunt Voltage, Triggered */ +#define INA226_OPER_MODE_BUS_VOLTAGE_TRIG 0x02 /**< Bus Voltage, Triggered */ +#define INA226_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG 0x03 /**< Shunt and Bus, Triggered */ +#define INA226_OPER_MODE_SHUNT_VOLTAGE_CONT 0x05 /**< Shunt Voltage, Continuous */ +#define INA226_OPER_MODE_BUS_VOLTAGE_CONT 0x06 /**< Bus Voltage, Continuous */ +#define INA226_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT 0x07 /**< Shunt and Bus, Continuous */ +/** @} */ + +/** + * @} + */ + +/** + * @} + */ #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_INA226_H_ */ diff --git a/include/zephyr/dt-bindings/sensor/ina230.h b/include/zephyr/dt-bindings/sensor/ina230.h index 6f0e4859f53b9..12d168400ccbe 100644 --- a/include/zephyr/dt-bindings/sensor/ina230.h +++ b/include/zephyr/dt-bindings/sensor/ina230.h @@ -4,52 +4,85 @@ * * SPDX-License-Identifier: Apache-2.0 */ + +/** + * @file + * @brief Header file for INA230 Devicetree constants + * @ingroup ina230_interface + */ + #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_INA230_H_ #define ZEPHYR_INCLUDE_DT_BINDINGS_INA230_H_ +/** + * @defgroup ina230_interface INA230 + * @ingroup sensor_interface_ext + * @brief Texas Instruments INA230 Bidirectional Current and Power Monitor + * @{ + */ + #include -/* Mask/Enable bits that asserts the ALERT pin */ -#define INA230_SHUNT_VOLTAGE_OVER BIT(15) -#define INA230_SHUNT_VOLTAGE_UNDER BIT(14) -#define INA230_BUS_VOLTAGE_OVER BIT(13) -#define INA230_BUS_VOLTAGE_UNDER BIT(12) -#define INA230_OVER_LIMIT_POWER BIT(11) -#define INA230_CONVERSION_READY BIT(10) -#define INA230_ALERT_FUNCTION_FLAG BIT(4) -#define INA230_CONVERSION_READY_FLAG BIT(3) -#define INA230_MATH_OVERFLOW_FLAG BIT(2) -#define INA230_ALERT_POLARITY BIT(1) -#define INA230_ALERT_LATCH_ENABLE BIT(0) +/** + * @name Mask/Enable bits that asserts the ALERT pin + * @{ + */ +#define INA230_SHUNT_VOLTAGE_OVER BIT(15) /**< Shunt Voltage Over Limit (SOL) */ +#define INA230_SHUNT_VOLTAGE_UNDER BIT(14) /**< Shunt Voltage Under Limit (SUL) */ +#define INA230_BUS_VOLTAGE_OVER BIT(13) /**< Bus Voltage Over Limit (BOL) */ +#define INA230_BUS_VOLTAGE_UNDER BIT(12) /**< Bus Voltage Under Limit (BUL) */ +#define INA230_OVER_LIMIT_POWER BIT(11) /**< Power Over Limit (POL) */ +#define INA230_CONVERSION_READY BIT(10) /**< Conversion Ready (CNVR) */ +#define INA230_ALERT_FUNCTION_FLAG BIT(4) /**< Alert Function Flag (AFF) */ +#define INA230_CONVERSION_READY_FLAG BIT(3) /**< Conversion Ready Flag (CVRF) */ +#define INA230_MATH_OVERFLOW_FLAG BIT(2) /**< Math Overflow Flag (OVF) */ +#define INA230_ALERT_POLARITY BIT(1) /**< Alert Polarity (APOL) */ +#define INA230_ALERT_LATCH_ENABLE BIT(0) /**< Alert Latch Enable (LEN )*/ + /** @} */ -/* Operating Mode */ -#define INA230_OPER_MODE_POWER_DOWN 0x00 -#define INA230_OPER_MODE_SHUNT_VOLTAGE_TRIG 0x01 -#define INA230_OPER_MODE_BUS_VOLTAGE_TRIG 0x02 -#define INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG 0x03 -#define INA230_OPER_MODE_SHUNT_VOLTAGE_CONT 0x05 -#define INA230_OPER_MODE_BUS_VOLTAGE_CONT 0x06 -#define INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT 0x07 +/** + * @name Operating Mode + * @{ + */ +#define INA230_OPER_MODE_POWER_DOWN 0x00 /**< Power-down */ +#define INA230_OPER_MODE_SHUNT_VOLTAGE_TRIG 0x01 /**< Shunt Voltage, triggered */ +#define INA230_OPER_MODE_BUS_VOLTAGE_TRIG 0x02 /**< Bus Voltage, triggered */ +#define INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG 0x03 /**< Shunt and Bus, triggered */ +#define INA230_OPER_MODE_SHUNT_VOLTAGE_CONT 0x05 /**< Shunt Voltage, continuous */ +#define INA230_OPER_MODE_BUS_VOLTAGE_CONT 0x06 /**< Bus Voltage, continuous */ +#define INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT 0x07 /**< Shunt and Bus, continuous */ +/** @} */ -/* Conversion time for bus and shunt in micro-seconds */ -#define INA230_CONV_TIME_140 0x00 -#define INA230_CONV_TIME_204 0x01 -#define INA230_CONV_TIME_332 0x02 -#define INA230_CONV_TIME_588 0x03 -#define INA230_CONV_TIME_1100 0x04 -#define INA230_CONV_TIME_2116 0x05 -#define INA230_CONV_TIME_4156 0x06 -#define INA230_CONV_TIME_8244 0x07 +/** + * @name Conversion time for bus and shunt (in micro-seconds) + * @{ + */ +#define INA230_CONV_TIME_140 0x00 /**< 140 us */ +#define INA230_CONV_TIME_204 0x01 /**< 204 us */ +#define INA230_CONV_TIME_332 0x02 /**< 332 us */ +#define INA230_CONV_TIME_588 0x03 /**< 588 us */ +#define INA230_CONV_TIME_1100 0x04 /**< 1100 us */ +#define INA230_CONV_TIME_2116 0x05 /**< 2116 us */ +#define INA230_CONV_TIME_4156 0x06 /**< 4156 us */ +#define INA230_CONV_TIME_8244 0x07 /**< 8244 us */ +/** @} */ -/* Averaging Mode */ -#define INA230_AVG_MODE_1 0x00 -#define INA230_AVG_MODE_4 0x01 -#define INA230_AVG_MODE_16 0x02 -#define INA230_AVG_MODE_64 0x03 -#define INA230_AVG_MODE_128 0x04 -#define INA230_AVG_MODE_256 0x05 -#define INA230_AVG_MODE_512 0x06 -#define INA230_AVG_MODE_1024 0x07 +/** + * @name Averaging Mode + * + * Number of samples that are collected and averaged together. + * + * @{ + */ +#define INA230_AVG_MODE_1 0x00 /**< No averaging, 1 sample */ +#define INA230_AVG_MODE_4 0x01 /**< 4 samples */ +#define INA230_AVG_MODE_16 0x02 /**< 16 samples */ +#define INA230_AVG_MODE_64 0x03 /**< 64 samples */ +#define INA230_AVG_MODE_128 0x04 /**< 128 samples */ +#define INA230_AVG_MODE_256 0x05 /**< 256 samples */ +#define INA230_AVG_MODE_512 0x06 /**< 512 samples */ +#define INA230_AVG_MODE_1024 0x07 /**< 1024 samples */ +/** @} */ /** * @brief Macro for creating the INA230 configuration value @@ -65,4 +98,8 @@ avg) \ (((avg) << 9) | ((bvct) << 6) | ((svct) << 3) | (mode)) +/** + * @} + */ + #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_INA230_H_ */