no1wudi opened a new pull request, #17363:
URL: https://github.com/apache/nuttx/pull/17363
## Summary
* **Why change is necessary**: Add comprehensive driver support for the
QST QMI8658 6-axis IMU sensor to enable accelerometer and gyroscope
functionality in NuttX-based embedded systems.
* **What functional part of the code is being changed**: Added new sensor
driver in `drivers/sensors/` directory with both character device and uORB
interface options, along with comprehensive documentation and board integration.
* **How does the change exactly work**: The driver implements I2C
communication with the QMI8658 sensor, providing:
- Core I2C register access functions (`qmi8658_base.c`)
- Character device interface with ioctl support (`qmi8658.c`)
- uORB-based sensor interface for real-time applications
(`qmi8658_uorb.c`)
- Public API with register definitions and scale factors (`qmi8658.h`)
- Board-specific integration for ESP32S3 platform
- Complete documentation with usage examples
* **Related NuttX Issue reference**: N/A (new feature addition)
* **Related NuttX Apps Issue / Pull Request reference**: N/A
## Impact
* **Is new feature added? Is existing feature changed?**: YES - New
QMI8658 6-axis IMU sensor driver added with dual interface support (character
device and uORB)
* **Impact on user (will user need to adapt to change?)**: NO - This is an
additive feature that doesn't affect existing functionality. Users can enable
the driver via Kconfig options and use either character device (`/dev/imu0`) or
uORB interface (`/dev/uorb/sensor_accel0`, `/dev/uorb/sensor_gyro0`)
* **Impact on build (will build process change?)**: YES - New Kconfig
options added:
- `CONFIG_SENSORS_QMI8658`: Enable driver support
- `CONFIG_SENSORS_QMI8658_UORB`: Use uORB interface instead of character
device
- `CONFIG_SENSORS_QMI8658_POLL`: Enable polling mode with configurable
interval
- `CONFIG_QMI8658_I2C_FREQUENCY`: Set I2C communication frequency
(default 400kHz)
* **Impact on hardware (will arch(s) / board(s) / driver(s) change?)**:
YES - Added new sensor driver that supports any platform with I2C capability.
No specific board changes included in this commit.
* **Impact on documentation (is update required / provided?)**: YES -
Comprehensive documentation added:
- `Documentation/components/drivers/special/sensors/qmi8658.rst` (311
lines)
- Updated sensor framework documentation indices
- Complete API reference with usage examples
* **Impact on security (any sort of implications?)**: NO - Driver follows
standard NuttX sensor driver patterns with proper I2C communication and mutex
protection
* **Impact on compatibility (backward/forward/interoperability?)**: NO -
New driver doesn't affect existing sensor drivers or interfaces
* **Anything else to consider or add?**: NO
## Testing
I confirm that changes are verified on local setup and works as intended:
```
nsh> uname -a
NuttX 12.11.0 ae4cc6be5e-dirty Nov 22 2025 23:02:58 xtensa lckfb-szpi-esp32s3
nsh> qmi8658
QMI8658 Sensor Example
Reading 100 samples from /dev/imu0
[001] Accel: (0.002, 0.066, 0.994) g
Gyro: (1.72, 1.93, -0.33) dps
Temp: 21.48 °C
[002] Accel: (0.002, 0.066, 0.994) g
Gyro: (1.72, 1.93, -0.33) dps
Temp: 21.48 °C
[003] Accel: (0.001, 0.068, 1.000) g
Gyro: (7.48, 2.98, 0.18) dps
Temp: 21.19 °C
[004] Accel: (0.001, 0.065, 0.993) g
Gyro: (1.36, 1.96, 0.09) dps
Temp: 21.27 °C
[005] Accel: (0.003, 0.064, 0.999) g
Gyro: (1.19, 1.98, -0.19) dps
Temp: 21.27 °C
[006] Accel: (0.004, 0.067, 1.000) g
Gyro: (1.61, 2.77, -0.24) dps
Temp: 21.27 °C
[007] Accel: (0.004, 0.065, 0.999) g
Gyro: (1.28, 1.82, -0.05) dps
Temp: 21.32 °C
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]