| Main index | Section 4 | Options |
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
htu21_load="YES"
The htu21 driver reports data via sysctl(8) entries in the device's node in the sysctl(8) tree:
| temperature | |
| The temperature, in hundredths of Kelvin. | |
| humidity | The relative humidity, in hundredths of a percent. |
| crc_errors | The number of CRC errors in reading the measurements from the device. |
| power | The good power indication. This can be useful with battery powered sensors. |
| heater | The built-in heater control. The heater can be used for testing and for recovery from saturation after high humidity. |
| hold_bus | Whether the sensor should hold SCL low while performing the measurement. Normally, the sensor releases the bus and NACKs all accessed until the measurement is completed. The hold mode may be useful in mult-master environments. |
On an FDT(4) based system the following properties must be set:
| compatible | |
| Must be set to "meas,htu21". | |
| reg | |
| The I2C address of htu21. Although, it is hard-wired to 0x40 (7-bit) on all supported sensors. | |
The DTS part for a htu21 device usually looks like:
/ {
...
htu21d {
compatible = "meas,htu21";
reg = <0x40>;
};
};
Some sensor variants do not provide a serial number or use an incompatible format. The htu21 driver does not distinguish those variants and may complain about incorrect serial number checksum.
| HTU21 (4) | January 19, 2021 |
| Main index | Section 4 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | If you have a problem and you think awk(1) is the solution, then you have two problems. | ” |
| — David Tilbrook | ||