38 lines
1012 B
YAML
38 lines
1012 B
YAML
# SPDX-License-Identifier: Apache-2.0
|
||
#
|
||
# QST QMC5883P 三轴磁力计 binding(I2C)。
|
||
# Zephyr 上游无驱动(QMC5883L 寄存器不兼容),本模块按 QMC5883P 数据手册实现。
|
||
#
|
||
# Example:
|
||
#
|
||
# &i2c3 {
|
||
# qmc5883p: qmc5883p@2c {
|
||
# compatible = "misaki,qmc5883p";
|
||
# reg = <0x2c>;
|
||
# range = <8>;
|
||
# status = "okay";
|
||
# };
|
||
# };
|
||
|
||
description: QST QMC5883P 3-axis magnetometer (I2C)
|
||
|
||
compatible: "misaki,qmc5883p"
|
||
|
||
include: [sensor-device.yaml, i2c-device.yaml]
|
||
|
||
properties:
|
||
reg:
|
||
required: true
|
||
description: |
|
||
I2C address. QMC5883P default is 0x2C.
|
||
|
||
range:
|
||
type: int
|
||
default: 8
|
||
enum: [2, 8, 12, 30]
|
||
description: |
|
||
Magnetic field full-scale range in Gauss (RNG bits of CTRL2).
|
||
Sensitivity is 15000 / 3750 / 2500 / 1000 LSB/G for ±2/8/12/30 G
|
||
respectively. Smaller range gives finer resolution but saturates
|
||
sooner (relevant with large hard-iron offsets / motor currents).
|