drivers/sensors: add SHTC3 uORB driver #3
Loading…
Reference in New Issue
No description provided.
Delete Branch "mojito02/nuttx:shtc3-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 Sensirion SHTC3 temperature and humidity
sensor. NuttX already supports several Sensirion parts (
sht21.c,sht3x.c,sht4x.c), but not the SHTC3, which uses a different commandset and a wake/sleep power model.
The driver registers two uORB topics:
SENSOR_TYPE_AMBIENT_TEMPERATURE— temperature in degrees CelsiusSENSOR_TYPE_RELATIVE_HUMIDITY— relative humidity in percentImplementation notes
before each measurement. The driver tracks the sleep state and issues
wake/sleep commands around measurements to keep idle current low.
(polynomial 0x31); a failed checksum is reported rather than published.
giving up, so a transient bus glitch does not leave the sensor stuck.
queue entry, so the two topics can be enabled and paced independently.
stretching disabled, and waits the datasheet's measurement time.
Testing
Tested on an Allwinner R528 board with an SHTC3 on I2C:
Notes
The driver contains no platform-specific code and depends only on
standard NuttX interfaces (
i2c_master,sensors/sensor.h,wqueue,mutex). Kconfig, Make.defs and CMakeLists.txt entries follow theexisting Sensirion sensor 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.