adis_write_reg_16(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« adis_write_reg_16(9) πŸ’«

okay so bestie, welcome to the Kernel API Manual, section 9, and today's main character is adis_write_reg_16 β€” genuinely one of my faves, no cap 🫢


✨ NAME ✨

adis_write_reg_16 β€” write 2 bytes to a pair of registers. that's it, that's the whole vibe πŸ’… two bytes, two registers, one little function doing the lord's work.


πŸŽ€ SYNOPSIS πŸŽ€

int adis_write_reg_16 (struct adis *adis , unsigned int reg , u16 val );

like, look at her. so clean. so iconic. ✨


🌸 ARGUMENTS 🌸

  • adis β€” the adis device πŸ’– this is your device handle, your bestie, the whole reason we're here.
  • reg β€” the address of the lower of the two registers 🧚 note that word lower, okay? it's writing to that one and the one right above it, so pick your starting address accordingly.
  • val β€” the value to be written πŸŽ€ a u16, so 2 bytes of pure content going in.

⭐ RETURN ⭐

0 on success, and a negative error code otherwise 😭 like, if you get a negative number back, that's the universe telling you something went wrong. check it. fr fr.


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/iio/imu/adis.h β€” go read the source, it's giving open book energy πŸ“–

and the whole friend group:

every single one of them, linked and accounted for πŸ‘‘


lowkey reminder from your girl: this page lives in ./include/linux/iio/imu, dated October 2026, and it's page adis_write_reg_16(9) β€” so if you're citing her, cite her correctly πŸ’œ

okay that's the whole page, ily, go write your two bytes πŸ’…πŸŒΈβœ¨

πŸ“¦ where this page comes from