|
4 | 4 | * SPDX-License-Identifier: Apache-2.0
|
5 | 5 | */
|
6 | 6 |
|
| 7 | +/** |
| 8 | + * @file |
| 9 | + * @brief Header file for extended sensor API of LIS2DH sensor |
| 10 | + * @ingroup lis2dh_interface |
| 11 | + */ |
| 12 | + |
7 | 13 | #ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_LIS2DH_H_
|
8 | 14 | #define ZEPHYR_INCLUDE_DRIVERS_SENSOR_LIS2DH_H_
|
9 | 15 |
|
| 16 | +/** |
| 17 | + * @defgroup lis2dh_interface LIS2DH |
| 18 | + * @ingroup sensor_interface_ext |
| 19 | + * @brief ST Microelectronics LIS2DH 3-axis accelerometer |
| 20 | + * @{ |
| 21 | + */ |
| 22 | + |
10 | 23 | #include <zephyr/drivers/sensor.h>
|
11 | 24 |
|
| 25 | +/** |
| 26 | + * Possible values for @ref SENSOR_ATTR_LIS2DH_SELF_TEST custom attribute. |
| 27 | + */ |
12 | 28 | enum lis2dh_self_test {
|
13 |
| - LIS2DH_SELF_TEST_DISABLE = 0, |
14 |
| - LIS2DH_SELF_TEST_POSITIVE = 1, |
15 |
| - LIS2DH_SELF_TEST_NEGATIVE = 2, |
| 29 | + LIS2DH_SELF_TEST_DISABLE = 0, /**< Self-test disabled */ |
| 30 | + LIS2DH_SELF_TEST_POSITIVE = 1, /**< Simulates a positive-direction acceleration */ |
| 31 | + LIS2DH_SELF_TEST_NEGATIVE = 2, /**< Simulates a negative-direction acceleration */ |
16 | 32 | };
|
17 | 33 |
|
| 34 | +/** |
| 35 | + * @brief Custom sensor attributes for LIS2DH |
| 36 | + */ |
18 | 37 | enum sensor_attribute_lis2dh {
|
| 38 | + /** |
| 39 | + * Sets the self-test mode. |
| 40 | + * |
| 41 | + * Applies an electrostatic force to the sensor to simulate acceleration without |
| 42 | + * actually moving the device. |
| 43 | + * |
| 44 | + * Use a value from @ref lis2dh_self_test, passed in the sensor_value.val1 field. |
| 45 | + */ |
19 | 46 | SENSOR_ATTR_LIS2DH_SELF_TEST = SENSOR_ATTR_PRIV_START,
|
20 | 47 | };
|
21 | 48 |
|
| 49 | +/** |
| 50 | + * @} |
| 51 | + */ |
| 52 | + |
22 | 53 | #endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_LIS2DH_H_ */
|
0 commit comments