STRUCT HTU31_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ 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 type u8, sized HTU31_SERIAL_NUMBER_LEN β€” that's the sensor's government name.
  • heater_enable β€” the internal state of the heater πŸ”₯ a bool, 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