Skip to content

Commit 8b56476

Browse files
kartbenfabiobaltieri
authored andcommitted
include: drivers: sensor: lis2dh: add missing docs
Add full doxygen for this newly introduced header. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 783b39c commit 8b56476

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

include/zephyr/drivers/sensor/lis2dh.h

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,50 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
/**
8+
* @file
9+
* @brief Header file for extended sensor API of LIS2DH sensor
10+
* @ingroup lis2dh_interface
11+
*/
12+
713
#ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_LIS2DH_H_
814
#define ZEPHYR_INCLUDE_DRIVERS_SENSOR_LIS2DH_H_
915

16+
/**
17+
* @defgroup lis2dh_interface LIS2DH
18+
* @ingroup sensor_interface_ext
19+
* @brief ST Microelectronics LIS2DH 3-axis accelerometer
20+
* @{
21+
*/
22+
1023
#include <zephyr/drivers/sensor.h>
1124

25+
/**
26+
* Possible values for @ref SENSOR_ATTR_LIS2DH_SELF_TEST custom attribute.
27+
*/
1228
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 */
1632
};
1733

34+
/**
35+
* @brief Custom sensor attributes for LIS2DH
36+
*/
1837
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+
*/
1946
SENSOR_ATTR_LIS2DH_SELF_TEST = SENSOR_ATTR_PRIV_START,
2047
};
2148

49+
/**
50+
* @}
51+
*/
52+
2253
#endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_LIS2DH_H_ */

0 commit comments

Comments
 (0)