1.\" $NetBSD: aht20temp.4,v 1.1 2022/11/17 19:20:05 brad Exp $ 2.\" 3.\" Copyright (c) 2022 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 November 15, 2022 18.Dt AHT20TEMP 4 19.Os 20.Sh NAME 21.Nm aht20temp 22.Nd Driver for Guangzhou Aosong AHT20 sensor chip via I2C bus 23.Sh SYNOPSIS 24.Cd "aht20temp* at iic? addr 0x38" 25.Sh DESCRIPTION 26The 27.Nm 28driver provides measurements from the AHT20 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 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.aht20temp0.ignorecrc 47If set, the crc calculation for %RH and temperature will be ignored. 48.It Li hw.aht20temp0.debug 49If the driver is compiled with 50.Dv AHT20_DEBUG , 51this node will appear and can be used to set the debugging level. 52.It Li hw.aht20temp0.readattempts 53To read %RH or temperature the chip requires that the command be sent, 54then a delay must be observed before a read can be done to get the values 55back. 56The delays are documented in the datasheet for the chip. 57The driver will attempt to read back the values readattempts number of 58times. 59The default is 10 which should be more than enough for most purposes. 60.El 61.Sh SEE ALSO 62.Xr envsys 4 , 63.Xr iic 4 , 64.Xr envstat 8 , 65.Xr sysctl 8 66.Sh HISTORY 67The 68.Nm 69driver first appeared in 70.Nx 10.0 . 71.Sh AUTHORS 72.An -nosplit 73The 74.Nm 75driver was written by 76.An Brad Spencer Aq Mt brad@anduin.eldar.org . 77