adis_read_reg_16(9)
β¨ adis_read_reg_16(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's a lil function called adis_read_reg_16 β and yes, the name is literally what it does: it reads 2 bytes from a 16-bit register. no cap, that's the whole vibe. π
πΈ NAME πΈ
adis_read_reg_16 β read 2 bytes from a 16-bit register π
β¨ SYNOPSIS β¨
int adis_read_reg_16 (struct adis *adis , unsigned int reg , u16 *val );
like, that's the whole signature, and yes you're gonna need all three of those args π«Ά
π¦ ARGUMENTS π¦
adisβ the adis device, aka the main character here π this is the struct you're working with.regβ the address of the lower of the two registers. yes, the lower one β it's doing a two-register situation, iykyk. πvalβ where the value read back from the device lands. it gets written into youru16 *pointer, so it's giving output parameter energy β¨
β RETURN β
0 on success π β and if it's not feeling it, a negative error code instead π that's it, that's the deal.
π SEE ALSO π
Kernel file ./include/linux/iio/imu/adis.h π β and honestly the whole adis friend group is here, so lemme introduce everyone:
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_16(9)adis_write_reg_32(9)adis_read_reg_32(9)adis_update_bits_base(9)adis_update_bits(9)
ngl the double-underscore ones are the lowkey internal versions and the no-underscore ones are the public-facing slay versions β go read their pages if you wanna know the deets π (this page only promises what's above, fr fr)
and that's the page, bestie π§π this lil moment was brought to you by ./include/linux/iio/imu, dated October 2026, living under the adis_read_reg_16(9) header β 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