| # Copyright (c) 2021 STMicroelectronics |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| description: | |
| When setting the odr and power-mode properties in a .dts or .dtsi file you may include |
| lis2ds12.h and use the macros defined there. |
| |
| Example: |
| #include <zephyr/dt-bindings/sensor/lis2ds12.h> |
| |
| lis2ds12: lis2ds12@0 { |
| ... |
| |
| power-mode = <LIS2DS12_DT_LOW_POWER>; |
| odr = <LIS2DS12_DT_ODR_12Hz5>; |
| }; |
| |
| include: sensor-device.yaml |
| |
| properties: |
| irq-gpios: |
| type: phandle-array |
| description: | |
| DRDY pin |
| |
| This pin defaults to active high when produced by the sensor. |
| The property value should ensure the flags properly describe |
| the signal that is presented to the driver. |
| |
| range: |
| type: int |
| default: 2 |
| description: | |
| Range in g. Default is power-up configuration. |
| |
| - 16 # 16g (0.488 mg/LSB) |
| - 8 # 8g (0.244 mg/LSB) |
| - 4 # 4g (0.122 mg/LSB) |
| - 2 # 2g (0.061 mg/LSB) |
| |
| enum: [16, 8, 4, 2] |
| |
| power-mode: |
| type: int |
| default: 0 |
| description: | |
| Specify the sensor power mode. Default is power-down mode |
| |
| - 0 # LIS2DS12_DT_POWER_DOWN |
| - 1 # LIS2DS12_DT_LOW_POWER |
| - 2 # LIS2DS12_DT_HIGH_RESOLUTION |
| - 3 # LIS2DS12_DT_HIGH_FREQUENCY |
| |
| enum: [0, 1, 2, 3] |
| |
| odr: |
| type: int |
| default: 0 |
| description: | |
| Specify the default output data rate expressed in samples per second (Hz). |
| Default is power-down mode |
| |
| - 0 # LIS2DS12_DT_ODR_OFF |
| - 1 # LIS2DS12_DT_ODR_1Hz_LP |
| - 2 # LIS2DS12_DT_ODR_12Hz5 |
| - 3 # LIS2DS12_DT_ODR_25Hz |
| - 4 # LIS2DS12_DT_ODR_50Hz |
| - 5 # LIS2DS12_DT_ODR_100Hz |
| - 6 # LIS2DS12_DT_ODR_200Hz |
| - 7 # LIS2DS12_DT_ODR_400Hz |
| - 8 # LIS2DS12_DT_ODR_800Hz |
| - 9 # LIS2DS12_DT_ODR_1600Hz |
| - 10 # LIS2DS12_DT_ODR_3200Hz_HF |
| - 11 # LIS2DS12_DT_ODR_6400Hz_HF |
| |
| enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] |