build_channel_array(9)
β¨ build_channel_array β like, the manual page π
okay so this is a page from the Kernel API Manual, bestie β section 9, kernel API vibes only. sit down, grab a strawberry π, and let's get into it.
πΈ NAME πΈ
build_channel_array β literally the function that figures out what channels are present π
π¦ SYNOPSIS π¦
int build_channel_array (const char *device_dir , int buffer_idx ,
struct iio_channel_info **ci_array , int *counter );
π ARGUMENTS π
device_dirβ the IIO device directory in sysfs. that's the spot she lives in, periodt πbuffer_idxβ the IIO buffer for this channel array. yes, specifically this one β¨ci_arrayβ output: the resulting array ofiio_channel_info. she fills this in for you π«Άcounterβ output: the amount of array elements. so you know how many you got, no cap π’
π DESCRIPTION π
Returns 0 on success β iconic, flawless, ate π
. Otherwise it hands back a negative error code, which is the vibe check failing, and you should probably go look at that π.
π SEE ALSO π
Kernel file ./tools/iio/iio_utils.c β that's where the magic lives, iykyk π
and also, all of these besties:
iioutils_break_up_name(9)iioutils_get_type(9)iioutils_get_param_float(9)bsort_channel_array_by_index(9)find_type_by_name(9)write_sysfs_int(9)write_sysfs_int_and_verify(9)write_sysfs_string_and_verify(9)write_sysfs_string(9)read_sysfs_posint(9)read_sysfs_float(9)read_sysfs_string(9)
fr fr, that's the whole page. no filler, no skips, every single reference accounted for π§
okay bye ily, this page came from ./tools/iio and it's dated October 2026 β mwah, see u in the next one πβ¨π
π¦ 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