STRUCT HTU31_DATA(9)
π struct htu31_data(9) β the Kernel API Manual, bestie edition π
okay so this is a page from the Kernel API Manual and it's literally all about struct htu31_data β like, the whole entire vibe bundle you need to make an HTU31 chip go β¨
πΈ NAME πΈ
struct htu31_data β all the data required to operate a HTU31 chip</p> π«Ά that's it, that's the whole personality.
π SYNOPSIS π
here's the shape of it, no cap, copy it exactly:
struct htu31_data {
struct i2c_client *client;
struct mutex lock;
long wait_time;
long temperature;
long humidity;
u8 serial_number[HTU31_SERIAL_NUMBER_LEN];
bool heater_enable;
};
π¦ Members π¦
these are the lil fields inside, and honestly? each one is a main character:
clientβ the i2c client associated with the HTU31 π« like the sensor's plus-one, its connection to the outside world.lockβ a mutex to prevent parallel access to the data π nobody touches the data at the same time, we do not do chaos in this house.wait_timeβ the time needed by sensor to convert values β³ the sensor's lil "gimme a sec" window, respect it.temperatureβ the latest temperature value in millidegrees π‘οΈ yes *milli*degrees, she's precise like that.humidityβ the latest relative humidity value in millipercent π§ again with the milli, we stay accurate.serial_numberβ the serial number of the sensor π·οΈ of typeu8, sizedHTU31_SERIAL_NUMBER_LENβ that's the sensor's government name.heater_enableβ the internal state of the heater π₯ abool, so it's just vibes: on or off.
π SEE ALSO π
- Kernel file
./drivers/hwmon/htu31.cβ go read the source bestie, it's giving iconic π§
π tiny reminder: keep the field names and types exactly as they are β I'm cute, not creative with your struct layout.
and that's the page!! π shipped straight outta ./drivers/hwmon, dated October 2026, in the Kernel API Manual β mwah π periodt.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms