ad4695_read_one_sample(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ad4695_read_one_sample β€” the Kernel API Manual glow-up πŸŽ€

okay so bestie, this is a page straight out of the Kernel API Manual, and it's literally about reading one single sample in single-cycle mode. one. single. sample. main character energy fr fr ✨


🌸 NAME 🌸

ad4695_read_one_sample β€” read a single sample using single-cycle mode πŸ¦‹


✨ SYNOPSIS ✨

int ad4695_read_one_sample (struct ad4695_state *st , unsigned int
       address );

like, that's the whole signature, no cap πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • st β€” the AD4695 state, your little state bb 🫢
  • address β€” the address of the channel to read, iykyk πŸ“

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: upon successful return, the sample will be stored in st->raw_data. that's it, that's the vibe. the data just ✨appears✨ in st->raw_data and you're living your best life πŸ’€


πŸ”₯ CONTEXT πŸ”₯

  • can sleep 😴
  • must be called with iio_device_claim_direct held πŸ‘‘
not me emphasizing this but fr fr, hold iio_device_claim_direct or you're gonna have a bad time πŸ™ˆ

⭐ RETURN ⭐

  • 0 on success β€” slay πŸ’…
  • a negative error code on failure β€” not slay 😭

🌈 SEE ALSO 🌈

Kernel file ./drivers/iio/adc/ad4695.c β€” go read it bestie, it's giving iconic πŸ‘‘


and that's the whole page! πŸŽ€ big kisses from ./drivers/iio/adc, dated October 2026, and remember: ad4695_read_one_sample(9) is the icon, the moment, the legend πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from