max9611_read_single(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so bestie, this is max9611_read_single(9) from the Kernel API Manual, and her whole thing is to read a single value from the ADC interface ✨ like that's the assignment and she ate πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

here's the exact signature, no cap:

int max9611_read_single (struct max9611_dev *max9611 , enum
max9611_conf_ids selector , u16 *raw_val );

πŸ’… ARGUMENTS πŸ’…

  • max9611 β€” the max9611 device, aka the main character 🫢
  • selector β€” the index for mux and register configuration πŸ”₯
  • raw_val β€” the value returned from the ADC πŸŽ€

πŸ”₯ DESCRIPTION πŸ”₯

so the data registers are 16 bit long, spread between two 8 bit registers with consecutive addresses β€” iconic little duo fr fr πŸ’–

configure the ADC mux first, then read the register at address "reg_addr" ⭐

the smbus_read_word routine asks for 16 bits, and the ADC is kind enough to return values from "reg_addr" and "reg_addr + 1" consecutively 😭🫢

and the data are transmitted with big-endian ordering: MSB arrives first πŸ’… periodt.

🌈 SEE ALSO 🌈


okay that's the page, bestie 🫢 this cutie comes from ./drivers/iio/adc, dated October 2026 β€” mwah πŸ’‹

πŸ“¦ where this page comes from