drivers/sensors: add LTR553 uORB driver #2
Loading…
Reference in New Issue
No description provided.
Delete Branch "mojito02/nuttx:ltr553-uorb-driver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes
All changes to existing files are pure additions; no existing file
content is modified or removed.
Summary
Add a uORB driver for the Lite-On LTR553 combined ambient light and
proximity sensor. NuttX currently supports the LTR308 ambient light
sensor from the same vendor (
ltr308_uorb.c), but has no support for theLTR553, which integrates both an ALS and an IR proximity channel in one
package.
The driver registers two uORB topics from a single device:
SENSOR_TYPE_LIGHT— illuminance in lux, plus the raw IR channelSENSOR_TYPE_PROXIMITY— approximate distance in centimetresImplementation notes
channels share one I2C transaction sequence and one wakeup per interval.
piecewise conversion.
activateop; the PS channel follows the datasheet's requiredpower-up sequence (standby → LED drive → pulse count → measurement
rate → activate).
Testing
Tested on an Allwinner R528 board with an LTR553 on I2C:
from near-zero up to 1000+)
enabled without the other)
Notes
The driver contains no platform-specific code and depends only on
standard NuttX interfaces (
i2c_master,sensors/sensor.h,kthread).Kconfig, Make.defs and CMakeLists.txt entries follow the existing LTR308
pattern.
Both new files pass
nxstylewith zero warnings; the code was formattedusing
tools/uncrustify.cfg.合并请求描述
[简要描述本次合并请求的目的和主要内容]
相关Issue
关联Issue编号:#{Issue编号}
变更内容
1. 增强了xxx
Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.