adis_write_reg_16(9)
π« 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 π au16, 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:
struct adis_data(9)struct adis_ops(9)struct adis(9)adis_reset(9)__adis_write_reg_8(9)__adis_write_reg_16(9)__adis_write_reg_32(9)__adis_read_reg_16(9)__adis_read_reg_32(9)adis_write_reg(9)adis_read_reg(9)adis_write_reg_8(9)adis_write_reg_32(9)adis_read_reg_16(9)adis_read_reg_32(9)adis_update_bits_base(9)adis_update_bits(9)
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 pageadis_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
- 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