1.\" $NetBSD: sht4xtemp.4,v 1.3 2024/07/29 20:12:58 brad Exp $ 2.\" 3.\" Copyright (c) 2021 Brad Spencer <brad@anduin.eldar.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd September 28, 2021 18.Dt SHT4XTEMP 4 19.Os 20.Sh NAME 21.Nm sht4xtemp 22.Nd Driver for Sensirion SHT40/SHT41/SHT45 sensor chip via I2C bus 23.Sh SYNOPSIS 24.Cd "sht4xtemp* at iic? addr 0x44" 25.Sh DESCRIPTION 26The 27.Nm 28driver provides measurements from the SHT40/SHT41/SHT45 humidity/temperature 29sensors via the 30.Xr envsys 4 31framework. 32The 33.Nm 34.Ar addr 35argument selects the address at the 36.Xr iic 4 37bus. 38The resolution, heater controls and crc validity can be changed through 39.Xr sysctl 8 40nodes. 41.Sh SYSCTL VARIABLES 42The following 43.Xr sysctl 3 44variables are provided: 45.Bl -tag -width indent 46.It Li hw.sht4xtemp0.resolutions 47Lists the resolutions supported by the driver and chip. 48.It Li hw.sht4xtemp0.resolution 49Set the resolution, or number of bits, used for %RH and temperature. 50Use one of the strings listed in 51.Li hw.sht4xtemp.resolutions . 52.It Li hw.sht4xtemp0.ignorecrc 53If set, the crc calculation for %RH and temperature will be ignored. 54.It Li hw.sht4xtemp0.heateron 55Turn the heater on and off. 56Please note that the heater is turned on right 57before the measurement and runs for a pulse width of time. 58Then the measurement is taken and the heater is turned off. 59There is no way to keep the heater running with this chip. 60.It Li hw.sht4xtemp0.heaterstrength 61From 1 to 3, the amount of energy put into the heater. 62The higher the number, the more power used. 63.It Li hw.sht4xtemp0.heaterpulses 64Lists the valid heater pulses supported by the driver and chip. 65.It Li hw.sht4xtemp0.heaterpulse 66Set the heater pulse length. 67Use one of the strings listed in 68.Li hw.sht4xtemp.heaterpulses . 69.It Li hw.sht4xtemp0.debug 70If the driver is compiled with 71.Dv SHT4X_DEBUG , 72this node will appear and can be used to set the debugging level. 73.It Li hw.sht4xtemp0.readattempts 74To read %RH or temperature the chip requires that the command be sent, 75then a delay must be observed before a read can be done to get the values 76back. 77The delays are documented in the datasheet for the chip. 78The driver will attempt to read back the values readattempts number of 79times. 80The default is 10 which should be more than enough for most purposes. 81.El 82.Sh SEE ALSO 83.Xr envsys 4 , 84.Xr iic 4 , 85.Xr envstat 8 , 86.Xr sysctl 8 87.Sh HISTORY 88The 89.Nm 90driver first appeared in 91.Nx 10.0 . 92.Sh AUTHORS 93.An -nosplit 94The 95.Nm 96driver was written by 97.An Brad Spencer Aq Mt brad@anduin.eldar.org . 98