ad4695_read_one_sample(9)
π 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_directheld π
not me emphasizing this but fr fr, hold iio_device_claim_direct or you're gonna have a bad time π
β RETURN β
0on 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 π
ad4695_set_single_cycle_mode(9)ad4695_enter_advanced_sequencer_mode(9)ad4695_exit_conversion_mode(9)ad4695_osr_to_regval(9)
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
- 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