comedi_range_is_bipolar(9)
π comedi_range_is_bipolar β the kernel API manual, bestie edition π
okay so real talk, this is a page from the Kernel API Manual (section 9, kernel-flavored, very demure, very minding-its-own-business). It's about comedi_range_is_bipolar and honestly? It's a tiny little function with main character energy. Let's get into it β¨
πΈ NAME πΈ
comedi_range_is_bipolar β the vibe check that tells you whether a subdevice range is bipolar π¦
β¨ SYNOPSIS β¨
bool comedi_range_is_bipolar (struct comedi_subdevice *s , unsigned int
range );
literally just that. one call, one answer, one bool. no cap π
π ARGUMENTS π
sβ your COMEDI subdevice. the whole point of the function, honestly.rangeβ the index of the range within a range table. it's an index, bestie, not a pointer, not a vibe, an index π₯
π DESCRIPTION π
so what does it actually do? It tests whether a range is bipolar by checking whether its minimum value is negative. that's the whole test. if the min is negative β bipolar. iconic, efficient, no notes π
two things you need to know though, and I'm saying this with love:
It assumes the range is valid. It does not validate it for you. If you hand it nonsense, that's a you problem, not a comedi_range_is_bipolar problem π
It does not work for subdevices using a channel-specific range table list. so if that's your setup, this function is not the one, fr fr π
β RETURN β
trueβ the range is bipolar πfalseβ the range is unipolar π«Ά
that's it. that's the return. binary queen behavior π
π₯ SEE ALSO π₯
the whole friend group, in the original order, no one left out (iykyk):
Kernel file ./include/linux/comedi/comedidev.h and then:
struct comedi_subdevice(9)struct comedi_buf_page(9)struct comedi_buf_map(9)struct comedi_async(9)enum comedi_cb(9)struct comedi_driver(9)struct comedi_device(9)struct comedi_lrange(9)comedi_range_is_unipolar(9)comedi_range_is_external(9)comedi_chan_range_is_bipolar(9)comedi_chan_range_is_unipolar(9)comedi_chan_range_is_external(9)comedi_offset_munge(9)comedi_bytes_per_sample(9)comedi_sample_shift(9)comedi_bytes_to_samples(9)comedi_samples_to_bytes(9)comedi_check_trigger_src(9)comedi_check_trigger_is_unique(9)comedi_check_trigger_arg_is(9)comedi_check_trigger_arg_min(9)comedi_check_trigger_arg_max(9)comedi_buf_n_bytes_ready(9)__comedi_request_region(9)comedi_request_region(9)module_comedi_driver(9)
and that's the page!! π§ sources say this one lives over in ./include/linux/comedi, dated October 2026, and it goes by comedi_range_is_bipolar(9). mwah, go check your ranges, bestie πππ
π¦ 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